New advertisers: 50% off your first month with code FIRSTMONTHSee slots
wordpress avatar

Wp Block Development

Structured workflow for building WordPress Gutenberg blocks, covering block.json, registration, rendering, and migrations.

skills.sh installs
6.1K
GitHub stars
2.4K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers the full block lifecycle: scaffolding, block.json metadata, registration, edit/save or render patterns, attributes, and deprecations
  • Includes list_blocks.mjs for locating block roots and detect_wp_project.mjs for triage, plus reference guides for each step
  • Enforces apiVersion: 3 for WordPress 6.9+ and requires a deprecated entry whenever saved markup changes, to avoid "Invalid block" errors
  • Designed for plugin and theme developers building static, dynamic, or interactive blocks with @wordpress/scripts and wp-env

Install

$ npx -y skills add wordpress/agent-skills --skill wp-block-development -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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 (deprecated versions)
  • 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.json if known).
  • Target WordPress version range (especially if using modules / viewScriptModule).

Procedure

0) Triage and locate blocks

  1. Run triage:
    • node skills/wp-project-triage/scripts/detect_wp_project.mjs
  2. List blocks (deterministic scan):
    • node skills/wp-block-development/scripts/list_blocks.mjs
  3. 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)

Details

Repository
github.com/wordpress/agent-skills
Categories
PHP & Laravel, Frontend & UI Code

More from wordpress/agent-skills

All 17

Similar to Wp Block Development

More PHP & Laravel