
Wp Interactivity Api
This one's built for anyone wrestling with WordPress's Interactivity API, the data-wp-* directive system that powers modern interactive blocks. It walks you through the full stack: detecting existing usage, wiring up stores and actions, server-side rendering with wp_interactivity_state() to avoid hydration flicker, and debugging when directives just sit there doing nothing. The guidance on PHP-side derived state is especially solid, it prevents that annoying layout shift when something like a visibility toggle depends on computed values. Covers WordPress 6.9 changes too, including the deprecation of data-wp-ignore and new async action types. If you're building or fixing interactive blocks and keep Googling hydration problems, this will save you hours.
- skills.sh installs
- 4.5K
- GitHub stars
- 2.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add wordpress/agent-skills --skill wp-interactivity-api --agent claude-codeInstalls into .claude/skills of the current project.
Files
WP Interactivity API
When to use
Use this skill when the user mentions:
- Interactivity API,
@wordpress/interactivity, data-wp-interactive,data-wp-on--*,data-wp-bind--*,data-wp-context,- block
viewScriptModule/ module-based view scripts, - hydration issues or “directives don’t fire”.
Inputs required
- Repo root + triage output (
wp-project-triage). - Which block/theme/plugin surfaces are affected (frontend, editor, both).
- Any constraints: WP version, whether modules are supported in the build.
Procedure
1) Detect existing usage + integration style
Search for:
data-wp-interactive@wordpress/interactivityviewScriptModule
Decide:
- Is this a block providing interactivity via
block.jsonview script module? - Is this theme-level interactivity?
- Is this plugin-side “enhance existing markup” usage?
If you’re creating a new interactive block (not just debugging), prefer the official scaffold template:
@wordpress/create-block-interactive-template(via@wordpress/create-block)
2) Identify the store(s)
Locate store definitions and confirm:
Sponsors
Details
- Repository
- github.com/wordpress/agent-skills
- Categories
- Backend & APIs, AI & Agent Building, Debugging, PHP & Laravel
- First seen
- Apr 16, 2026
More from wordpress/agent-skills
All 17- Wpds4.3K
- Blueprint4K
- Wp Plugin Directory Guidelines3.9K
- Wp Abilities Audit2.9K
- Wp Abilities Verify2.8K
- Wp Plugin Development8.6K
- Wp Performance6.7K
- Wp Rest Api6.3K
- Wp Block Themes6.3K
- Wordpress Router6K
- Wp Wpcli And Ops6K
- Wp Project Triage5.9K
- Wp Block Development5.9K
- Wp Playground5.1K
- Wp Phpstan4.9K
- Wp Abilities Api4.6K