[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72AVBBWBX68ZWJB9ME7249A":3,"skill-same:01M72AVBBWBX68ZWJB9ME7249A":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":13,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M72AVBBWBX68ZWJB9ME7249A","wordpress-plugin-development",null,"WordPress plugin development workflow covering plugin architecture, hooks, admin interfaces, REST API, security best practices, and WordPress 7.0 features: Real-Time Collaboration, AI Connectors, Abilities API, DataViews, and PHP-only blocks.","Sansar35\u002Fclaude-agent","Sansar35","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F145020281?v=4","01M724CQ2SCC86MGNSD87D0D4K","01M724CQ3965G9WJ3QXE3AJ5YY",1,"MIT","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fantigravity\u002Fwordpress-plugin-development\u002FSKILL.md",[],[],"2026-11-10 18:39:20",false,"---\nname: wordpress-plugin-development\ndescription: \"WordPress plugin development workflow covering plugin architecture, hooks, admin interfaces, REST API, security best practices, and WordPress 7.0 features: Real-Time Collaboration, AI Connectors, Abilities API, DataViews, and PHP-only blocks.\"\ncategory: granular-workflow-bundle\nrisk: safe\nsource: personal\ndate_added: \"2026-02-27\"\n---\n\n# WordPress Plugin Development Workflow\n\n## Overview\n\nSpecialized workflow for creating WordPress plugins with proper architecture, hooks system, admin interfaces, REST API endpoints, and security practices. Now includes WordPress 7.0 features for modern plugin development.\n\n## WordPress 7.0 Plugin Development\n\n### Key Features for Plugin Developers\n\n1. **Real-Time Collaboration (RTC) Compatibility**\n   - Yjs-based CRDT for simultaneous editing\n   - Custom transport via `sync.providers` filter\n   - **Requirement**: Register post meta with `show_in_rest => true`\n\n2. **AI Connector Integration**\n   - Provider-agnostic AI via `wp_ai_client_prompt()`\n   - Settings > Connectors admin screen\n   - Works with OpenAI, Claude, Gemini, Ollama\n\n3. **Abilities API**\n   - Declare plugin capabilities for AI agents\n   - REST API: `\u002Fwp-json\u002Fabilities\u002Fv1\u002Fmanifest`\n   - MCP adapter support\n\n4. **DataViews & DataForm**\n   - Modern admin interfaces\n   - Replaces WP_List_Table patterns\n   - Built-in validation\n\n5. **PHP-Only Blocks**\n   - Register blocks without JavaScript\n   - Auto-generated Inspector controls\n\n## When to Use This Workflow\n\nUse this workflow when:\n- Creating custom WordPress plugins\n- Extending WordPress functionality\n- Building admin interfaces\n- Adding REST API endpoints\n- Integrating third-party services\n- Implementing WordPress 7.0 AI\u002FCollaboration features\n\n## Workflow Phases\n\n### Phase 1: Plugin Setup\n\n#### Skills to Invoke\n- `app-builder` - Project scaffolding\n- `backend-dev-guidelines` - Backend patterns\n\n#### Actions\n1. Create plugin directory structure\n2. Set up main plugin file with header\n3. Implement activation\u002Fdeactivation hooks\n4. Set up autoloading\n5. Configure text domain\n\n#### WordPress 7.0 Plugin Header\n```php\n\u002F*\nPlugin Name: My Plugin\nPlugin URI: https:\u002F\u002Fexample.com\u002Fmy-plugin\nDescription: A WordPress 7.0 compatible plugin with AI and RTC support\nVersion: 1.0.0\nRequires at least: 6.0\nRequires PHP: 7.4\nAuthor: Developer Name\nLicense: GPL2+\n*\u002F\n```\n\n#### Copy-Paste Prompts\n```\nUse @app-builder to scaffold a new WordPress plugin\n```\n\n### Phase 2: Plugin Architecture\n\n#### Skills to Invoke\n- `backend-dev-guidelines` - Architecture patterns\n\n#### Actions\n1. Design plugin class structure\n2. Implement singleton pattern\n3. Create loader class\n4. Set up dependency injection\n5. Configure plugin lifecycle\n\n#### WordPress 7.0 Architecture Considerations\n- Prepare for iframed editor compatibility\n- Design for collaboration-aware data flows\n- Consider Abilities API for AI integration\n\n#### Copy-Paste Prompts\n```\nUse @backend-dev-guidelines to design plugin architecture\n```\n\n### Phase 3: Hooks Implementation\n\n#### Skills to Invoke\n- `wordpress-penetration-testing` - WordPress patterns\n\n#### Actions\n1. Register action hooks\n2. Create filter hooks\n3. Implement callback functions\n4. Set up hook priorities\n5. Add conditional hooks\n\n#### Copy-Paste Prompts\n```\nUse @wordpress-penetration-testing to understand WordPress hooks\n```\n\n### Phase 4: Admin Interface\n\n#### Skills to Invoke\n- `frontend-developer` - Admin UI\n\n#### Actions\n1. Create admin menu\n2. Build settings pages\n3. Implement options registration\n4. Add settings sections\u002Ffields\n5. Create admin notices\n\n#### WordPress 7.0 Admin Considerations\n- Test with new admin color scheme\n- Consider DataViews for data displays\n- Implement view transitions\n- Use new validation patterns\n\n#### DataViews Example\n```javascript\nimport { DataViews } from '@wordpress\u002Fdataviews';\n\nconst MyPluginDataView = () => {\n    const data = [\u002F* records *\u002F];\n    const fields = [\n        { id: 'title', label: 'Title', sortable: true },\n        { id: 'status', label: 'Status', filterBy: true }\n    ];\n    const view = {\n        type: 'table',\n        perPage: 10,\n        sort: { field: 'title', direction: 'asc' }\n    };\n\n    return (\n        \u003CDataViews\n            data={data}\n            fields={fields}\n            view={view}\n            onChangeView={handleViewChange}\n        \u002F>\n    );\n};\n```\n\n#### Copy-Paste Prompts\n```\nUse @frontend-developer to create WordPress admin interface\n```\n\n### Phase 5: Database Operations\n\n#### Skills to Invoke\n- `database-design` - Database design\n- `postgresql` - Database patterns\n\n#### Actions\n1. Create custom tables\n2. Implement CRUD operations\n3. Add data validation\n4. Set up data sanitization\n5. Create data upgrade routines\n\n#### RTC-Compatible Post Meta\n```php\n\u002F\u002F Register meta for Real-Time Collaboration\nregister_post_meta('post', 'my_custom_field', [\n    'type' => 'string',\n    'single' => true,\n    'show_in_rest' => true,  \u002F\u002F Required for RTC\n    'sanitize_callback' => 'sanitize_text_field',\n]);\n\n\u002F\u002F For WP 7.0, also consider:\nregister_term_meta('category', 'my_term_field', [\n    'type' => 'string',\n    'show_in_rest' => true,\n]);\n```\n\n#### Copy-Paste Prompts\n```\nUse @database-design to design plugin database schema\n```\n\n### Phase 6: REST API\n\n#### Skills to Invoke\n- `api-design-principles` - API design\n- `api-patterns` - API patterns\n\n#### Actions\n1. Register REST routes\n2. Create endpoint callbacks\n3. Implement permission callbacks\n4. Add request validation\n5. Document API endpoints\n\n#### WordPress 7.0 REST API Enhancements\n- Abilities API integration\n- AI Connector endpoints\n- Enhanced validation\n\n#### Copy-Paste Prompts\n```\nUse @api-design-principles to create WordPress REST API endpoints\n```\n\n### Phase 7: Security\n\n#### Skills to Invoke\n- `wordpress-penetration-testing` - WordPress security\n- `security-scanning-security-sast` - Security scanning\n\n#### Actions\n1. Implement nonce verification\n2. Add capability checks\n3. Sanitize all inputs\n4. Escape all outputs\n5. Secure database queries\n\n#### WordPress 7.0 Security Considerations\n- Test Abilities API permission boundaries\n- Validate AI connector credential handling\n- Review collaboration data isolation\n- PHP 7.4+ requirement compliance\n\n#### Copy-Paste Prompts\n```\nUse @wordpress-penetration-testing to audit plugin security\n```\n\n### Phase 8: WordPress 7.0 Features\n\n#### Skills to Invoke\n- `api-design-principles` - AI integration\n- `backend-dev-guidelines` - Block development\n\n#### AI Connector Implementation\n```php\n\u002F\u002F Using WordPress 7.0 AI Connector\nadd_action('save_post', 'my_plugin_generate_ai_summary', 10, 2);\n\nfunction my_plugin_generate_ai_summary($post_id, $post) {\n    if (wp_is_post_autosave($post_id) || wp_is_post_revision($post_id)) {\n        return;\n    }\n    \n    \u002F\u002F Check if AI client is available\n    if (!function_exists('wp_ai_client_prompt')) {\n        return;\n    }\n    \n    $content = strip_tags($post->post_content);\n    if (empty($content)) {\n        return;\n    }\n    \n    \u002F\u002F Build prompt - direct string concatenation for input\n    $result = wp_ai_client_prompt(\n        'Create a compelling 2-sentence summary for social media: ' . substr($content, 0, 1000)\n    );\n    \n    if (is_wp_error($result)) {\n        return;\n    }\n    \n    \u002F\u002F Set temperature for consistent output\n    $result->using_temperature(0.3);\n    $summary = $result->generate_text();\n    \n    if ($summary && !is_wp_error($summary)) {\n        update_post_meta($post_id, '_ai_summary', sanitize_textarea_field($summary));\n    }\n}\n```\n\n#### Abilities API Registration\n```php\n\u002F\u002F Register ability categories on their own hook\nadd_action('wp_abilities_api_categories_init', function() {\n    wp_register_ability_category('content-creation', [\n        'label' => __('Content Creation', 'my-plugin'),\n        'description' => __('Abilities for generating and managing content', 'my-plugin'),\n    ]);\n});\n\n\u002F\u002F Register abilities on their own hook\nadd_action('wp_abilities_api_init', function() {\n    wp_register_ability('my-plugin\u002Fgenerate-summary', [\n        'label' => __('Generate Summary', 'my-plugin'),\n        'description' => __('Creates an AI-powered summary of content', 'my-plugin'),\n        'category' => 'content-creation',\n        'input_schema' => [\n            'type' => 'object',\n            'properties' => [\n                'content' => ['type' => 'string'],\n                'length' => ['type' => 'integer', 'default' => 2]\n            ],\n            'required' => ['content']\n        ],\n        'output_schema' => [\n            'type' => 'object',\n            'properties' => [\n                'summary' => ['type' => 'string']\n            ]\n        ],\n        'execute_callback' => 'my_plugin_generate_summary_cb',\n        'permission_callback' => function() {\n            return current_user_can('edit_posts');\n        }\n    ]);\n});\n\n\u002F\u002F Handler callback\nfunction my_plugin_generate_summary_cb($input) {\n    $content = isset($input['content']) ? $input['content'] : '';\n    $length = isset($input['length']) ? absint($input['length']) : 2;\n    \n    if (empty($content)) {\n        return new WP_Error('empty_content', 'No content provided');\n    }\n    \n    if (!function_exists('wp_ai_client_prompt')) {\n        return new WP_Error('ai_unavailable', 'AI not available');\n    }\n    \n    $prompt = sprintf('Create a %d-sentence summary of: %s', $length, substr($content, 0, 2000));\n    \n    $result = wp_ai_client_prompt($prompt)\n        ->using_temperature(0.3)\n        ->generate_text();\n    \n    if (is_wp_error($result)) {\n        return $result;\n    }\n    \n    return ['summary' => sanitize_textarea_field($result)];\n}\n```\n\n#### PHP-Only Block Registration\n```php\n\u002F\u002F Register block entirely in PHP (WordPress 7.0)\n\u002F\u002F Note: For full PHP-only blocks, use block.json with PHP render_callback\n\n\u002F\u002F First, create a block.json file in build\u002F or includes\u002Fblocks\u002F\n\u002F\u002F Then register in PHP:\n\n\u002F\u002F Simple PHP-only block registration (WordPress 7.0+)\nif (function_exists('register_block_type')) {\n    register_block_type('my-plugin\u002Ffeatured-post', [\n        'render_callback' => function($attributes, $content, $block) {\n            $post_id = isset($attributes['postId']) ? absint($attributes['postId']) : 0;\n            \n            if (!$post_id) {\n                $post_id = get_the_ID();\n            }\n            \n            $post = get_post($post_id);\n            \n            if (!$post) {\n                return '';\n            }\n            \n            $title = esc_html($post->post_title);\n            $excerpt = esc_html(get_the_excerpt($post));\n            \n            return sprintf(\n                '\u003Cdiv class=\"featured-post\">\u003Ch2>%s\u003C\u002Fh2>\u003Cp>%s\u003C\u002Fp>\u003C\u002Fdiv>',\n                $title,\n                $excerpt\n            );\n        },\n        'attributes' => [\n            'postId' => ['type' => 'integer', 'default' => 0],\n            'showExcerpt' => ['type' => 'boolean', 'default' => true]\n        ],\n    ]);\n}\n```\n\n#### Disable Collaboration (if needed)\n```javascript\n\u002F\u002F Disable RTC for specific post types\nimport { addFilter } from '@wordpress\u002Fhooks';\n\naddFilter(\n    'sync.providers',\n    'my-plugin\u002Fdisable-collab',\n    () => []\n);\n```\n\n### Phase 9: Testing\n\n#### Skills to Invoke\n- `test-automator` - Test automation\n- `php-pro` - PHP testing\n\n#### Actions\n1. Set up PHPUnit\n2. Create unit tests\n3. Write integration tests\n4. Test with WordPress test suite\n5. Configure CI\n\n#### WordPress 7.0 Testing Priorities\n- Test RTC compatibility\n- Verify AI connector functionality\n- Validate DataViews integration\n- Test Interactivity API with watch()\n\n#### Copy-Paste Prompts\n```\nUse @test-automator to set up plugin testing\n```\n\n## Plugin Structure\n\n```\nplugin-name\u002F\n├── plugin-name.php\n├── includes\u002F\n│   ├── class-plugin.php\n│   ├── class-loader.php\n│   ├── class-activator.php\n│   └── class-deactivator.php\n├── admin\u002F\n│   ├── class-plugin-admin.php\n│   ├── css\u002F\n│   └── js\u002F\n├── public\u002F\n│   ├── class-plugin-public.php\n│   ├── css\u002F\n│   └── js\u002F\n├── blocks\u002F           # PHP-only blocks (WP 7.0)\n├── abilities\u002F        # Abilities API\n├── ai\u002F               # AI Connector integration\n├── languages\u002F\n└── vendor\u002F\n```\n\n## WordPress 7.0 Compatibility Checklist\n\n- [ ] PHP 7.4+ requirement documented\n- [ ] Post meta registered with `show_in_rest => true` for RTC\n- [ ] Meta boxes migrated to block-based UIs\n- [ ] AI Connector integration tested\n- [ ] Abilities API registered (if applicable)\n- [ ] DataViews integration tested (if applicable)\n- [ ] Interactivity API uses `watch()` not `effect`\n- [ ] Tested with iframed editor\n- [ ] Collaboration fallback works (post locking)\n\n## Quality Gates\n\n- [ ] Plugin activates without errors\n- [ ] All hooks working\n- [ ] Admin interface functional\n- [ ] Security measures implemented\n- [ ] Tests passing\n- [ ] Documentation complete\n- [ ] WordPress 7.0 compatibility verified\n\n## Related Workflow Bundles\n\n- `wordpress` - WordPress development\n- `wordpress-theme-development` - Theme development\n- `wordpress-woocommerce` - WooCommerce\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","# WordPress Plugin Development Workflow\n\n## Overview\n\nSpecialized workflow for creating WordPress plugins with proper architecture, hooks system, admin interfaces, REST API endpoints, and security practices. Now includes WordPress 7.0 features for modern plugin development.\n\n## WordPress 7.0 Plugin Development\n\n### Key Features for Plugin Developers\n\n1. **Real-Time Collaboration (RTC) Compatibility**\n   - Yjs-based CRDT for simultaneous editing\n   - Custom transport via `sync.providers` filter\n   - **Requirement**: Register post meta with `show_in_rest => true`\n\n2. **AI Connector Integration**\n   - Provider-agnostic AI via `wp_ai_client_prompt()`\n   - Settings > Connectors admin screen\n   - Works with OpenAI, Claude, Gemini, Ollama\n\n3. **Abilities API**\n   - Declare plugin capabilities for AI agents\n   - REST API: `\u002Fwp-json\u002Fabilities\u002Fv1\u002Fmanifest`\n   - MCP adapter support\n\n4. **DataViews & DataForm**\n   - Modern admin interfaces\n   - Replaces WP_List_Table patterns\n   - Built-in validation\n\n5. **PHP-Only Blocks**\n   - Register blocks without JavaScript\n   - Auto-generated Inspector controls\n\n## When to Use This Workflow\n\nUse this workflow when:\n- Creating custom WordPress plugins\n- Extending WordPress functionality\n- Building admin interfaces\n- Adding REST API endpoints\n- Integrating third-party services\n- Implementing WordPress 7.0 AI\u002FCollaboration features\n\n## Workflow Phases\n\n### Phase 1: Plugin Setup\n\n#### Skills to Invoke\n- `app-builder` - Project scaffolding\n- `backend-dev-guidelines` - Backend patterns\n\n#### Actions\n1. Create plugin directory structure\n2. Set up main plugin file with header\n3. Implement activation\u002Fdeactivation hooks\n4. Set up autoloading\n5. Configure text domain\n\n#### WordPress 7.0 Plugin Header\n```php\n\u002F*\nPlugin Name: My Plugin\nPlugin URI: https:\u002F\u002Fexample.com\u002Fmy-plugin\nDescription: A WordPress 7.0 compatible plugin with AI and RTC support\nVersion: 1.0.0\nRequires at least: 6.0\nRequires PHP: 7.4\nAuthor: Developer Name\nLicense: GPL2+\n*\u002F\n```\n\n#### Copy-Paste Prompts\n```\nUse @app-builder to scaffold a new WordPress plugin\n```\n\n### Phase 2: Plugin Architecture\n\n#### Skills to Invoke\n- `backend-dev-guidelines` - Architecture patterns\n\n#### Actions\n1. Design plugin class structure\n2. Implement singleton pattern\n3. Create loader class\n4. Set up dependency injection\n5. Configure plugin lifecycle\n\n#### WordPress 7.0 Architecture Considerations\n- Prepare for iframed editor compatibility\n- Design for collaboration-aware data flows\n- Consider Abilities API for AI integration\n\n#### Copy-Paste Prompts\n```\nUse @backend-dev-guidelines to design plugin architecture\n```\n\n### Phase 3: Hooks Implementation\n\n#### Skills to Invoke\n- `wordpress-penetration-testing` - WordPress patterns\n\n#### Actions\n1. Register action hooks\n2. Create filter hooks\n3. Implement callback functions\n4. Set up hook priorities\n5. Add conditional hooks\n\n#### Copy-Paste Prompts\n```\nUse @wordpress-penetration-testing to understand WordPress hooks\n```\n\n### Phase 4: Admin Interface\n\n#### Skills to Invoke\n- `frontend-developer` - Admin UI\n\n#### Actions\n1. Create admin menu\n2. Build settings pages\n3. Implement options registration\n4. Add settings sections\u002Ffields\n5. Create admin notices\n\n#### WordPress 7.0 Admin Considerations\n- Test with new admin color scheme\n- Consider DataViews for data displays\n- Implement view transitions\n- Use new validation patterns\n\n#### DataViews Example\n```javascript\nimport { DataViews } from '@wordpress\u002Fdataviews';\n\nconst MyPluginDataView = () => {\n    const data = [\u002F* records *\u002F];\n    const fields = [\n        { id: 'title', label: 'Title', sortable: true },\n        { id: 'status', label: 'Status', filterBy: true }\n    ];\n    const view = {\n        type: 'table',\n        perPage: 10,\n        sort: { field: 'title', direction: 'asc' }\n    };\n\n    return (\n        \u003CDataViews\n            data={data}\n            fields={fields}\n            view={view}\n            onChangeView={handleViewChange}\n        \u002F>\n    );\n};\n```\n\n#### Copy-Paste Prompts\n```\nUse @frontend-developer to create WordPress admin interface\n```\n\n### Phase 5: Database Operations\n\n#### Skills to Invoke\n- `database-design` - Database design\n- `postgresql` - Database patterns\n\n#### Actions\n1. Create custom tables\n2. Implement CRUD operations\n3. Add data validation\n4. Set up data sanitization\n5. Create data upgrade routines\n\n#### RTC-Compatible Post Meta\n```php\n\u002F\u002F Register meta for Real-Time Collaboration\nregister_post_meta('post', 'my_custom_field', [\n    'type' => 'string',\n    'single' => true,\n    'show_in_rest' => true,  \u002F\u002F Required for RTC\n    'sanitize_callback' => 'sanitize_text_field',\n]);\n\n\u002F\u002F For WP 7.0, also consider:\nregister_term_meta('category', 'my_term_field', [\n    'type' => 'string',\n    'show_in_rest' => true,\n]);\n```\n\n#### Copy-Paste Prompts\n```\nUse @database-design to design plugin database schema\n```\n\n### Phase 6: REST API\n\n#### Skills to Invoke\n- `api-design-principles` - API design\n- `api-patterns` - API patterns\n\n#### Actions\n1. Register REST routes\n2. Create endpoint callbacks\n3. Implement permission callbacks\n4. Add request validation\n5. Document API endpoints\n\n#### WordPress 7.0 REST API Enhancements\n- Abilities API integration\n- AI Connector endpoints\n- Enhanced validation\n\n#### Copy-Paste Prompts\n```\nUse @api-design-principles to create WordPress REST API endpoints\n```\n\n### Phase 7: Security\n\n#### Skills to Invoke\n- `wordpress-penetration-testing` - WordPress security\n- `security-scanning-security-sast` - Security scanning\n\n#### Actions\n1. Implement nonce verification\n2. Add capability checks\n3. Sanitize all inputs\n4. Escape all outputs\n5. Secure database queries\n\n#### WordPress 7.0 Security Considerations\n- Test Abilities API permission boundaries\n- Validate AI connector credential handling\n- Review collaboration data isolation\n- PHP 7.4+ requirement compliance\n\n#### Copy-Paste Prompts\n```\nUse @wordpress-penetration-testing to audit plugin security\n```\n\n### Phase 8: WordPress 7.0 Features\n\n#### Skills to Invoke\n- `api-design-principles` - AI integration\n- `backend-dev-guidelines` - Block development\n\n#### AI Connector Implementation\n```php\n\u002F\u002F Using WordPress 7.0 AI Connector\nadd_action('save_post', 'my_plugin_generate_ai_summary', 10, 2);\n\nfunction my_plugin_generate_ai_summary($post_id, $post) {\n    if (wp_is_post_autosave($post_id) || wp_is_post_revision($post_id)) {\n        return;\n    }\n    \n    \u002F\u002F Check if AI client is available\n    if (!function_exists('wp_ai_client_prompt')) {\n        return;\n    }\n    \n    $content = strip_tags($post->post_content);\n    if (empty($content)) {\n        return;\n    }\n    \n    \u002F\u002F Build prompt - direct string concatenation for input\n    $result = wp_ai_client_prompt(\n        'Create a compelling 2-sentence summary for social media: ' . substr($content, 0, 1000)\n    );\n    \n    if (is_wp_error($result)) {\n        return;\n    }\n    \n    \u002F\u002F Set temperature for consistent output\n    $result->using_temperature(0.3);\n    $summary = $result->generate_text();\n    \n    if ($summary && !is_wp_error($summary)) {\n        update_post_meta($post_id, '_ai_summary', sanitize_textarea_field($summary));\n    }\n}\n```\n\n#### Abilities API Registration\n```php\n\u002F\u002F Register ability categories on their own hook\nadd_action('wp_abilities_api_categories_init', function() {\n    wp_register_ability_category('content-creation', [\n        'label' => __('Content Creation', 'my-plugin'),\n        'description' => __('Abilities for generating and managing content', 'my-plugin'),\n    ]);\n});\n\n\u002F\u002F Register abilities on their own hook\nadd_action('wp_abilities_api_init', function() {\n    wp_register_ability('my-plugin\u002Fgenerate-summary', [\n        'label' => __('Generate Summary', 'my-plugin'),\n        'description' => __('Creates an AI-powered summary of content', 'my-plugin'),\n        'category' => 'content-creation',\n        'input_schema' => [\n            'type' => 'object',\n            'properties' => [\n                'content' => ['type' => 'string'],\n                'length' => ['type' => 'integer', 'default' => 2]\n            ],\n            'required' => ['content']\n        ],\n        'output_schema' => [\n            'type' => 'object',\n            'properties' => [\n                'summary' => ['type' => 'string']\n            ]\n        ],\n        'execute_callback' => 'my_plugin_generate_summary_cb',\n        'permission_callback' => function() {\n            return current_user_can('edit_posts');\n        }\n    ]);\n});\n\n\u002F\u002F Handler callback\nfunction my_plugin_generate_summary_cb($input) {\n    $content = isset($input['content']) ? $input['content'] : '';\n    $length = isset($input['length']) ? absint($input['length']) : 2;\n    \n    if (empty($content)) {\n        return new WP_Error('empty_content', 'No content provided');\n    }\n    \n    if (!function_exists('wp_ai_client_prompt')) {\n        return new WP_Error('ai_unavailable', 'AI not available');\n    }\n    \n    $prompt = sprintf('Create a %d-sentence summary of: %s', $length, substr($content, 0, 2000));\n    \n    $result = wp_ai_client_prompt($prompt)\n        ->using_temperature(0.3)\n        ->generate_text();\n    \n    if (is_wp_error($result)) {\n        return $result;\n    }\n    \n    return ['summary' => sanitize_textarea_field($result)];\n}\n```\n\n#### PHP-Only Block Registration\n```php\n\u002F\u002F Register block entirely in PHP (WordPress 7.0)\n\u002F\u002F Note: For full PHP-only blocks, use block.json with PHP render_callback\n\n\u002F\u002F First, create a block.json file in build\u002F or includes\u002Fblocks\u002F\n\u002F\u002F Then register in PHP:\n\n\u002F\u002F Simple PHP-only block registration (WordPress 7.0+)\nif (function_exists('register_block_type')) {\n    register_block_type('my-plugin\u002Ffeatured-post', [\n        'render_callback' => function($attributes, $content, $block) {\n            $post_id = isset($attributes['postId']) ? absint($attributes['postId']) : 0;\n            \n            if (!$post_id) {\n                $post_id = get_the_ID();\n            }\n            \n            $post = get_post($post_id);\n            \n            if (!$post) {\n                return '';\n            }\n            \n            $title = esc_html($post->post_title);\n            $excerpt = esc_html(get_the_excerpt($post));\n            \n            return sprintf(\n                '\u003Cdiv class=\"featured-post\">\u003Ch2>%s\u003C\u002Fh2>\u003Cp>%s\u003C\u002Fp>\u003C\u002Fdiv>',\n                $title,\n                $excerpt\n            );\n        },\n        'attributes' => [\n            'postId' => ['type' => 'integer', 'default' => 0],\n            'showExcerpt' => ['type' => 'boolean', 'default' => true]\n        ],\n    ]);\n}\n```\n\n#### Disable Collaboration (if needed)\n```javascript\n\u002F\u002F Disable RTC for specific post types\nimport { addFilter } from '@wordpress\u002Fhooks';\n\naddFilter(\n    'sync.providers',\n    'my-plugin\u002Fdisable-collab',\n    () => []\n);\n```\n\n### Phase 9: Testing\n\n#### Skills to Invoke\n- `test-automator` - Test automation\n- `php-pro` - PHP testing\n\n#### Actions\n1. Set up PHPUnit\n2. Create unit tests\n3. Write integration tests\n4. Test with WordPress test suite\n5. Configure CI\n\n#### WordPress 7.0 Testing Priorities\n- Test RTC compatibility\n- Verify AI connector functionality\n- Validate DataViews integration\n- Test Interactivity API with watch()\n\n#### Copy-Paste Prompts\n```\nUse @test-automator to set up plugin testing\n```\n\n## Plugin Structure\n\n```\nplugin-name\u002F\n├── plugin-name.php\n├── includes\u002F\n│   ├── class-plugin.php\n│   ├── class-loader.php\n│   ├── class-activator.php\n│   └── class-deactivator.php\n├── admin\u002F\n│   ├── class-plugin-admin.php\n│   ├── css\u002F\n│   └── js\u002F\n├── public\u002F\n│   ├── class-plugin-public.php\n│   ├── css\u002F\n│   └── js\u002F\n├── blocks\u002F           # PHP-only blocks (WP 7.0)\n├── abilities\u002F        # Abilities API\n├── ai\u002F               # AI Connector integration\n├── languages\u002F\n└── vendor\u002F\n```\n\n## WordPress 7.0 Compatibility Checklist\n\n- [ ] PHP 7.4+ requirement documented\n- [ ] Post meta registered with `show_in_rest => true` for RTC\n- [ ] Meta boxes migrated to block-based UIs\n- [ ] AI Connector integration tested\n- [ ] Abilities API registered (if applicable)\n- [ ] DataViews integration tested (if applicable)\n- [ ] Interactivity API uses `watch()` not `effect`\n- [ ] Tested with iframed editor\n- [ ] Collaboration fallback works (post locking)\n\n## Quality Gates\n\n- [ ] Plugin activates without errors\n- [ ] All hooks working\n- [ ] Admin interface functional\n- [ ] Security measures implemented\n- [ ] Tests passing\n- [ ] Documentation complete\n- [ ] WordPress 7.0 compatibility verified\n\n## Related Workflow Bundles\n\n- `wordpress` - WordPress development\n- `wordpress-theme-development` - Theme development\n- `wordpress-woocommerce` - WooCommerce\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n",{"name":5,"risk":23,"source":24,"category":25,"date_added":26,"description":7},"safe","personal","granular-workflow-bundle","2026-02-27","main","d046d088ce5a79a083f0abc0fe1b7ded73bc5b1f","claude-config\u002Fskills\u002Fantigravity\u002Fwordpress-plugin-development","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent","https:\u002F\u002Fgithub.com\u002FSansar35","2026-05-10 16:04:53",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Sansar35\u002Fclaude-agent --skill wordpress-plugin-development",{"tool":39,"command":40},"bunx","bunx skills add Sansar35\u002Fclaude-agent --skill wordpress-plugin-development",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Sansar35\u002Fclaude-agent --skill wordpress-plugin-development","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fantigravity\u002Fwordpress-plugin-development\u002FSKILL.md",true,[],[48,55,62,69,76,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":18},"01M72DVAN1JYEA302MT0C5MGD6","zustand-store-ts","Create Zustand stores following established patterns with proper TypeScript types and middleware.","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzustand-store-ts\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M72DV8J5NBRRM4RPDFRV95N7","zod-validation-expert","Expert in Zod — TypeScript-first schema validation. Covers parsing, custom errors, refinements, type inference, and integration with React Hook Form, Next.js, and tRPC.","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzod-validation-expert\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":18},"01M72DV5EMHW0BHP9BZ167MDCB","zinc-database","Access ZINC (230M+ purchasable compounds). Search by ZINC ID\u002FSMILES, similarity searches, 3D-ready structures for docking, analog discovery, for virtual screening and drug discovery.","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzinc-database\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":18},"01M72DV216QY0E693ZPEVQ0DBS","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":80,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M72DTXQREMCRKA8NHCVKHN4W","zapier-workflows","Manage and trigger pre-built Zapier workflows and MCP tool orchestration. Use when user mentions workflows, Zaps, automations, daily digest, research, search, lead tracking, expenses, or asks to \"run\" any process. Also handles Perplexity-based research and Google Sheets data tracking.","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzapier-workflows\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzapier-workflows\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M72DTT17TBSJ0Y8J2XZ4C9TZ","zapier-make-patterns","No-code automation democratizes workflow building. Zapier and Make (formerly Integromat) let non-developers automate business processes without writing code. But no-code doesn't mean no-complexity - these platforms have their own patterns, pitfalls, and breaking points.  This skill covers when to use which platform, how to build reliable automations, and when to graduate to code-based solutions. Key insight: Zapier optimizes for simplicity and integrations (7000+ apps), Make optimizes for power","https:\u002F\u002Fgithub.com\u002FSansar35\u002Fclaude-agent\u002Fblob\u002Fmain\u002Fclaude-config\u002Fskills\u002Fzapier-make-patterns\u002FSKILL.md",[],[]]