[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72WKGZZNNHEF6F4Q8FD8NMA":3,"skill-same:01M72WKGZZNNHEF6F4Q8FD8NMA":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M72WKGZZNNHEF6F4Q8FD8NMA","wp-interactivity-api",null,"Use when building or debugging WordPress Interactivity API features (data-wp-* directives, @wordpress\u002Finteractivity store\u002Fstate\u002Factions, block viewScriptModule integration, wp_interactivity_*()) including performance, hydration, and directive behavior.","procyon-creative\u002Fwp-dario-provider","procyon-creative","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F108539561?v=4","01M72WGVJQCTY3JENE9DDREJ61","Procyon Creative","01M72WGVKC11SWCNQBV05FHJ6D",0,"GPL-2.0","https:\u002F\u002Fgithub.com\u002Fprocyon-creative\u002Fwp-dario-provider\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwp-interactivity-api\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: wp-interactivity-api\ndescription: \"Use when building or debugging WordPress Interactivity API features (data-wp-* directives, @wordpress\u002Finteractivity store\u002Fstate\u002Factions, block viewScriptModule integration, wp_interactivity_*()) including performance, hydration, and directive behavior.\"\ncompatibility: \"Targets WordPress 7.0+ (PHP 7.4.0+). Filesystem-based agent with bash + node. Some workflows require WP-CLI.\"\n---\n\n# WP Interactivity API\n\n## When to use\n\nUse this skill when the user mentions:\n\n- Interactivity API, `@wordpress\u002Finteractivity`,\n- `data-wp-interactive`, `data-wp-on--*`, `data-wp-bind--*`, `data-wp-context`,\n- block `viewScriptModule` \u002F module-based view scripts,\n- hydration issues or “directives don’t fire”.\n\n## Inputs required\n\n- Repo root + triage output (`wp-project-triage`).\n- Which block\u002Ftheme\u002Fplugin surfaces are affected (frontend, editor, both).\n- Any constraints: WP version, whether modules are supported in the build.\n\n## Procedure\n\n### 1) Detect existing usage + integration style\n\nSearch for:\n\n- `data-wp-interactive`\n- `@wordpress\u002Finteractivity`\n- `viewScriptModule`\n\nDecide:\n\n- Is this a block providing interactivity via `block.json` view script module?\n- Is this theme-level interactivity?\n- Is this plugin-side “enhance existing markup” usage?\n\nIf you’re creating a new interactive block (not just debugging), prefer the official scaffold template:\n\n- `@wordpress\u002Fcreate-block-interactive-template` (via `@wordpress\u002Fcreate-block`)\n\n### 2) Identify the store(s)\n\nLocate store definitions and confirm:\n\n- state shape,\n- actions (mutations),\n- callbacks\u002Fevent handlers used by `data-wp-on--*`.\n\n### 3) Server-side rendering (best practice)\n\n**Pre-render HTML on the server** before outputting to ensure:\n\n- Correct initial state in the HTML before JavaScript loads (no layout shift).\n- SEO benefits and faster perceived load time.\n- Seamless hydration when the client-side JavaScript takes over.\n\n#### Enable server directive processing\n\nFor components using `block.json`, add `supports.interactivity`:\n\n```json\n{\n  \"supports\": {\n    \"interactivity\": true\n  }\n}\n```\n\nFor themes\u002Fplugins without `block.json`, use `wp_interactivity_process_directives()` to process directives.\n\n#### Initialize state\u002Fcontext in PHP\n\nUse `wp_interactivity_state()` to define initial global state:\n\n```php\nwp_interactivity_state( 'myPlugin', array(\n  'items'    => array( 'Apple', 'Banana', 'Cherry' ),\n  'hasItems' => true,\n));\n```\n\nFor local context, use `wp_interactivity_data_wp_context()`:\n\n```php\n\u003C?php\n$context = array( 'isOpen' => false );\n?>\n\u003Cdiv \u003C?php echo wp_interactivity_data_wp_context( $context ); ?>>\n  ...\n\u003C\u002Fdiv>\n```\n\n#### Define derived state in PHP\n\nWhen derived state affects initial HTML rendering, replicate the logic in PHP:\n\n```php\nwp_interactivity_state( 'myPlugin', array(\n  'items'    => array( 'Apple', 'Banana' ),\n  'hasItems' => function() {\n    $state = wp_interactivity_state();\n    return count( $state['items'] ) > 0;\n  }\n));\n```\n\nThis ensures directives like `data-wp-bind--hidden=\"!state.hasItems\"` render correctly on first load.\n\nFor detailed examples and patterns, see `references\u002Fserver-side-rendering.md`.\n\n### 4) Implement or change directives safely\n\nWhen touching markup directives:\n\n- keep directive usage minimal and scoped,\n- prefer stable data attributes that map clearly to store state,\n- ensure server-rendered markup + client hydration align.\n\n**WordPress 6.9 changes:**\n\n- **`data-wp-ignore` is deprecated** and will be removed in future versions. It broke context inheritance and caused issues with client-side navigation. Avoid using it.\n- **Unique directive IDs**: Multiple directives of the same type can now exist on one element using the `---` separator (e.g., `data-wp-on--click---plugin-a=\"...\"` and `data-wp-on--click---plugin-b=\"...\"`).\n- **New TypeScript types**: `AsyncAction\u003CReturnType>` and `TypeYield\u003CT>` help with async action typing.\n\nFor quick directive reminders, see `references\u002Fdirectives-quickref.md`.\n\n### 5) Build\u002Ftooling alignment\n\nVerify the repo supports the required module build path:\n\n- if it uses `@wordpress\u002Fscripts`, prefer its conventions.\n- if it uses custom bundling, confirm module output is supported.\n\n### 6) Debug common failure modes\n\nIf “nothing happens” on interaction:\n\n- confirm the `viewScriptModule` is enqueued\u002Floaded,\n- confirm the DOM element has `data-wp-interactive`,\n- confirm the store namespace matches the directive’s value,\n- confirm there are no JS errors before hydration.\n\nSee `references\u002Fdebugging.md`.\n\n## Verification\n\n- `wp-project-triage` indicates `signals.usesInteractivityApi: true` after your change (if applicable).\n- Manual smoke test: directive triggers and state updates as expected.\n- If tests exist: add\u002Fextend Playwright E2E around the interaction path.\n\n## Failure modes \u002F debugging\n\n- Directives present but inert:\n  - view script not loading, wrong module entrypoint, or missing `data-wp-interactive`.\n- Hydration mismatch \u002F flicker:\n  - server markup differs from client expectations; simplify or align initial state.\n  - derived state not defined in PHP: use `wp_interactivity_state()` with closures.\n- Initial content missing or wrong:\n  - `supports.interactivity` not set in `block.json` (for blocks).\n  - `wp_interactivity_process_directives()` not called (for themes\u002Fplugins).\n  - state\u002Fcontext not initialized in PHP before render.\n- Layout shift on load:\n  - derived state like `state.hasItems` missing on server, causing `hidden` attribute to be absent.\n- Performance regressions:\n  - overly broad interactive roots; scope interactivity to smaller subtrees.\n- Client-side navigation issues (WordPress 6.9):\n  - `getServerState()` and `getServerContext()` now reset between page transitions—ensure your code doesn't assume stale values persist.\n  - Router regions now support `attachTo` for rendering overlays (modals, pop-ups) dynamically.\n\n## Escalation\n\n- If repo build constraints are unclear, ask: \"Is this using `@wordpress\u002Fscripts` or a custom bundler (webpack\u002Fvite)?\"\n- Consult:\n  - `references\u002Fserver-side-rendering.md`\n  - `references\u002Fdirectives-quickref.md`\n  - `references\u002Fdebugging.md`\n","# WP Interactivity API\n\n## When to use\n\nUse this skill when the user mentions:\n\n- Interactivity API, `@wordpress\u002Finteractivity`,\n- `data-wp-interactive`, `data-wp-on--*`, `data-wp-bind--*`, `data-wp-context`,\n- block `viewScriptModule` \u002F module-based view scripts,\n- hydration issues or “directives don’t fire”.\n\n## Inputs required\n\n- Repo root + triage output (`wp-project-triage`).\n- Which block\u002Ftheme\u002Fplugin surfaces are affected (frontend, editor, both).\n- Any constraints: WP version, whether modules are supported in the build.\n\n## Procedure\n\n### 1) Detect existing usage + integration style\n\nSearch for:\n\n- `data-wp-interactive`\n- `@wordpress\u002Finteractivity`\n- `viewScriptModule`\n\nDecide:\n\n- Is this a block providing interactivity via `block.json` view script module?\n- Is this theme-level interactivity?\n- Is this plugin-side “enhance existing markup” usage?\n\nIf you’re creating a new interactive block (not just debugging), prefer the official scaffold template:\n\n- `@wordpress\u002Fcreate-block-interactive-template` (via `@wordpress\u002Fcreate-block`)\n\n### 2) Identify the store(s)\n\nLocate store definitions and confirm:\n\n- state shape,\n- actions (mutations),\n- callbacks\u002Fevent handlers used by `data-wp-on--*`.\n\n### 3) Server-side rendering (best practice)\n\n**Pre-render HTML on the server** before outputting to ensure:\n\n- Correct initial state in the HTML before JavaScript loads (no layout shift).\n- SEO benefits and faster perceived load time.\n- Seamless hydration when the client-side JavaScript takes over.\n\n#### Enable server directive processing\n\nFor components using `block.json`, add `supports.interactivity`:\n\n```json\n{\n  \"supports\": {\n    \"interactivity\": true\n  }\n}\n```\n\nFor themes\u002Fplugins without `block.json`, use `wp_interactivity_process_directives()` to process directives.\n\n#### Initialize state\u002Fcontext in PHP\n\nUse `wp_interactivity_state()` to define initial global state:\n\n```php\nwp_interactivity_state( 'myPlugin', array(\n  'items'    => array( 'Apple', 'Banana', 'Cherry' ),\n  'hasItems' => true,\n));\n```\n\nFor local context, use `wp_interactivity_data_wp_context()`:\n\n```php\n\u003C?php\n$context = array( 'isOpen' => false );\n?>\n\u003Cdiv \u003C?php echo wp_interactivity_data_wp_context( $context ); ?>>\n  ...\n\u003C\u002Fdiv>\n```\n\n#### Define derived state in PHP\n\nWhen derived state affects initial HTML rendering, replicate the logic in PHP:\n\n```php\nwp_interactivity_state( 'myPlugin', array(\n  'items'    => array( 'Apple', 'Banana' ),\n  'hasItems' => function() {\n    $state = wp_interactivity_state();\n    return count( $state['items'] ) > 0;\n  }\n));\n```\n\nThis ensures directives like `data-wp-bind--hidden=\"!state.hasItems\"` render correctly on first load.\n\nFor detailed examples and patterns, see `references\u002Fserver-side-rendering.md`.\n\n### 4) Implement or change directives safely\n\nWhen touching markup directives:\n\n- keep directive usage minimal and scoped,\n- prefer stable data attributes that map clearly to store state,\n- ensure server-rendered markup + client hydration align.\n\n**WordPress 6.9 changes:**\n\n- **`data-wp-ignore` is deprecated** and will be removed in future versions. It broke context inheritance and caused issues with client-side navigation. Avoid using it.\n- **Unique directive IDs**: Multiple directives of the same type can now exist on one element using the `---` separator (e.g., `data-wp-on--click---plugin-a=\"...\"` and `data-wp-on--click---plugin-b=\"...\"`).\n- **New TypeScript types**: `AsyncAction\u003CReturnType>` and `TypeYield\u003CT>` help with async action typing.\n\nFor quick directive reminders, see `references\u002Fdirectives-quickref.md`.\n\n### 5) Build\u002Ftooling alignment\n\nVerify the repo supports the required module build path:\n\n- if it uses `@wordpress\u002Fscripts`, prefer its conventions.\n- if it uses custom bundling, confirm module output is supported.\n\n### 6) Debug common failure modes\n\nIf “nothing happens” on interaction:\n\n- confirm the `viewScriptModule` is enqueued\u002Floaded,\n- confirm the DOM element has `data-wp-interactive`,\n- confirm the store namespace matches the directive’s value,\n- confirm there are no JS errors before hydration.\n\nSee `references\u002Fdebugging.md`.\n\n## Verification\n\n- `wp-project-triage` indicates `signals.usesInteractivityApi: true` after your change (if applicable).\n- Manual smoke test: directive triggers and state updates as expected.\n- If tests exist: add\u002Fextend Playwright E2E around the interaction path.\n\n## Failure modes \u002F debugging\n\n- Directives present but inert:\n  - view script not loading, wrong module entrypoint, or missing `data-wp-interactive`.\n- Hydration mismatch \u002F flicker:\n  - server markup differs from client expectations; simplify or align initial state.\n  - derived state not defined in PHP: use `wp_interactivity_state()` with closures.\n- Initial content missing or wrong:\n  - `supports.interactivity` not set in `block.json` (for blocks).\n  - `wp_interactivity_process_directives()` not called (for themes\u002Fplugins).\n  - state\u002Fcontext not initialized in PHP before render.\n- Layout shift on load:\n  - derived state like `state.hasItems` missing on server, causing `hidden` attribute to be absent.\n- Performance regressions:\n  - overly broad interactive roots; scope interactivity to smaller subtrees.\n- Client-side navigation issues (WordPress 6.9):\n  - `getServerState()` and `getServerContext()` now reset between page transitions—ensure your code doesn't assume stale values persist.\n  - Router regions now support `attachTo` for rendering overlays (modals, pop-ups) dynamically.\n\n## Escalation\n\n- If repo build constraints are unclear, ask: \"Is this using `@wordpress\u002Fscripts` or a custom bundler (webpack\u002Fvite)?\"\n- Consult:\n  - `references\u002Fserver-side-rendering.md`\n  - `references\u002Fdirectives-quickref.md`\n  - `references\u002Fdebugging.md`\n",{"name":5,"description":7,"compatibility":24},"Targets WordPress 7.0+ (PHP 7.4.0+). Filesystem-based agent with bash + node. Some workflows require WP-CLI.","main","f817b1049ffbf34e5609b8222a18dd91365c08fc",".agents\u002Fskills\u002Fwp-interactivity-api","https:\u002F\u002Fgithub.com\u002Fprocyon-creative\u002Fwp-dario-provider","https:\u002F\u002Fgithub.com\u002Fprocyon-creative","procyoncreative.com","2026-10-08 08:08:11",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add procyon-creative\u002Fwp-dario-provider --skill wp-interactivity-api",{"tool":38,"command":39},"bunx","bunx skills add procyon-creative\u002Fwp-dario-provider --skill wp-interactivity-api",{"tool":41,"command":42},"pnpm","pnpm dlx skills add procyon-creative\u002Fwp-dario-provider --skill wp-interactivity-api","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fprocyon-creative\u002Fwp-dario-provider\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwp-interactivity-api\u002FSKILL.md",true,[46,52,56],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fdebugging.md","REFERENCE","参考文档",1371,"https:\u002F\u002Fgithub.com\u002Fprocyon-creative\u002Fwp-dario-provider\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwp-interactivity-api\u002Freferences\u002Fdebugging.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fdirectives-quickref.md",1163,"https:\u002F\u002Fgithub.com\u002Fprocyon-creative\u002Fwp-dario-provider\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwp-interactivity-api\u002Freferences\u002Fdirectives-quickref.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fserver-side-rendering.md",7733,"https:\u002F\u002Fgithub.com\u002Fprocyon-creative\u002Fwp-dario-provider\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwp-interactivity-api\u002Freferences\u002Fserver-side-rendering.md",[61,68,75,82,89,96],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M72WMR8AJ6E3XP3BPW1RVZ6Y","writing-shape","Writing, exploit: shape raw material into an article, paragraph by paragraph.","https:\u002F\u002Fgithub.com\u002Fprocyon-creative\u002Fwp-dario-provider\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-shape\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M72WMQ162SMJ423XYP93VK0G","writing-fragments","Writing, explore: mine raw fragments, no structure yet.","https:\u002F\u002Fgithub.com\u002Fprocyon-creative\u002Fwp-dario-provider\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-fragments\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M72WMN27YT9F31ZTTRZ898NN","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fprocyon-creative\u002Fwp-dario-provider\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M72WMKJEJQXHR67PW7KEE5YB","writing-beats","Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.","https:\u002F\u002Fgithub.com\u002Fprocyon-creative\u002Fwp-dario-provider\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-beats\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M72WMHMM3GQD4P2TJ3EQQCC5","wpds","Use when building UIs leveraging the WordPress Design System (WPDS) and its components, tokens, patterns, etc.","https:\u002F\u002Fgithub.com\u002Fprocyon-creative\u002Fwp-dario-provider\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwpds\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M72WMECG0CCPPSQ1BTCFWY7E","wp-wpcli-and-ops","Use when working with WP-CLI (wp) for WordPress operations: safe search-replace, db export\u002Fimport, plugin\u002Ftheme\u002Fuser\u002Fcontent management, cron, cache flushing, multisite, and scripting\u002Fautomation with wp-cli.yml.","https:\u002F\u002Fgithub.com\u002Fprocyon-creative\u002Fwp-dario-provider\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwp-wpcli-and-ops\u002FSKILL.md",[],[]]