blueprint
Use when the deliverable is WordPress Playground Blueprint JSON or a Blueprint bundle, including creating, editing, reviewing, validating schema keys, choosing…
Use when building or debugging WordPress Interactivity API features (data-wp-* directives, @wordpress/interactivity store/state/actions, block viewScriptModule integration, wp_interactivity_*()) including performance, hydration, and directive behavior.
$ npx -y skills add WordPress/agent-skills --skill wp-interactivity-api --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/wp-interactivity-apiContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when building or debugging WordPress Interactivity API features (data-wp-* directives, @wordpress/interactivity store/state/actions, block viewScriptModule integration, wp_interactivity_*()) including performance, hydration, and directive behavior.
name: wp-interactivity-api description: "Use when building or debugging WordPress Interactivity API features (data-wp-* directives, @wordpress/interactivity store/state/actions, block viewScriptModule integration, wp_interactivity_*()) including performance, hydration, and directive behavior." compatibility: "Targets WordPress 7.0+ (PHP 7.4.0+). Filesystem-based agent with bash + node. Some workflows require WP-CLI."
Use this skill when the user mentions:
Search for:
Decide:
If you’re creating a new interactive block (not just debugging), prefer the official scaffold template:
Locate store definitions and confirm:
**Pre-render HTML on the server** before outputting to ensure:
For components using `block.json`, add `supports.interactivity`:
{
"supports": {
"interactivity": true
}
}For themes/plugins without `block.json`, use `wp_interactivity_process_directives()` to process directives.
Use `wp_interactivity_state()` to define initial global state:
wp_interactivity_state( 'myPlugin', array( 'items' => array( 'Apple', 'Banana', 'Cherry' ), 'hasItems' => true, ));
For local context, use `wp_interactivity_data_wp_context()`:
<?php $context = array( 'isOpen' => false ); ?> <div <?php echo wp_interactivity_data_wp_context( $context ); ?>> ... </div>
When derived state affects initial HTML rendering, replicate the logic in PHP:
wp_interactivity_state( 'myPlugin', array(
'items' => array( 'Apple', 'Banana' ),
'hasItems' => function() {
$state = wp_interactivity_state();
return count( $state['items'] ) > 0;
}
));This ensures directives like `data-wp-bind--hidden="!state.hasItems"` render correctly on first load.
For detailed examples and patterns, see `references/server-side-rendering.md`.
When touching markup directives:
**WordPress 6.9 changes:**
For quick directive reminders, see `references/directives-quickref.md`.
Verify the repo supports the required module build path:
If “nothing happens” on interaction:
See `references/debugging.md`.
Teach AI coding assistants how to build WordPress the right way. Agent Skills are portable bundles of instructions, checklists, and scripts that help AI assistants (Claude, Copilot, Codex, Cursor, etc.)
Repo: WordPress/agent-skills
Use when the deliverable is WordPress Playground Blueprint JSON or a Blueprint bundle, including creating, editing, reviewing, validating schema keys, choosing…
Use when the user asks about WordPress codebases (plugins, themes, block themes, Gutenberg blocks, WP core checkouts) and you need to quickly classify the repo…
Use when working with the WordPress Abilities API (wp_register_ability, wp_register_ability_category, /wp-json/wp-abilities/v1/*, @wordpress/abilities)…
Audit a WordPress plugin's REST surface and produce a standardized audit document proposing Abilities API registrations. Produces a markdown doc with a YAML…
Verify a WordPress plugin's Abilities API registrations: enumerate abilities, check that callback behavior matches each annotation's claim (the adversarial…
Use when developing WordPress (Gutenberg) blocks: block.json metadata, register_block_type(_from_metadata), attributes/serialization, supports, dynamic…