wp-block-development
Skill19 starsChanged 20 days agoMITView on GitHub
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.
6 other projects use a version of this, 6 of them edited.
Adopted by
Most recently taken up by
- marcop135/wp-agent-harnessedited, first seen Oct 11, 2026
- shinobiashi/claude-skillsedited, first seen Oct 8, 2026
- zlapp/wordpress-ai-toolsedited, first seen Aug 4, 2026
- morrealev/wordpress-manageredited, first seen Mar 1, 2026
- eugenepyvovarov/mcpbundler-agent-skills-marketplaceedited, first seen Feb 15, 2026
- WordPress/agent-skillsedited, first seen Dec 23, 2025
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 6
- WordPress/agent-skills★ 2.3k97% same
- eugenepyvovarov/mcpbundler-agent-skills-marketplace★ 1297% same
- morrealev/wordpress-manager★ 893% same
- marcop135/wp-agent-harness★ 097% same
- shinobiashi/claude-skills★ 092% same
- zlapp/wordpress-ai-tools★ 097% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository120 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adaptSkill
- animateSkill
- auditSkill
- ckm:banner-designSkill
- bolderSkill
- cinematic-editorial-graphicsSkill
- colorizeSkill
- critiqueSkill
- delightSkill
- ckm:designSkill
- ckm:design-systemSkill
- desktop-app-showcaseSkill
- distillSkill
- extractSkill
- featured-image-creatorSkill
- frontend-designSkill
- hand-drawn-explainersSkill
- hardenSkill
- modern-frontend-designSkill
- monoline-iconsSkill
- normalizeSkill
- onboardSkill
- polishSkill
- quieterSkill
- saas-product-graphicsSkill
- svg-graphicsSkill
- teach-impeccableSkill
- ui-design-brainSkill
- ui-skillsSkill
- ckm:ui-stylingSkill
- ui-ux-pro-maxSkill
- elementor-to-generateblocksSkill
- figma-to-generateblocksSkill
- html-to-generateblocksSkill
- just-htmlSkill
- react-pdfSkill
- ab-test-setupSkill
- ad-creativeSkill
- ckm:brandSkill
- churn-preventionSkill
- clarifySkill
- cold-emailSkill
- competitor-alternativesSkill
- content-strategySkill
- copy-editingSkill
- copywritingSkill
- email-sequenceSkill
- form-croSkill
- free-tool-strategySkill
- launch-strategySkill
- marketing-ideasSkill
- marketing-psychologySkill
- mkbhd-voiceSkill
- omm-styleSkill
- onboarding-croSkill
- page-croSkill
- paid-adsSkill
- paywall-upgrade-croSkill
- popup-croSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. 12 are common, 0 are distinctive, and 9 are very specific to this project.
12
Common
Most of the 6 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 14
Use this skill for block work such as:
- Very specific: line 39
If this repo is a full site (wp-content/ present), be explicit about *which* plugin/theme contains the block.
- Common: line 43
If you are creating a new block, prefer scaffolding rather than hand-rolling structure:
- Very specific: line 45
Use @wordpress/create-block to scaffold a modern block/plugin setup.
- Common: line 46
If you need Interactivity API from day 1, use the interactive template.
- Common: line 65
Test in a local environment with the iframe editor enabled.
- Very specific: line 66
Ensure any style handles are included in block.json (styles missing from the iframe won't apply).
- Very specific: line 77
Prefer viewScriptModule for modern module-based view scripts where supported.
- Very specific: line 78
If you're working primarily on data-wp-* directives or stores, also use wp-interactivity-api.
- Common: line 95
Prefer PHP registration using metadata, especially when:
- Common: line 106
Follow wrapper attribute best practices:
- Common: line 118
If your block is a “container” that nests other blocks, treat Inner Blocks as a first-class feature:
- Very specific: line 120
Use useInnerBlocksProps() to integrate inner blocks with wrapper props.
- Common: line 121
Keep migrations in mind if you change inner markup.
- Very specific: line 131
avoid the deprecated meta attribute source
- Common: line 138
If you change saved markup or attributes:
- Very specific: line 140
Add a deprecated entry (newest → oldest).
- Common: line 148
Prefer whatever the repo already uses:
- Very specific: line 162
Run the repo’s lint/build/tests that triage recommends.
- Common: line 166
If something fails, start here:
- Common: line 174
If you’re uncertain about upstream behavior/version support, consult canonical docs first:
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
From Agent Skills for WordPress. Copyright (C) 2026 WordPress Contributors, licensed under GPL-2.0-or-later. Changed from upstream: the
compatibility:frontmatter line was dropped when this copy was made in March 2026, and license frontmatter plus this notice were added on 2026-10-24. See NOTICE.md.
WP Block Development
When to use
Use this skill for block work such as:
- creating a new block, or updating an existing one
- changing
block.json(scripts/styles/supports/attributes/render/viewScriptModule) - fixing “block invalid / not saving / attributes not persisting”
- adding dynamic rendering (
render.php/render_callback) - block deprecations and migrations (
deprecatedversions) - build tooling for blocks (
@wordpress/scripts,@wordpress/create-block,wp-env)
Inputs required
- Repo root and target (plugin vs theme vs full site).
- The block name/namespace and where it lives (path to
block.jsonif known). - Target WordPress version range (especially if using modules /
viewScriptModule).
Procedure
0) Triage and locate blocks
- Run triage:
node skills/wp-project-triage/scripts/detect_wp_project.mjs
- List blocks (deterministic scan):
node skills/wp-block-development/scripts/list_blocks.mjs
- Identify the block root (directory containing
block.json) you’re changing.
If this repo is a full site (wp-content/ present), be explicit about which plugin/theme contains the block.
1) Create a new block (if needed)
If you are creating a new block, prefer scaffolding rather than hand-rolling structure:
- Use
@wordpress/create-blockto scaffold a modern block/plugin setup. - If you need Interactivity API from day 1, use the interactive template.
Read:
references/creating-new-blocks.md
After scaffolding:
- Re-run the block list script and confirm the new block root.
- Continue with the remaining steps (model choice, metadata, registration, serialization).
2) Ensure apiVersion 3 (WordPress 6.9+)
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:
- WordPress 7.0 will run the post editor in an iframe regardless of block apiVersion.
- apiVersion 3 ensures your block works correctly inside the iframed editor (style isolation, viewport units, media queries).
Migration: Changing from version 2 to 3 is usually as simple as updating the apiVersion field in block.json. However:
- Test in a local environment with the iframe editor enabled.
- Ensure any style handles are included in
block.json(styles missing from the iframe won't apply). - Third-party scripts attached to a specific
windowmay have scoping issues.
Read:
references/block-json.md(apiVersion and schema details)
3) Pick the right block model
- Static block (markup saved into post content): implement
save(); keep attributes serialization stable. - Dynamic block (server-rendered): use
renderinblock.json(orrender_callbackin PHP) and keepsave()minimal ornull. - Interactive frontend behavior:
- Prefer
viewScriptModulefor modern module-based view scripts where supported. - If you're working primarily on
data-wp-*directives or stores, also usewp-interactivity-api.
- Prefer
4) Update block.json safely
Make changes in the block’s block.json, then confirm registration matches metadata.
For field-by-field guidance, read:
references/block-json.md
Common pitfalls:
- changing
namebreaks compatibility (treat it as stable API) - changing saved markup without adding
deprecatedcauses “Invalid block” - adding attributes without defining source/serialization correctly causes “attribute not saving”
5) Register the block (server-side preferred)
Prefer PHP registration using metadata, especially when:
- you need dynamic rendering
- you need translations (
wp_set_script_translations) - you need conditional asset loading
Read and apply:
references/registration.md
6) Implement edit/save/render patterns
Follow wrapper attribute best practices:
- Editor:
useBlockProps() - Static save:
useBlockProps.save() - Dynamic render (PHP):
get_block_wrapper_attributes()
Read:
references/supports-and-wrappers.mdreferences/dynamic-rendering.md(if dynamic)
7) Inner blocks (block composition)
If your block is a “container” that nests other blocks, treat Inner Blocks as a first-class feature:
- Use
useInnerBlocksProps()to integrate inner blocks with wrapper props. - Keep migrations in mind if you change inner markup.
Read:
references/inner-blocks.md
8) Attributes and serialization
Before changing attributes:
- confirm where the attribute value lives (comment delimiter vs HTML vs context)
- avoid the deprecated
metaattribute source
Read:
references/attributes-and-serialization.md
9) Migrations and deprecations (avoid "Invalid block")
If you change saved markup or attributes:
- Add a
deprecatedentry (newest → oldest). - Provide
savefor old versions and an optionalmigrateto normalize attributes.
Read:
references/deprecations.md
10) Tooling and verification commands
Prefer whatever the repo already uses:
@wordpress/scripts(common) → run existing npm scriptswp-env(common) → use for local WP + E2E
Read:
references/tooling-and-testing.md
Verification
- Block appears in inserter and inserts successfully.
- Saving + reloading does not create “Invalid block”.
- Frontend output matches expectations (static: saved markup; dynamic: server output).
- Assets load where expected (editor vs frontend).
- Run the repo’s lint/build/tests that triage recommends.
Failure modes / debugging
If 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)
Escalation
If you’re uncertain about upstream behavior/version support, consult canonical docs first:
- WordPress Developer Resources (Block Editor Handbook, Theme Handbook, Plugin Handbook)
- Gutenberg repo docs for bleeding-edge behaviors
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

