wp-block-development▌
wordpress/agent-skills · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
WordPress block development for Gutenberg: metadata, registration, rendering, and build workflows.
- ›Covers block creation, block.json configuration, static vs. dynamic rendering, and server-side PHP registration with register_block_type_from_metadata()
- ›Enforces apiVersion: 3 for WordPress 6.9+ compatibility, including iframe editor support and style isolation
- ›Handles attribute serialization, deprecations/migrations to prevent \"Invalid block\" errors, and inner blocks composition
- ›I
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
How to use wp-block-development on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add wp-block-development
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches wp-block-development from GitHub repository wordpress/agent-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate wp-block-development. Access the skill through slash commands (e.g., /wp-block-development) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.7★★★★★70 reviews- ★★★★★Pratham Ware· Dec 28, 2024
wp-block-development has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Sophia Taylor· Dec 28, 2024
Useful defaults in wp-block-development — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Aanya Dixit· Dec 28, 2024
wp-block-development fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Luis Jackson· Dec 24, 2024
Registry listing for wp-block-development matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Tariq Ghosh· Dec 4, 2024
wp-block-development has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Aarav Perez· Nov 19, 2024
We added wp-block-development from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Dev Chen· Nov 15, 2024
wp-block-development reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Emma Chawla· Nov 7, 2024
Useful defaults in wp-block-development — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Emma Farah· Oct 26, 2024
wp-block-development has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Chinedu Rahman· Oct 10, 2024
Solid pick for teams standardizing on skills: wp-block-development is focused, and the summary matches what you get after install.
showing 1-10 of 70