skills/automattic/wp-block-development/SKILL.md
Use when developing WordPress (Gutenberg) blocks: block.json metadata, register_block_type(_from_metadata), attributes/serialization, supports, dynamic rendering (render.php/render_callback), deprecations/migrations, viewScript vs viewScriptModule, and @wordpress/scripts/@wordpress/create-block build and test workflows.
npx skillsauth add aiskillstore/marketplace wp-block-developmentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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:
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.