Throwaway prototype
Builds throwaway code to answer one design question: a single-file clickable HTML demo for a state model, or several structurally different UI variants on one route switched by a URL param. Use when checking whether logic holds or how a page should look.
prototype- Author
- Matt Pocock
- Source
- mattpocock/skills/skills/engineering/prototype @ abeeaf9
- License
- MIT · Copyright (c) 2026 Matt Pocock
About this skill
What it does
The skill builds throwaway code that answers one design question, and the question decides the shape. For "does this logic or state model feel right?" it follows LOGIC.md: one self-contained HTML file with no framework or server, opened by double-click. The logic sits in a pure module, such as a reducer or a state machine, that can later move into the real code. Around it sit a state panel redrawn after every click, a button per action and guided scenarios, such as an action that should be illegal. Labels use domain language, so a designer or PM can drive it.
For "what should this look like?" it follows UI.md: three variants by default, at most five, that differ in structure rather than colour, on one route switched by ?variant=, preferably an existing page with real data. A floating bar cycles them by arrows or ← → and is hidden in production builds.
Both kinds are marked as prototypes, start with one command, keep state in memory and skip tests and polish. Afterwards the decision goes into the real code and the prototype onto a throwaway branch outside main, linked from the issue. If the question is unclear and you are away, the agent picks by the surrounding code (a backend module means logic, a page means UI) and says so. agents/openai.yaml holds the Codex display name and description.
When to use it, and when not
Use it before committing to a design: to push a state model through tricky cases or to compare layouts in the browser.
It is not a shortcut to production code: only the pure logic module is meant to survive, and a winning UI variant is rewritten properly when folded in.
How to run it
The install command below puts the whole folder in place. The agent picks the skill up by its description when you want to try a design out; to call it yourself:
- Claude Code:
/prototype, or ask for the skill by name. - Codex:
$prototype. - Cursor: type
/in the Agent chat and pickprototype.
Example: /prototype Does our refund state machine cope with a partial refund after a chargeback? Make a clickable demo.
It calls no other skill. wayfinder uses it for prototype tickets, and to-spec and to-tickets may quote a snippet a prototype produced.
How it differs from similar skills
Prototype to production from our catalog goes the other way: it hardens a working prototype for real users instead of rewriting it. The visual companion in Brainstorming before you build shows HTML mockups in a browser tab and records your click. This skill builds the variants inside your app on its real data, and for logic gives you a working model rather than a picture.
Install
Run one command — it saves SKILL.md and the files it uses into your agent's skills folder. Claude Code and Codex pick up a new skill without a restart; if it does not show up, restart the agent.
curl -fsSL --create-dirs -o ~/.claude/skills/prototype/SKILL.md https://anymodel.org/en/skills/matt-pocock/prototype/SKILL.md -o ~/.claude/skills/prototype/LICENSE https://anymodel.org/en/skills/matt-pocock/prototype/LICENSE -o ~/.claude/skills/prototype/LOGIC.md https://anymodel.org/en/skills/matt-pocock/prototype/LOGIC.md -o ~/.claude/skills/prototype/UI.md https://anymodel.org/en/skills/matt-pocock/prototype/UI.md -o ~/.claude/skills/prototype/agents/openai.yaml https://anymodel.org/en/skills/matt-pocock/prototype/agents/openai.yaml
curl -fsSL --create-dirs -o ~/.agents/skills/prototype/SKILL.md https://anymodel.org/en/skills/matt-pocock/prototype/SKILL.md -o ~/.agents/skills/prototype/LICENSE https://anymodel.org/en/skills/matt-pocock/prototype/LICENSE -o ~/.agents/skills/prototype/LOGIC.md https://anymodel.org/en/skills/matt-pocock/prototype/LOGIC.md -o ~/.agents/skills/prototype/UI.md https://anymodel.org/en/skills/matt-pocock/prototype/UI.md -o ~/.agents/skills/prototype/agents/openai.yaml https://anymodel.org/en/skills/matt-pocock/prototype/agents/openai.yaml
foreach ($f in 'SKILL.md','LICENSE','LOGIC.md','UI.md','agents/openai.yaml') { $p = Join-Path "$HOME\.claude\skills\prototype" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/matt-pocock/prototype/$f" -UseBasicParsing -OutFile $p }foreach ($f in 'SKILL.md','LICENSE','LOGIC.md','UI.md','agents/openai.yaml') { $p = Join-Path "$HOME\.agents\skills\prototype" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/matt-pocock/prototype/$f" -UseBasicParsing -OutFile $p }Any other agent: save the file into its skills folder, or give it the link to the file: https://anymodel.org/en/skills/matt-pocock/prototype/SKILL.md
SKILL.md
Prototype
A prototype is throwaway code that answers a question. The question decides the shape.
Pick a branch
Identify which question is being answered, using the user's prompt, the surrounding code, or by asking if the user is around:
- "Does this logic / state model feel right?" → LOGIC.md. Build a single shareable HTML file (free-play buttons plus tabbed guided walkthroughs) that pushes the state machine through cases that are hard to reason about on paper, and that a non-developer can drive.
- "What should this look like?" → UI.md. Generate several radically different UI variations on a single route, switchable via a URL search param and a floating bottom bar.
The two branches produce very different artifacts, so getting this wrong wastes the whole prototype. If the question is genuinely ambiguous and the user isn't reachable, default to whichever branch better matches the surrounding code (a backend module → logic; a page or component → UI) and state the assumption at the top of the prototype.
Rules that apply to both
- Throwaway from day one, and clearly marked as such. Locate the prototype code close to where it will actually be used (next to the module or page it's prototyping for) so context is obvious, but name it so a casual reader can see it's a prototype, not production. For throwaway UI routes, obey whatever routing convention the project already uses; don't invent a new top-level structure.
- Trivial to run. A UI prototype starts from one command in the project's task runner:
pnpm <name>,python <path>,bun <path>, etc. A logic demo is a single HTML file the user double-clicks. Either way, no thinking required to start it. - No persistence by default. State lives in memory. Persistence is the thing the prototype is checking, not something it should depend on. If the question explicitly involves a database, hit a scratch DB or a local file with a clear "PROTOTYPE, wipe me" name.
- Skip the polish. No tests, no error handling beyond what makes the prototype runnable, no abstractions. The point is to learn something fast.
- Surface the state. After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.
- Capture it when done. Fold any validated decision into the real code, then capture the prototype itself as a primary source: commit it to a throwaway branch, out of main, and leave a context pointer to that branch on the implementation issue. Capture the answer too (the verdict and the question it settled) in the issue or a commit. The main branch keeps only the validated decision.
Connect through AnyModel API
This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.
AnyModel