Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 79% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 97% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 68% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 120% | 0% |
Specialized 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.
sync.providers filtershow_in_rest => truewp_ai_client_prompt()/wp-json/abilities/v1/manifestUse this workflow when:
app-builder - Project scaffoldingbackend-dev-guidelines - Backend patternsphp/* Plugin Name: My Plugin Plugin URI: https://example.com/my-plugin Description: A WordPress 7.0 compatible plugin with AI and RTC support Version: 1.0.0 Requires at least: 6.0 Requires PHP: 7.4 Author: Developer Name License: GPL2+ */
Use @app-builder to scaffold a new WordPress pluginbackend-dev-guidelines - Architecture patternsUse @backend-dev-guidelines to design plugin architecturewordpress-penetration-testing - WordPress patternsUse @wordpress-penetration-testing to understand WordPress hooksfrontend-developer - Admin UIjavascriptimport { DataViews } from '@wordpress/dataviews'; const MyPluginDataView = () => { const data = [/* records */]; const fields = [ { id: 'title', label: 'Title', sortable: true }, { id: 'status', label: 'Status', filterBy: true } ]; const view = { type: 'table', perPage: 10, sort: { field: 'title', direction: 'asc' } }; return ( <DataViews data={data} fields={fields} view={view} onChangeView={handleViewChange} /> ); };
Use @frontend-developer to create WordPress admin interfacedatabase-design - Database designpostgresql - Database patternsphp// Register meta for Real-Time Collaboration register_post_meta('post', 'my_custom_field', [ 'type' => 'string', 'single' => true, 'show_in_rest' => true, // Required for RTC 'sanitize_callback' => 'sanitize_text_field', ]); // For WP 7.0, also consider: register_term_meta('category', 'my_term_field', [ 'type' => 'string', 'show_in_rest' => true, ]);
Use @database-design to design plugin database schemaapi-design-principles - API designapi-patterns - API patternsUse @api-design-principles to create WordPress REST API endpointswordpress-penetration-testing - WordPress securitysecurity-scanning-security-sast - Security scanningUse @wordpress-penetration-testing to audit plugin securityapi-design-principles - AI integrationbackend-dev-guidelines - Block developmentphp// Using WordPress 7.0 AI Connector add_action('save_post', 'my_plugin_generate_ai_summary', 10, 2); function my_plugin_generate_ai_summary($post_id, $post) { if (wp_is_post_autosave($post_id) || wp_is_post_revision($post_id)) { return; } // Check if AI client is available if (!function_exists('wp_ai_client_prompt')) { return; } $content = strip_tags($post->post_content); if (empty($content)) { return; } // Build prompt - direct string concatenation for input $result = wp_ai_client_prompt( 'Create a compelling 2-sentence summary for social media: ' . substr($content, 0, 1000) ); if (is_wp_error($result)) { return; } // Set temperature for consistent output $result->using_temperature(0.3); $summary = $result->generate_text(); if ($summary && !is_wp_error($summary)) { update_post_meta($post_id, '_ai_summary', sanitize_textarea_field($summary)); } }
php// Register ability categories on their own hook add_action('wp_abilities_api_categories_init', function() { wp_register_ability_category('content-creation', [ 'label' => __('Content Creation', 'my-plugin'), 'description' => __('Abilities for generating and managing content', 'my-plugin'), ]); }); // Register abilities on their own hook add_action('wp_abilities_api_init', function() { wp_register_ability('my-plugin/generate-summary', [ 'label' => __('Generate Summary', 'my-plugin'), 'description' => __('Creates an AI-powered summary of content', 'my-plugin'), 'category' => 'content-creation', 'input_schema' => [ 'type' => 'object', 'properties' => [ 'content' => ['type' => 'string'], 'length' => ['type' => 'integer', 'default' => 2] ], 'required' => ['content'] ], 'output_schema' => [ 'type' => 'object', 'properties' => [ 'summary' => ['type' => 'string'] ] ], 'execute_callback' => 'my_plugin_generate_summary_cb', 'permission_callback' => function() { return current_user_can('edit_posts'); } ]); }); // Handler callback function my_plugin_generate_summary_cb($input) { $content = isset($input['content']) ? $input['content'] : ''; $length = isset($input['length']) ? absint($input['length']) : 2; if (empty($content)) { return new WP_Error('empty_content', 'No content provided'); } if (!function_exists('wp_ai_client_prompt')) { return new WP_Error('ai_unavailable', 'AI not available'); } $prompt = sprintf('Create a %d-sentence summary of: %s', $length, substr($content, 0, 2000)); $result = wp_ai_client_prompt($prompt) ->using_temperature(0.3) ->generate_text(); if (is_wp_error($result)) { return $result; } return ['summary' => sanitize_textarea_field($result)]; }
php// Register block entirely in PHP (WordPress 7.0) // Note: For full PHP-only blocks, use block.json with PHP render_callback // First, create a block.json file in build/ or includes/blocks/ // Then register in PHP: // Simple PHP-only block registration (WordPress 7.0+) if (function_exists('register_block_type')) { register_block_type('my-plugin/featured-post', [ 'render_callback' => function($attributes, $content, $block) { $post_id = isset($attributes['postId']) ? absint($attributes['postId']) : 0; if (!$post_id) { $post_id = get_the_ID(); } $post = get_post($post_id); if (!$post) { return ''; } $title = esc_html($post->post_title); $excerpt = esc_html(get_the_excerpt($post)); return sprintf( '<div class="featured-post"><h2>%s</h2><p>%s</p></div>', $title, $excerpt ); }, 'attributes' => [ 'postId' => ['type' => 'integer', 'default' => 0], 'showExcerpt' => ['type' => 'boolean', 'default' => true] ], ]); }
javascript// Disable RTC for specific post types import { addFilter } from '@wordpress/hooks'; addFilter( 'sync.providers', 'my-plugin/disable-collab', () => [] );
test-automator - Test automationphp-pro - PHP testingUse @test-automator to set up plugin testingplugin-name/
├── plugin-name.php
├── includes/
│ ├── class-plugin.php
│ ├── class-loader.php
│ ├── class-activator.php
│ └── class-deactivator.php
├── admin/
│ ├── class-plugin-admin.php
│ ├── css/
│ └── js/
├── public/
│ ├── class-plugin-public.php
│ ├── css/
│ └── js/
├── blocks/ # PHP-only blocks (WP 7.0)
├── abilities/ # Abilities API
├── ai/ # AI Connector integration
├── languages/
└── vendor/show_in_rest => true for RTCwatch() not effectwordpress - WordPress developmentwordpress-theme-development - Theme developmentwordpress-woocommerce - WooCommerceOther measured skills in the registry, with their headline benchmark lift.