Setup & Installation
What This Skill Does
Handles WordPress Interactivity API development and debugging. Covers data-wp-* directives, store/state/actions via @wordpress/interactivity, block viewScriptModule integration, and server-side rendering with wp_interactivity_state(). Targets WordPress 6.9+ with PHP 7.2.24 or later.
Instead of manually tracing the directive-to-store pipeline across PHP, block.json, and JavaScript, this skill provides a structured checklist that covers server rendering, hydration alignment, and 6.9-specific breakages in one pass.
When to use it
- Fixing directives that are present in HTML but never fire on the frontend
- Setting up server-side state with wp_interactivity_state() to avoid layout shift on load
- Wiring a block's viewScriptModule to a store and confirming hydration works
- Migrating away from deprecated data-wp-ignore usage after the WordPress 6.9 changes
- Debugging client-side navigation issues where getServerState() returns stale values between page transitions