Develops WordPress Gutenberg blocks: block.json metadata/attributes, dynamic rendering (render.php), deprecations/migrations, view scripts, and @wordpress/scripts/@wordpress/create-block workflows.
npx claudepluginhub joshuarweaver/cascade-code-general-misc-4 --plugin wordpress-agent-skills-9This skill uses the workspace's default tool permissions.
Use this skill for block work such as:
references/attributes-and-serialization.mdreferences/block-json.mdreferences/creating-new-blocks.mdreferences/debugging.mdreferences/deprecations.mdreferences/dynamic-rendering.mdreferences/inner-blocks.mdreferences/registration.mdreferences/supports-and-wrappers.mdreferences/tooling-and-testing.mdscripts/list_blocks.mjsSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Use this skill for block work such as:
block.json (scripts/styles/supports/attributes/render/viewScriptModule)render.php / render_callback)deprecated versions)@wordpress/scripts, @wordpress/create-block, wp-env)block.json if known).viewScriptModule).node skills/wp-project-triage/scripts/detect_wp_project.mjsnode skills/wp-block-development/scripts/list_blocks.mjsblock.json) you’re changing.If this repo is a full site (wp-content/ present), be explicit about which plugin/theme contains the block.
If you are creating a new block, prefer scaffolding rather than hand-rolling structure:
@wordpress/create-block to scaffold a modern block/plugin setup.Read:
references/creating-new-blocks.mdAfter scaffolding:
WordPress 6.9 enforces apiVersion: 3 in the block.json schema. Blocks with apiVersion 2 or lower trigger console warnings when SCRIPT_DEBUG is enabled.
Why this matters:
Migration: Changing from version 2 to 3 is usually as simple as updating the apiVersion field in block.json. However:
block.json (styles missing from the iframe won't apply).window may have scoping issues.Read:
references/block-json.md (apiVersion and schema details)save(); keep attributes serialization stable.render in block.json (or render_callback in PHP) and keep save() minimal or null.viewScriptModule for modern module-based view scripts where supported.data-wp-* directives or stores, also use wp-interactivity-api.block.json safelyMake changes in the block’s block.json, then confirm registration matches metadata.
For field-by-field guidance, read:
references/block-json.mdCommon pitfalls:
name breaks compatibility (treat it as stable API)deprecated causes “Invalid block”Prefer PHP registration using metadata, especially when:
wp_set_script_translations)Read and apply:
references/registration.mdFollow wrapper attribute best practices:
useBlockProps()useBlockProps.save()get_block_wrapper_attributes()Read:
references/supports-and-wrappers.mdreferences/dynamic-rendering.md (if dynamic)If your block is a “container” that nests other blocks, treat Inner Blocks as a first-class feature:
useInnerBlocksProps() to integrate inner blocks with wrapper props.Read:
references/inner-blocks.mdBefore changing attributes:
meta attribute sourceRead:
references/attributes-and-serialization.mdIf you change saved markup or attributes:
deprecated entry (newest → oldest).save for old versions and an optional migrate to normalize attributes.Read:
references/deprecations.mdPrefer whatever the repo already uses:
@wordpress/scripts (common) → run existing npm scriptswp-env (common) → use for local WP + E2ERead:
references/tooling-and-testing.mdIf something fails, start here:
references/debugging.md (common failures + fastest checks)references/attributes-and-serialization.md (attributes not saving)references/deprecations.md (invalid block after change)If you’re uncertain about upstream behavior/version support, consult canonical docs first: