wp-scaffold
Skill1 starsChanged 6 months agoMITView on GitHub
Bootstrap a new Gutenberg block, plugin, theme, or block-pattern skeleton on a connected target — generates files via the companion's fs-write endpoint. Phase = Build.
- Deletes or force-pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- bienhoang/wp-pro-maxtheir own version, first seen Oct 11, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- bienhoang/wp-pro-max★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- wp-changesSkill
- wp-connectSkill
- wp-contentSkill
- wp-diagnoseSkill
- wp-edit-designSkill
- wp-edit-pluginSkill
- wp-edit-themeSkill
- wp-execute-phpSkill
- wp-fullSkill
- wp-health-checkSkill
- wp-introspectSkill
- wp-migrateSkill
- wp-pair-setupSkill
- wp-recoverySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 3 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
If the marker file $GIT_ROOT/.rolepod/parent-active exists, follow the
- Very specific: line 43
NEVER scaffold without allow_destructive: true — the flag is mandatory because file_write is irreversible at REST scale.
- Very specific: line 44
NEVER scaffold into an existing slug without first checking it does not exist (file_read the bootstrap path, expect 404) — a hidden …
- Distinctive: line 67
All path-scope + production-guard enforcement.
- Very specific: line 75
After scaffold succeeds → tell user the next concrete step (e.g.
- Distinctive: line 76
If the target lacks companion → STOP, scaffold needs fs-write.
- Very specific: line 98
Call file_read on the expected bootstrap path (e.g.
- Very specific: line 106
Call the matching rolepod_wp_scaffold_* tool with allow_destructive: true.
- Distinctive: line 135
Read when scaffolding for the first time on a target or when picking between dynamic vs static block render:
- Very specific: line 184
After plugin scaffold → wp-content to install + activate via REST wp/v2/plugins.
- Very specific: line 185
After block scaffold → wp-edit-design to drop the new block into a page layout.
- Very specific: line 186
After theme scaffold → switch the active theme (via REST wp/v2/themes or wp-cli theme activate), then wp-health-check.
- Very specific: line 187
After pattern scaffold → confirm the pattern shows up under /wp-json/wp/v2/block-patterns/patterns.
≈ “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
Mode selection
If the marker file $GIT_ROOT/.rolepod/parent-active exists, follow the
with-rolepod mode — return only the list of files created (absolute
paths). Skip the structure walkthrough and next-step suggestions — the
parent's implement-plan owns the build flow.
Otherwise, follow standalone mode — scaffold + guide the user through structure, conventions, and recommended next steps.
GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null) || GIT_ROOT="$PWD"
if [ -f "$GIT_ROOT/.rolepod/parent-active" ]; then
MODE=with-rolepod
else
MODE=standalone
fiWP Scaffold
Single skill, four sub-modes. Picks the right scaffold_* tool, scopes destination paths, refuses destructive overwrites, surfaces every file written so the user can review or roll back.
Iron Rule
<EXTREMELY-IMPORTANT>
1. NEVER scaffold without `allow_destructive: true` — the flag is mandatory because file_write is irreversible at REST scale; the explicit ask forces user awareness.
2. NEVER scaffold into an existing slug without first checking it does not exist (`file_read` the bootstrap path, expect 404) — a hidden overwrite into an active plugin breaks the live site.
3. ALWAYS surface every absolute path written + every backup file created — the only reliable rollback is to restore the `.wplab-bak-...` siblings or `rm -rf` the slug dir. Only the newest 2 backups per file survive (each write prunes the rest), so a rollback that has to go further back reads the Change Ledger instead.
4. ALWAYS leave the provenance stamp on. The scaffold tools add `Generated-By: rolepod-wplab` + `Generated-At: <date>` to the plugin/theme header and `(generated by rolepod-wplab)` to `Description` — do not strip either when editing the generated file, and add both BY HAND to any plugin or theme you assemble yourself with `file_write` or upload as a zip. A site owner inheriting the install has no other way to tell what an AI wrote.
</EXTREMELY-IMPORTANT>When to use
- "Create a plugin called X with a REST endpoint."
- "Scaffold a new Gutenberg block called testimonial-card."
- "Build a starter block-theme called my-theme."
- "Register a block pattern called hero-with-cta."
Skip when:
- User wants to EDIT an existing block/plugin/theme →
wp-content(post editing),wp-edit-design(layout), or directfile_write. - User wants to install a plugin from wordpress.org → use core REST
wp/v2/pluginsPOST (covered bywp-content).
Boundary
Owns:
rolepod_wp_scaffold_block— block.json + index.js + render.php (dynamic) OR save() (static) + style.css.rolepod_wp_scaffold_plugin— plugin bootstrap PHP + admin page + REST stub + CLI command stub + Gutenberg block stub.rolepod_wp_scaffold_theme— theme.json + functions.php + style.css + index.html + parts/ + patterns/.rolepod_wp_scaffold_pattern— block-pattern PHP registration + JSON metadata.- All path-scope + production-guard enforcement.
Does not own:
- Filling in business logic — that is post-scaffold
file_writework. - Installing an external plugin from wp.org →
wp-content(uses corewp/v2/plugins). - Editing a scaffolded artifact's content later → core CRUD or builder skills.
Return / hand off:
- After scaffold succeeds → tell user the next concrete step (e.g. "now fill in
src/Endpoint/Hello.php— call wp-content/file_write to add the callback"). - If the target lacks companion → STOP, scaffold needs fs-write.
Inputs to gather
- target_id.
type: block | plugin | theme | pattern.slug(required for plugin / theme / pattern; for block it is<namespace>/<name>).- For block:
plugin_slug(host plugin) +title+category+icon+render_strategy(dynamic / static). - For plugin:
name+description+ features array (rest / admin / gutenberg / cli). - For theme:
name+description+ parent (if child). - For pattern:
plugin_slug(host) +name+ content (Gutenberg block markup).
Workflow
1. Validate inputs
- Slug must be lowercase, hyphenated, no namespace prefix collisions with WP core.
- For block: namespace MUST be present (
my-team/widget, notwidget). - For theme: must NOT collide with active theme.
2. Existence check
Call file_read on the expected bootstrap path (e.g. wp-content/plugins/<slug>/<slug>.php). Expect 404. If 200 → STOP, ask user for a different slug or explicit overwrite OK.
3. Plan + confirm
Tell user: "I will create these files: [list]. Each is a fresh write — no overwrite. Confirm?"
4. Scaffold
Call the matching rolepod_wp_scaffold_* tool with allow_destructive: true. The template structure for each is in templates/scaffold-manifest.md.
5. Surface every file written
For each emitted file: absolute path + bytes. If any file_write returned a backup_path (means it overwrote something we missed) → SURFACE THAT TOO, treat as warning.
6. Hand off next step
State the next concrete action for the user (fill in REST callback, register block on activate, etc.).
If a matching Rolepod agent is available
rolepod:rolepod-builderfor the post-scaffold logic fill-in.rolepod:rolepod-builderfor the new block's CSS / patterns.
If no matching agent is available
- Validate inputs.
- Existence check.
- Plan with user.
- Scaffold with
allow_destructive: true. - Surface files + next step.
Output
Scaffold manifest — templates/scaffold-manifest.md. Lists every file written + bytes + backup-if-any.
Examples
Read when scaffolding for the first time on a target or when picking between dynamic vs static block render:
examples/scaffold-examples.md— good vs bad block scaffold; good vs bad plugin bootstrap features pick.
Provenance
Everything these tools write is signed twice, because the two marks survive different things:
| Mark | Where | Survives |
Generated-By: rolepod-wplab + Generated-At: <date> | plugin main PHP header, or theme style.css header | copying the directory to another site; WordPress ignores headers it does not know |
(generated by rolepod-wplab) appended to Description | same header | being read by a human in wp-admin → Plugins / Appearance → Themes, with no tooling at all |
To check a plugin later, read the top of its bootstrap file and look for the
Generated-By line:
rolepod_wp_file_read {
target_id,
path: "wp-content/plugins/<slug>/<slug>.php",
max_bytes: 2048
}Reads work on a guarded site, so this needs no Full Access.
This is provenance, not attestation. It records what rolepod-wplab wrote.
Anyone can delete the lines, and a plugin that arrived by any other route was
never marked — so an unmarked plugin proves nothing. The server-side change
ledger (rolepod_wp_changes_query) is the counterpart that editing a file
cannot rewrite; it is per-site, where the header travels with the files.
References
Inline only. File-emit shapes are encoded into each rolepod_wp_scaffold_* tool — the manifest template summarizes them. Tool docstrings in src/schema/tools.ts are authoritative.
Hard stops
- Slug exists → STOP, do not overwrite. Ask user.
allow_destructive: false(or omitted) → tool refuses; surface verbatim.- Companion missing on RestTarget → STOP, scaffold needs fs-write. Tell user to install
rolepod-wpv2.1+. - Production-matched siteurl → STOP, scaffold refuses on production targets unconditionally.
Full Rolepod enhancement
Full Rolepod adds a post-scaffold "fill in the logic" wizard that opens the new files in sequence and asks the user what each callback should do; standalone, the user fills in via direct file_write calls.
Next phase
- After plugin scaffold →
wp-contentto install + activate via RESTwp/v2/plugins. - After block scaffold →
wp-edit-designto drop the new block into a page layout. - After theme scaffold → switch the active theme (via REST
wp/v2/themesor wp-clitheme activate), thenwp-health-check. - After pattern scaffold → confirm the pattern shows up under
/wp-json/wp/v2/block-patterns/patterns.
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.

