/rolepod-wplab:wp-scaffoldfrom rolepod-wplab
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.
Ships in rolepod-wplab. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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
fi
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.
Skip when:
wp-content (post editing), wp-edit-design (layout), or direct file_write.wp/v2/plugins POST (covered by wp-content).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.Does not own:
file_write work.wp-content (uses core wp/v2/plugins).Return / hand off:
src/Endpoint/Hello.php — call wp-content/file_write to add the callback").type: block | plugin | theme | pattern.slug (required for plugin / theme / pattern; for block it is <namespace>/<name>).plugin_slug (host plugin) + title + category + icon + render_strategy (dynamic / static).name + description + features array (rest / admin / gutenberg / cli).name + description + parent (if child).plugin_slug (host) + name + content (Gutenberg block markup).my-team/widget, not widget).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.
Tell user: "I will create these files: [list]. Each is a fresh write — no overwrite. Confirm?"
Call the matching rolepod_wp_scaffold_* tool with allow_destructive: true. The template structure for each is in templates/scaffold-manifest.md.
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.
State the next concrete action for the user (fill in REST callback, register block on activate, etc.).
rolepod:rolepod-builder for the post-scaffold logic fill-in.rolepod:rolepod-builder for the new block's CSS / patterns.allow_destructive: true.Scaffold manifest — templates/scaffold-manifest.md. Lists every file written + bytes + backup-if-any.
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.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.
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.
allow_destructive: false (or omitted) → tool refuses; surface verbatim.rolepod-wp v2.1+.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.
wp-content to install + activate via REST wp/v2/plugins.wp-edit-design to drop the new block into a page layout.wp/v2/themes or wp-cli theme activate), then wp-health-check./wp-json/wp/v2/block-patterns/patterns.What SKILL.md sets; muted values are Claude Code's defaults
user wants to "create a new plugin / new block / new theme / new block-pattern", OR mentions scaffolding any of those four artifact types
npx claudepluginhub nuttaruj/rolepod-wplab --plugin rolepod-wplab15 skills in this plugin
/wp-changesQuery the AI Change Ledger on a connected target — the writes the MCP recorded through the companion (RestTarget only), categorized; toggle on/off; panic-revert recent changes. Phase = Recovery./wp-connectOpen a WordPress Target on any kind (local / REST + App Password / SSH / Docker) using credentials already in the vault. Phase = Define./wp-contentCreate, read, update, search posts/pages/users/options/taxonomies via the core WP REST API on a connected target. Phase = Build./wp-diagnoseMulti-probe diagnostic + security audit of a connected target — plugin conflicts, slow queries, large autoload options, broken images, PHP errors, outdated core/plugins/themes, weak admins. Phase = Debug./wp-edit-designRead or modify page-builder layouts on a connected target — Elementor, Divi, Oxygen, Bricks widget trees. Phase = Build./wp-edit-pluginRead or write configuration owned by SEO / i18n / e-commerce / custom-field / forms plugins — Yoast, RankMath, WPML, WooCommerce, ACF, Gravity / CF7 / WPForms — on a connected target. Phase = Build.