Create, edit, build, and review a custom WordPress Gutenberg block plugin inside a Studio-backed site.
53
58%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./plugins/claude-code/skills/block-creator/SKILL.mdThe canonical home for this skill is block-creator in Automattic/build-with-wordpress
Use this skill when the user wants to create or modify a custom Gutenberg block inside a local Studio site.
This skill is the single entry point for custom block work. It owns:
Use studio for review and iteration after the block is built into a site.
Use studio so the selected site can be managed and reviewed with Studio tools.
Use Studio tools to:
Once you begin the actual block implementation workflow, call record_workflow_event with workflow: "block-build" and stage: "started".
If the request is vague, clarify:
Default to a static block unless the user clearly needs server-rendered data.
Use a static block when the content can be serialized at edit time. Use a dynamic block when the frontend output depends on server-side data or computation.
Keep the implementation consistent with standard Gutenberg block conventions.
Create:
create-block/{slug} unless the project already has a namespaceCreate the plugin directory here:
<site-path>/wp-content/plugins/<slug>/
<site-path>/wp-content/plugins/<slug>/src/Then write:
<slug>.phppackage.jsonreadme.txtsrc/block.jsonsrc/index.jssrc/edit.jssrc/save.jssrc/render.phpsrc/view.jssrc/style.scsssrc/editor.scssAfter the build, compiled assets live in build/.
Use the selected Studio site as the root for all block-related files.
view.js plain JavaScriptview.js runs on the frontend.
@wordpress/*The editor preview should look and behave as close to the frontend as possible.
Prefer controls the editor already provides when they fit the request.
Prefer components such as:
InspectorControlsBlockControlsRichTextMediaUploadToggleControl, RangeControl, SelectControl, TextControlPrefer supports in block.json when WordPress can provide built-in UI for color, spacing, or typography.
Use @wordpress/scripts for build tooling. Keep the package minimal and aligned with the block's actual needs.
Include build scripts that support the current task rather than copying a large default scaffold.
Keep metadata valid and minimal. Use only the fields the block actually needs.
The plugin main file should:
if ( ! defined( 'ABSPATH' ) ) { exit; }function_existsbuild/Each block should render a single wrapper element. Do not accidentally nest identical wrapper tags.
If unsure:
design or widgets category depending on the block?> at end of filefunction_existsesc_html(), esc_attr(), or wp_kses_post() where appropriateInside the block plugin directory, prefer:
pnpm install
pnpm exec wp-scripts buildIf the generated block package is being used outside this repo and only npm is available, npm install && npx wp-scripts build is fine too.
After a successful build:
wp_cliwp_clistudiorecord_workflow_event with workflow: "block-build" and stage: "completed"When editing an existing block:
wp-content/plugins/studioWhen a build fails:
1c076c2
Canonical home
since May 5, 2026
Also appears in
since May 5, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.