[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GDMWEV2P3TZJ8NHTHQTESP":3,"skill-same:01M6GDMWEV2P3TZJ8NHTHQTESP":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":26,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":58,"ownerHtmlUrl":59,"ownerBlogUrl":6,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M6GDMWEV2P3TZJ8NHTHQTESP","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.","Sam-06060\u002Fjarvis-assistant","Sam-06060","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F208600848?v=4","01M6CRKT7C7FXD21V6HXF293S0","Samson Frank Ganta","01M6CRKTBEKYFD8YX5Z1GT99EE",6,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fwordpress-plugin-development\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"wordpress plugin development","wordpress","plugin","development","wordpress plugin","security best practices","time","development workflow","hooks","only","plugin architecture","api","real-time","personal","best practices","collaboration","architecture","workflow","security","safe","2026-11-10 10:12:30",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","# 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",{"name":5,"risk":46,"source":40,"category":52,"date_added":53,"description":7},"granular-workflow-bundle","2026-02-27","main","a50a3aa6b39fb0e1b7db88bef1bfc9c93606e126","modules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fwordpress-plugin-development",0,"https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant","https:\u002F\u002Fgithub.com\u002FSam-06060","Mobile Application Developer | Kotlin | Flutter, KMP, Swfit, Android,Swift UI | Building at Saar It Resources | Creator of Jarvis (AI Assistant)","2026-06-23 05:13:38",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add Sam-06060\u002Fjarvis-assistant --skill wordpress-plugin-development",{"tool":68,"command":69},"bunx","bunx skills add Sam-06060\u002Fjarvis-assistant --skill wordpress-plugin-development",{"tool":71,"command":72},"pnpm","pnpm dlx skills add Sam-06060\u002Fjarvis-assistant --skill wordpress-plugin-development","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fwordpress-plugin-development\u002FSKILL.md",true,[],[77,88,105,130,149,175],{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":85,"publishedAt":47},"01M6GDRVS6FXX3ESH0C9DW01C0","test_skill","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fscratch\u002Ftest_skill\u002FSKILL.md",[82],{"categoryNo":83,"categoryName":84,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",[86,87],"Test Skill","test",{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":47},"01M6GDRQ40HX22MA6XWC31RHHK","zustand-store-ts","Create Zustand stores following established patterns with proper TypeScript types and middleware.","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fzustand-store-ts\u002FSKILL.md",[],[95,96,97,98,99,100,101,102,103,104],"zustand store ts","zustand","store","with","types","middleware","patterns","community","create","typescript",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":112,"publishedAt":47},"01M6GDRKEA0WE670SPFWX5GKCN","zoom-automation","Automate Zoom meeting creation, management, recordings, webinars, and participant tracking via Rube MCP (Composio). Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fzoom-automation\u002FSKILL.md",[111],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[113,114,115,116,117,118,119,120,121,122,123,124,125,126,102,127,128,129],"automation","zoom automation","zoom","first","Tools","search","MCP","via","meeting","automate","critical","creation","webinars","composio","recordings","management","tracking",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":137,"publishedAt":47},"01M6GDRFS1452PC71JQ38S24HR","zoho-crm-automation","Automate Zoho CRM tasks via Rube MCP (Composio): create\u002Fupdate records, search contacts, manage leads, and convert leads. Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fzoho-crm-automation\u002FSKILL.md",[136],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[138,113,139,140,141,142,143,102,118,144,126,145,123,122,117,146,103,147,119,148],"crm automation","zoho crm","crm","zoho crm automation","zoho","leads","contacts","records","update","tasks","manage",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":158,"publishedAt":47},"01M6GDRCKQBAVTGHX5XBH26KPZ","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\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fzod-validation-expert\u002FSKILL.md",[155],{"categoryNo":156,"categoryName":157,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[159,160,161,162,163,104,46,164,165,166,167,168,98,169,170,171,172,102,173,174],"expert","zod","zod validation expert","validation","react","parsing","errors","schema validation","react hook form","hook","trpc","form","type","next","schema","Next.js",{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":182,"publishedAt":47},"01M6GDR658B08K4MY0RWD4A6EH","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fzeroize-audit\u002FSKILL.md",[181],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[183,184,185,186,187,188,189,190,102,191,192,193,194,195,196,197,198,199,200,119],"zeroize audit","audit","write","passwords","get","project","c++","activate","assembly","read","Bash","secrets","analysis","data","flow","verification","code","rust"]