wp-devkit-block-development
Skill0 starsChanged 34 days agoMITView on GitHub
Build, debug or review Gutenberg blocks: block.json registration, invalid-content errors and deprecations, dynamic render.php, InnerBlocks, Interactivity API, Block Bindings, iframe editor. Not for theme.json/templates (theme skill) or generic plugin code.
In this repository20 other files it gives its agents.
- docs/llms.txtllms.txt
- wp-devkit-accessibility-reviewSkill
- wp-devkit-acf-and-content-modelingSkill
- wp-devkit-admin-ui-developmentSkill
- wp-devkit-ci-cd-and-release-engineeringSkill
- wp-devkit-headless-and-wpgraphqlSkill
- wp-devkit-migration-upgrade-reviewSkill
- wp-devkit-performance-reviewSkill
- wp-devkit-phpstan-reviewSkill
- wp-devkit-playground-developmentSkill
- wp-devkit-plugin-developmentSkill
- wp-devkit-rest-api-developmentSkill
- wp-devkit-security-reviewSkill
- wp-devkit-site-audit-and-onboardingSkill
- wp-devkit-test-strategySkill
- wp-devkit-theme-developmentSkill
- wp-devkit-ui-designSkill
- wp-devkit-wcag-reviewSkill
- wp-devkit-woocommerce-devSkill
- wp-devkit-wpcli-and-opsSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Read references/engineering-contract.md first.
- Very specific: line 12
If every block is dynamic (save returns null or InnerBlocks.Content), skip the save, deprecation and invalid-content steps and say why.
- Very specific: line 27
Follow metadata from source to build output to server and client registration (references/metadata-registration-and-build.md).
- Very specific: line 31
Check editor behavior under the iframe, data loading, effects and errors (references/editor-and-iframe-compat.md).
- Very specific: line 35
Read references/block-development-workbook.md for the decision table, symptom table, false positives, severity guidance and acceptance …
- Very specific: line 43
Read-only leads from the first-party root.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Block state, storage and rendering
Read references/engineering-contract.md first. Review requests stay read-only: assess, explain and recommend without edits, mutations, builds that rewrite files, or untrusted runtime execution. Implementation applies only when the request authorizes changes.
Applicability
If every block is dynamic (save returns null or InnerBlocks.Content), skip the save, deprecation and invalid-content steps and say why. Review registration, attributes and server render.
Inputs
Block name, oldest and newest supported WordPress, block.json, build command, emitted build/ assets, one saved-content fixture per historical form, and the failing action (insert, save, reopen, frontend, second instance). Inspect project evidence before asking; ask only what changes the decision.
Boundaries
- Theme templates,
theme.json, patterns files: hand off towp-devkit-theme-development. - Admin screens, settings pages, REST routes, plugin lifecycle:
wp-devkit-plugin-development,wp-devkit-rest-api-development,wp-devkit-admin-ui-development. - Escaping or authorization questions beyond the block renderer:
wp-devkit-security-review. - Editor/visual polish decisions:
wp-devkit-ui-design.
Code Review Workflow
- Follow metadata from source to build output to server and client registration (
references/metadata-registration-and-build.md). Check asset field types,file:paths,*.asset.php, and the apiVersion against the supported range. - Trace each attribute from control to stored form (comment JSON or markup
source) to render. Decide static vs dynamic from freshness and storage needs. - Compare each historical fixture with the current
saveand attribute definitions (references/saved-content-and-deprecations.md). Check nested blocks. - For dynamic output, trace attributes and context to the escaped sink (
references/dynamic-rendering-and-security.md); confirm wrapper attributes and empty states. - Check editor behavior under the iframe, data loading, effects and errors (
references/editor-and-iframe-compat.md). - For interactive blocks, check state vs context, server initialization and event handling (
references/interactivity-api.md). For bindings or PHP-only blocks, readreferences/bindings-and-php-only-blocks.md. - Report the failing boundary with the old/new content checks needed. Do not rebuild assets or rewrite saved content during review.
Read references/block-development-workbook.md for the decision table, symptom table, false positives, severity guidance and acceptance checks.
Implementation workflow
State the expected behavior and the smallest affected boundary. Prefer metadata and supports over bespoke code. If saved markup changes, add a frozen deprecation and a fixture before editing save. Implement, then run the acceptance checks in the workbook against the lowest and highest supported WordPress. Report any unavailable check as unexecuted. Publishing or deploying needs its own scope.
Search Patterns for Quick Detection
Read-only leads from the first-party root; narrow . where possible. Matches are candidates, not findings; no match proves nothing. Exit 0 = match, 1 = none, 2 = error (record separately).
# registration and metadata
rg -n -g '*.{php,json,js,jsx,ts,tsx}' -g '!**/{vendor,node_modules,build,dist,coverage}/**' -e 'apiVersion|register_block_type|registerBlockType|viewScriptModule|blocks-manifest|autoRegister' .
# wrappers, inner blocks, renderers
rg -n -g '*.{php,json,js,jsx,ts,tsx}' -g '!**/{vendor,node_modules,build,dist,coverage}/**' -e 'useBlockProps|InnerBlocks|useInnerBlocksProps|render_callback|get_block_wrapper_attributes|save\s*[:(]' .
# deprecations, transforms, attribute sources
rg -n -g '*.{json,js,jsx,ts,tsx}' -g '!**/{vendor,node_modules,build,dist,coverage}/**' -e 'deprecated|isEligible|migrate|transforms|"source"|"selector"' .
# editor data and global access
rg -n -g '*.{js,jsx,ts,tsx}' -g '!**/{vendor,node_modules,build,dist,coverage}/**' -e 'useSelect|useDispatch|apiFetch|\bdocument\.|\bwindow\.|useEffect' .
# interactivity and bindings
rg -n -g '*.{php,html,json,js,jsx,ts,tsx}' -g '!**/{vendor,node_modules,build,dist,coverage}/**' -e 'data-wp-|@wordpress/interactivity|wp_interactivity_|withSyncEvent|asDangerousHTML|register_block_bindings_source|metadata.bindings' .
# output context
rg -n -g '*.php' -g '!**/{vendor,node_modules,build,dist,coverage}/**' -e 'echo\s+\$|esc_(html|attr|url)|wp_kses|dangerouslySetInnerHTML' .How to read the leads: a document./window. hit in editor code matters only inside edit/effects; an echo $ hit matters only if the value is attacker-influenced and unescaped for its context ($content from core is not); data-wp-html matters only with a non-literal source.
Output Format
Lead with the result and reviewed scope. Confirmed concern: file:line, actor, trigger, reachable path, impact, confidence, minimal fix, regression check. List candidates and missing evidence separately; use "not established" when the fixture, build output or version is unavailable. Implementation: changed boundaries, deprecations added, commands with exit codes, fixtures, unexecuted checks, residual risk. A passing build or editor test does not prove old-content safety, frontend rendering or cross-version support.
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.

