automattic avatar

Wp Block Development

This is a comprehensive workflow for building and maintaining WordPress Gutenberg blocks, covering everything from scaffolding with @wordpress/create-block to handling the tricky parts like attribute serialization, deprecations, and dynamic rendering. It enforces apiVersion 3 for WordPress 6.9+ compatibility and walks you through block.json metadata, registration patterns, and the differences between static versus dynamic blocks. The procedure is opinionated about using filesystem detection scripts and metadata-based PHP registration. Most valuable when you're dealing with "invalid block" errors after markup changes or need to add viewScriptModule support without breaking existing blocks. It assumes you have bash, node, and optionally WP-CLI available in your environment.

skills.sh installs
454
GitHub stars
211
last updated
Jun 3, 2026

Install

$ npx -y skills add automattic/agent-skills --skill wp-block-development --agent claude-code

Installs into .claude/skills of the current project.

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)

Sponsors

Details

Repository
github.com/automattic/agent-skills
Category
AI & Agent Building
First seen
Jun 3, 2026

More from automattic/agent-skills

All 12
1daffy0208 avatarvideo-producerdaffy0208/ai-dev-standardsExpert in video playback, streaming, and video player customization454skills.sh installs
2jwynia avatardraftingjwynia/agent-skillsBreak through blocks and execute first drafts. Use when the outline is done but the draft isn't happening, when writer's block strikes, when the blank page rema454skills.sh installs
3aj-geddes avataraws-rds-databaseaj-geddes/useful-ai-promptsDeploy and manage relational databases using RDS with Multi-AZ, read replicas, backups, and encryption. Use for PostgreSQL, MySQL, MariaDB, and Oracle.453skills.sh installs
4aj-geddes avatarlog-aggregationaj-geddes/useful-ai-promptsImplement centralized logging with ELK Stack, Loki, or Splunk for log collection, parsing, storage, and analysis across infrastructure.453skills.sh installs
5aj-geddes avatardocumentation-site-setupaj-geddes/useful-ai-promptsSet up documentation websites using Docusaurus, MkDocs, VitePress, GitBook, or static site generators. Use when creating docs sites, setting up documentation po452skills.sh installs
6aj-geddes avatarmonorepo-managementaj-geddes/useful-ai-promptsManage monorepo architectures using Lerna, Turborepo, and Nx. Configure workspaces, dependency versioning, and cross-package testing.451skills.sh installs