Skip to content
Prototype

Prototype Skill

Matt Pocock's skill for throwaway prototypes that answer one design question: a single-file HTML walkthrough for state models and logic, or several switchable UI variations on one route.

GitHub Docs

Install

Install with the skills CLI

One command for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf and dozens of other agents. Needs Node.js; the skill is fetched straight from mattpocock/skills.

$ npx skills add mattpocock/skills --skill prototype

Run it in a terminal. The CLI finds the agents installed on your machine, asks which ones to add the skill to, and whether to install it into the folder you ran it from or for all your projects.

Other ways to install

Copy the whole skill folder — SKILL.md and any scripts or references beside it — into ~/.claude/skills/prototype/, where Claude Code picks it up in every project. Only git is needed.

tmp=$(mktemp -d) && \
  git clone --depth 1 --branch main https://github.com/mattpocock/skills.git "$tmp" && \
  mkdir -p ~/.claude/skills && \
  cp -R "$tmp"/skills/engineering/prototype ~/.claude/skills/prototype

No scripts or references next to it? Saving the SKILL.md alone as ~/.claude/skills/prototype/SKILL.md works too.

Using another agent? Its personal skills folder
Codex
~/.agents/skills/
Cursor
~/.cursor/skills/
GitHub Copilot
~/.copilot/skills/
Gemini CLI
~/.gemini/skills/
Windsurf
~/.codeium/windsurf/skills/
OpenCode
~/.config/opencode/skills/

About

  • Picks a logic branch or a UI branch from the question being asked
  • Logic prototypes: one double-clickable HTML file with free-play buttons and guided walkthroughs
  • UI prototypes: several radically different variants on one route, switched by a URL parameter
  • In-memory state by default and the full state rendered after every action
  • Ends by keeping the decision and archiving the prototype on a throwaway branch

Prototype, from Matt Pocock's mattpocock/skills collection, teaches a coding agent to build code whose only job is to answer a question, and to throw it away afterwards. The skill starts by deciding which question is being asked, because the two answers look nothing alike.

If the question is "does this logic or state model feel right?", the agent builds one shareable HTML file with free-play buttons and tabbed guided walkthroughs that push the state machine through the awkward cases, so even a non-developer can drive it. If the question is "what should this look like?", it generates several radically different UI variations on a single route, switched by a URL search parameter and a floating bottom bar. When the question is ambiguous and nobody is around to ask, it picks the branch that matches the surrounding code (a backend module means logic, a page or component means UI) and states the assumption at the top of the prototype.

Six rules apply to both: mark the code as throwaway but keep it next to what it prototypes, make it start with one command, keep state in memory unless persistence is the thing being tested, skip tests and polish, render the full state after every action, and when done fold the validated decision into the real code while committing the prototype to a throwaway branch linked from the issue. It suits developers using an agent for early product and architecture exploration. MIT licensed.

SKILL.md

The instructions your agent loads, as published by Matt Pocock.

SKILL.md
name
prototype
description
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

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](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](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
  1. 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.
  2. 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.
  3. 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.
  4. Skip the polish. No tests, no error handling beyond what makes the prototype _runnable_, no abstractions. The point is to learn something fast.
  5. 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.
  6. 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.
Install

Skill: Stitch: Generate Design

by Google Labs (Stitch)

Featured

Google's official Stitch skill for generating and editing UI screens from text or images — with a mandatory prompt-enhancement pipeline before every call.

Skill: Oil UI

by oil-oil

Interface-design skill that explores several distinct visual directions side by side, then refines the chosen one against real screenshots.

Skill: Grill With Docs

by Matt Pocock

New

Matt Pocock's combined skill that interviews you relentlessly about a plan or design while writing ADRs and a domain glossary as decisions are made, by chaining his grilling and domain-modeling skills.

Browse all skills →