Skill library

Agent skill Web motion

Prototype

Build a throwaway demo to compare UI directions or see how a tricky workflow behaves as its state changes.

  • Microinteractions
  • Interaction design
  • Design systems

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add https://github.com/mattpocock/skills/tree/main/skills/engineering/prototype --skill prototype --agent claude-code --yes

Check this file in your project.claude/skills/prototype/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add https://github.com/mattpocock/skills/tree/main/skills/engineering/prototype --skill prototype

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Use a browser for the standalone logic demo. For the UI branch, open the existing project and use its normal local runner. Provide sample data suitable for a disposable prototype.

View operation manual

What this skill helps with

  • Make interface behavior and feedback feel clear and intentional.

Good for

  • Interaction and feedback
Logic branch
LOGIC.md and one self-contained HTML file with a state panel, free play, and guided cases.
UI branch
UI.md and one local route with switchable layouts in the existing app where possible.
Data
In-memory state and representative fixtures by default.
Handoff
The original design question, a runnable prototype, and the decision it helped resolve.
Skill name
prototype

Prototype the decision you need to make

A request that leaves the question open

Use prototype to build a complete appointment feature.

That scope makes it unclear whether a reviewer should judge layout, state transitions, or backend behavior.

A question someone can try

  1. Write one question, such as what happens when a proposed time becomes unavailable.
  2. Give the prototype enough sample data and controls to exercise the uncertain moment.
  3. Ask someone to try it and record their expectation before deciding what to implement.

Prototype operation manual

Use Matt Pocock’s Prototype skill to test a booking state model or compare layouts for an appointment list. Replace bracketed inputs with your project details.

Find out what a patient expects when a time they selected becomes unavailable before confirmation.

  1. Define the decision and the sample cases

    Write down which appointment the patient has now, what they are selecting, and when the existing booking should change.

    Prompt · Step 1
    Use Matt Pocock’s prototype skill and its LOGIC.md branch to frame a rescheduling question for [appointment feature]. I want to see what a patient expects if a selected slot becomes unavailable before confirmation. Read any existing rules and use sample appointments. Give me the starting state, actions, and expected outcomes to check for success, a newly unavailable choice, and a confirm attempt without a valid choice. Mark any unconfirmed product decision as an assumption. Keep this pass to a short plan.
  2. Make a single file a reviewer can open

    Separate the transition logic from the page. Provide buttons and a readable state panel that updates on every action.

    • The file opens without a runner or live service.
    • The current booking, candidate time, and result are visible after each action.
    • Each guided tab starts from a repeatable state.
    Prompt · Step 2
    Use prototype and LOGIC.md to build the agreed appointment model next to [relevant code] in one clearly named prototype HTML file. Inline the styles and scripts so I can double-click it. Put the decision at the top. Implement the state transitions as pure logic that takes actions from the page. Use sample data in memory. Show the current booking, candidate slot, and latest result in readable labels after every click.
    
    Add free-play actions and guided tabs for a successful change, a slot that becomes unavailable, and an attempt to confirm without a valid selection. Each tab should reset to its known starting state and each guided step should perform a real prototype action. Give me the file path and open it locally if you can.
  3. Walk the cases and record the result

    Have a reviewer predict what happens on conflict and compare that prediction with the state panel.

    • A conflict leaves the booking in the agreed state.
    • The verdict explains the question settled and the behavior selected.
    Prompt · Step 3
    Use prototype to review [prototype HTML file]. Open it if browser access is available. Run each guided tab from its reset point and try a conflict in free play. Report the real changes to the previous booking and candidate slot. Write a short reviewer script that asks what should happen before the reviewer clicks Confirm, and leave space for their verdict. Record what we can decide now and what still needs a human response. Keep the file only as prototype evidence when we agree how to archive it.

Find the branch that answers your question

Point the assistant to a file in the installed Prototype skill.

A conflict changes a booking unexpectedlyLogic
Command or reference
LOGIC.md
Examples
Add a guided case with a known initial booking and a conflicting candidate slot.
Two layouts need the same comparison dataUI
Command or reference
UI.md
Examples
Keep the host page and shared data above the development-only variant switcher.
The experiment has a clear answerHandoff
Command or reference
SKILL.md
Examples
Record the question and verdict and keep the runnable draft in an approved prototype branch.

Prototype troubleshooting

When should I pick a standalone HTML file?

Choose the logic branch when the question is about states, actions, or data. One inline HTML file makes the model easy to share with a reviewer who has no development tools.

Can the UI variants reuse an existing screen?

Yes. The default is to keep the real route, data fetching, and authorization and swap the relevant rendering in development. Use a separate prototype route when there is no natural host.

What should I keep after reviewing the prototype?

Record the question and the verified decision. Implement that decision with the project’s normal checks. The skill suggests keeping the full draft as a primary source on a disposable branch when you choose to archive it.