Skip to content
automattic avatar

Wp Block Development

Step-by-step guide for developing WordPress Gutenberg blocks, from block.json metadata through rendering and migrations.

CCM score
54 of 100
skills.sh installs
492
GitHub stars
211
last updated
Jun 3, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers block creation, block.json changes, server registration, edit/save/render patterns, inner blocks, attributes, and deprecations
  • Includes a triage step, a block scan via list_blocks.mjs, and reference guides for each stage of block work
  • Enforces apiVersion: 3 for WordPress 6.9+ and warns that changing saved markup without a deprecated entry causes "Invalid block"
  • Designed for plugin and theme developers building static, dynamic, or interactive blocks with @wordpress/scripts and wp-env

Install

$ npx -y skills add automattic/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/automattic/agent-skills
Categories
PHP & Laravel, Frontend & UI Code
First seen
Jun 3, 2026

Questions

What does the wp-block-development skill help with?

It guides an agent through WordPress Gutenberg block work, including block.json metadata, attributes and serialization, dynamic rendering with render.php or render_callback, and deprecations and migrations. It also covers the @wordpress/scripts and @wordpress/create-block build and test workflows. The skill is aimed at developers building or fixing blocks for WordPress 6.9 and later.

How do I install the wp-block-development skill?

Run npx -y skills add automattic/agent-skills --skill wp-block-development -y in your project. Once installed, the agent follows the block development procedure when you ask it to create or change a WordPress block.

Which skills does wp-block-development rank alongside in PHP and Laravel?

On Claude Marketplaces it sits in the PHP & Laravel category and ranks in the top 100 there. Other skills listed in that category include laravel-specialist, php-pro, laravel-patterns, laravel-verification and laravel-plugin-discovery. This skill focuses on WordPress block development rather than Laravel.

More from automattic/agent-skills

All 12

Similar to Wp Block Development

More PHP & Laravel