kit/plugins/plan-agent/skills/prototype/SKILL.md
Generates a runnable static-HTML prototype from a plan, idea, or design. Produces one self-contained, framework-free clickable file under docs/prototypes/. Use when asked to prototype a mockup.
npx skillsauth add shawn-sandy/agentics prototypeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Turn a completed HTML plan — or a raw one-line idea — into a runnable,
framework-free static-HTML prototype under docs/prototypes/, so a developer
can click through the real data shapes, the core flow, and the idea's actual
success signal before writing production code.
Generates a runnable static-HTML prototype from a plan or idea. Produces one
self-contained, framework-free clickable file under docs/prototypes/. The
prototype is a single .html file (inline CSS + vanilla JS, an inline JSON
seed, a localStorage-backed store) — no CDN, no framework, no build step — so
it opens by double-click on file:// and publishes to GitHub Pages alongside
the Plans gallery.
Two activation paths, both driven by this one SKILL.md:
/plan-agent:prototype <plan.html | one-line idea> — $ARGUMENTS
carries the input.$ARGUMENTS is empty;
derive the input from the triggering message or recent context.This skill performs write operations (filesystem). Before doing anything else,
bootstrap out of plan mode: use ToolSearch with select:ExitPlanMode, then
call ExitPlanMode. Do not produce a plan document — execute the workflow
directly.
Read $ARGUMENTS (or the conversation-derived text on the model path):
.html, treat it as a plan path. Reduce
it to its basename for safety, then resolve it under the plans directory
(configured plansDirectory, else docs/plans/). Read the file..png, .jpg, .jpeg,
.gif, .webp, .svg), treat it as an image path — a screenshot or
mockup of the UI to prototype.figma.com URL (or the user names a Figma file /
pastes a Figma link), treat it as a design path.AskUserQuestion with three questions —
the core entity (the thing being tracked), the primary action (what
the user does with it), and an observable success signal (what proves it
works). Give example phrasing in each question, and fall back to a sensible
default when an answer is blank (entity → "Item", action → "Add", success
signal → "total count").Read the image directly (the Read tool renders PNG/JPG/etc.
visually). Infer the model from what the UI shows — the dominant repeated
record becomes the entity, its visible labels/columns become fields
(infer each type from the value shown), the primary button/CTA becomes the
action, and any visible count/total/badge becomes the success signal.
No interview unless the image is too ambiguous to read a single entity from —
then fall back to the three-question interview above.ToolSearch
(get_screenshot and get_design_context / get_metadata), passing the
Figma URL. Read the returned screenshot + layer metadata and infer the model
exactly as for an image path. If no Figma MCP server is connected, say so and
ask the user to either connect it or paste a screenshot instead — do not
guess a model from the URL alone.From the inputs, derive — by the same rule every time, so two runs match:
string / number / date / bool). When unsure, default to string.Before writing anything, echo the derived model to the user — entity, fields (with types), action, and success signal — so they can catch a wrong interpretation before a file exists. Adjust if corrected.
Read reference/PROTOTYPE-SKELETON.html and substitute every {{token}} by
string replacement:
&, <, >, ", ')
before inserting it — the prototype is published to a live *.github.io
origin. This covers {{TITLE}}, {{SOURCE_PLAN}}, {{STORE_KEY}},
{{PRIMARY_ACTION}}, {{SUMMARY}}, and the meta-tag values.{{COLUMNS}} and {{FORM_FIELDS}} from
already-escaped text, then inject the final HTML unescaped. These tokens
carry markup (<th> / <input> elements), so escaping the whole fragment
would render raw tags — escape each interpolated label/key inside them, not
the surrounding tags.{{SEED_JSON}} is JSON-serialized with script-breakout escaping only
(e.g. encode </script> as <\/script>) — never HTML-escaped: load()
reads the JSON block as text and HTML entities are not decoded, so "
would break JSON.parse.{{TITLE}}, {{SOURCE_PLAN}}, {{STORE_KEY}},
{{SEED_JSON}}, {{COLUMNS}}, {{FORM_FIELDS}}, {{PRIMARY_ACTION}},
{{SUMMARY}}, plus the proto-source / proto-created meta tags.{{STORE_KEY}} from the file slug so each prototype isolates its own
localStorage.Derive a verb-target kebab-case slug from the entity/action (e.g.
track-gym-workouts). mkdir -p docs/prototypes first, then write to
docs/prototypes/<slug>.html. Note: validate-plan-filename.py is
plans-directory-scoped and does not enforce prototype filenames, so this
skill owns the naming convention — never emit a placeholder/auto-generated
slug.
Before writing a prototype whose seed came from an external source — a plan, image, or Figma design — run a quick secret/PII scrub on the extracted seed values (it publishes to a public Pages origin). Mockups and screenshots often show real names, emails, or tokens; drop or mask anything that looks like a credential, token, key, email, or other PII.
PostToolUse hook auto-rebuilds docs/prototypes/index.html on the
write. If it did not run (e.g. hook disabled), run
bash "${CLAUDE_PLUGIN_ROOT}/hooks/build-prototypes-index.sh" "${CLAUDE_PROJECT_DIR:-$PWD}".SendUserFile the
prototype path.development
Checks whether the branch's PR is ready and merges it when green. Runs the readiness gate, lint, and an approval prompt. Use when the user asks "merge?" or if a PR is ready to merge.
development
Implements a plan file that already exists. Walks its steps, ticks the spec, re-renders, and runs the completion gates. Use when asked to implement an existing plan.
development
Audits and optimizes CLAUDE.md project memory files. Checks adherence to Claude Code best practices and produces actionable fixes. Use when the user asks to audit, optimize, or diagnose a CLAUDE.md.
development
Converts an HTML artifact or Markdown file into a draft post for a static site. Scopes CSS to keep interactive blocks alive and escapes prose for MDX. Use when asked to turn an artifact into a post.