Wp Interactivity Api
Practical guide for building and debugging WordPress Interactivity API features, covering directives, store state, and server-side rendering.
- CCM score
- 60 of 100
- skills.sh installs
- 343
- GitHub stars
- 211
- last updated
- Jun 3, 2026
Own this skill? Claim it
What it does
- Covers the full workflow: detecting existing usage, identifying stores, server-side pre-rendering, directive changes, build alignment, and debugging
- Includes reference files for server-side rendering, a directives quick reference, and debugging, plus steps for
supports.interactivityandwp_interactivity_state() - Enforces avoiding the deprecated
data-wp-ignoredirective and aligning server markup with client hydration to prevent layout shift - Designed for WordPress 6.9+ block, theme, and plugin developers working with
data-wp-*directives and@wordpress/interactivity
Install
$ npx -y skills add automattic/agent-skills --skill wp-interactivity-api -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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:
Details
- Repository
- github.com/automattic/agent-skills
- Categories
- PHP & Laravel, Frontend & UI Code
- First seen
- Jun 3, 2026
Questions
What does the wp-interactivity-api skill do?
It guides an agent building or debugging WordPress Interactivity API features, including data-wp-* directives, @wordpress/interactivity stores, state and actions, and block viewScriptModule integration. It also covers server-side rendering, hydration, and directive behavior, following procedures from SKILL.md.
How do I install the wp-interactivity-api skill?
Run npx -y skills add automattic/agent-skills --skill wp-interactivity-api -y in your project. Once installed, the agent can follow the skill's steps for detecting Interactivity API usage, defining stores, and pre-rendering initial state on the server.
Who is the wp-interactivity-api skill for?
It is for developers working on WordPress blocks, themes, or plugins that use the Interactivity API. The skill targets WordPress 6.9 and later with PHP 7.2.24 or newer, and some workflows require WP-CLI.
Where does wp-interactivity-api stand among PHP and Laravel skills?
It sits in the PHP and Laravel category and ranks in the top 100 there, alongside laravel-specialist, php-pro, laravel-patterns, laravel-verification and laravel-plugin-discovery. Its focus is WordPress frontend interactivity rather than Laravel application code.
More from automattic/agent-skills
All 12Similar to Wp Interactivity Api
More PHP & Laravelwp-block-developmentautomattic/agent-skills492 installsStep-by-step guide for developing WordPress Gutenberg blocks, from block.json metadata through rendering and migrations.
wp-abilities-apiautomattic/agent-skills313 installsDeveloper guide for registering, exposing over REST, and consuming WordPress Abilities API endpoints and categories.
progressive-hydrationpatternsdev/skills1.1K installsTeaches progressive hydration with Suspense, lazy loading, and deferred client-only widgets to improve Time to Interactive.
wp-patternsWordPress/agent-skills3K installsGuide for creating and reviewing WordPress block patterns, covering registration, block markup, theme.json design tokens, and accessibility.
wp-plugin-developmentwordpress/agent-skills9.7K installsA structured guide for WordPress plugin work covering architecture, lifecycle, settings, security, and data handling.
alpinejsbrettatoms/agent-skills267 installsPractical Alpine.js reference that keeps HTML directives short by moving logic into extracted components and stores.