Skip to content
Back to skills

Ape Prototype

ASecurity

Change the look or add a screen through the prototype, after the plan, journeys, app structure and design system: the working app on a store (states and journeys) and the scenes, ape prototype snapshot (one scene while you work, a complete report with eligible scenes reused before review), the critique, commit the report, approval of that commit, a commit's data model and export, then build to match.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
developmentgoshellawsgitapi

Works with

  • claude code
  • terminal
  • cli
  • api
  • mcp

Security analysis

A100/100

Scanned December 5, 2026

npx -y skills add BuffApe/BuffApe --skill ape-prototype --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ape Prototype?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ape Prototype
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/buffape-ape-prototype/badge)](https://www.skillsdirectory.com/skills/buffape-ape-prototype)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ape-prototype
description: "Change the look or add a screen through the prototype, after the plan, journeys, app structure and design system: the working app on a store (states and journeys) and the scenes, ape prototype snapshot (one scene while you work, a complete report with eligible scenes reused before review), the critique, commit the report, approval of that commit, a commit's data model and export, then build to match."
---

# Change the prototype, get it approved

A screen's look is approved in the prototype before it is built (PROTOTYPE.md). The prototype renders the product's real views with sample data, so the approved screens are the ones that ship. Versions and the one approved version per change live in `prototype/versions/<change>.json` in the product's repository (BC-D39). The product's scenes are in `prototype/scenes.ts`, its views listed in `apps/app/src/prototype/views.ts` and `apps/admin/src/prototype/views.ts`. In BuffCore's repository, the playground's `apps/playground/prototype/` is the example.

## Read by section

Read only the parts of the plan and the design a change needs, never whole files. For `plan/brief.md`, `plan/journeys.md`, `design/DESIGN.md` and `design/screens.md`, list the headings first (`grep -n '^## ' plan/journeys.md`), then read the sections the change names: its journeys and the people in them, the brief's sections it touches, the contract sections its screens use (color, type, components, layout) and the `## <screen>` sections of the screens it changes. Read a whole file only when it is short or the change is about all of it.

## Before the first prototype

Start each prototype journey from the moment in the person's normal day described in
`plan/journeys.md`, such as "8:00, a customer calls." Use a base state that puts the person at that
moment. Play the actions and branches through to the outcome, showing what takes over and what the
agreed brief says the person keeps using.

Give every journey a role: who it is for, one of the people in `plan/journeys.md`. Its row names
them in the Actor column, and its entry in `prototype/journeys.ts` has a `role` (an i18n key) the
studio's picker groups by. Ask the person when a journey's role is unclear. `ape design check`
warns, without failing, about a journey that names none.

After Journeys, use `ape-plan-change`'s Structure questions and write `plan/structure.md`:
one table (Section, First screen, Who, Place, Main), followed by short notes for nested
screens' owning sections and return targets, phone and wide screens. Offer a draft from the
journeys, then let the person correct it. Keep Brief, Plan, Brand, Journeys, Structure,
Prototype in that order in the studio. Review structure again only when sections, audiences
or screen ownership change. Existing products without the file keep working; propose it for
review before their next affected prototype, with no invented past approval. Use existing
inventory routes or console screen names as first screens. The file describes intent and
grants no access. SA4 adds coverage and traversal evidence later; do not claim them from a table.

## The comp, before the scenes

When `prototype/versions/comp.json` holds no approved look, draw the comp first and nothing else. Pick the three deciding screens from `plan/journeys.md` and `plan/structure.md` (the ones people see most) and add them to `prototype/scenes.ts` as scenes keyed `comp/<name>`. `plan/structure.md`'s `Surface:` line says which surface comes first (absent, desktop): the snapshot shoots the comp at that width, the product's desktop frame (`prototype.frame`, 1440 by default) or the phone's 390, light and dark. Shoot it with `pnpm ape prototype snapshot --scene 'comp/*'`: it goes to `prototype/snapshots/comp/<commit>/`, apart from the scenes, and never counts toward their totals, completeness or reuse. The studio's Prototype page shows the three beside `design/references.md`'s pictures; the person asks for changes in the chat (redraw and shoot the three again) and approves the look there. Only a person approves it, at every level, Autopilot included. Once approved, the comp's screenshots are the reference every scene must match: its type, color, density and spacing. Judge the first surface first.

## The working app, and the scenes

Before drawing, read `design/references.md` (the design system's reference study and the paths of its pictures, `ape-design-system`) and look at the pictures it names, so the screens answer what the study found. Without the file, say so and draw from `design/DESIGN.md`'s sections the screens need.

The prototype is **one app** over a small store (PROTOTYPE.md; PROCESS.md, stage 4): `prototype/store.ts` (the records and the actions), `seeds.ts` (the named states), `journeys.ts` (the journeys from `plan/journeys.md`) and `home.tsx` (the real shell and screens, with the states and journeys panel outside them). The runtime is `PrototypeHomeRoute` from `@buffcore/app-shell/prototype`: `home.tsx` passes it the store, the states, the journeys, the product's catalogs and a `render` for its screens. The dev-only `apps/app/src/app/prototype.tsx` loads it at `/prototype` behind `__DEV__`; `_layout.tsx` keeps that path outside the app shell. The app is what a person reviews and plays; the scenes are saved states for the snapshot and approval. When a screen changes, change the view and the state that shows it; when a journey changes, update `plan/journeys.md` and the prototype's journeys. After the snapshot, `ape-critique` reviews the app; the version record holds the approval. The scenes below remain the proof the snapshot checks.

When screens disagree about people, messages, counts or amounts, fix the shared model or how the screens read it and add an invariant to the product's tests. Never patch a single screen to make its numbers agree. Check the invariant in each named state and after each journey step. Pass derived counts and amounts through `t()` placeholders formatted with `Intl`.

1. **Change the views and the scenes.** A view is props in, UI out (`src/screens/…View.tsx` in the app, the console's equivalent in the admin); export it from the surface's `src/prototype/views.ts`. In `prototype/scenes.ts`, a scene names its view and gives it props: `{ key, title, surface: 'app' | 'admin', view: 'NotesView', props }`, plus `frame: 'tablet'` when it isn't a phone (app) or the console (admin). `props` are all of the view's props, its callbacks included (`onOpen: () => {}`), and the view types them itself, so it exists before the API does; the route maps the API's answer onto them when it is wired. A value the build will fetch later, such as a plan's price, comes from the model in the prototype. Sample data lives in `prototype/data/` and is always made up; a list of records there has an `id` on each row (that is how `ape prototype data` finds the data model). Name the product's theme once: `defineScenes({ theme, scenes, flows })`. A flow shows scenes in order, each step a scene's `key` and a plain-sentence `caption` (the viewer shows it as written, not through `t()`): `flows: [{ key: 'read-a-post', title: 'Read a post', steps: [{ scene: 'posts', caption: 'The list, newest first.' }, { scene: 'post', caption: 'One post; a paid one shows a lock.' }] }]`; `defineScenes` throws on a step naming a scene that doesn't exist.
2. **Look at it** while `pnpm dev` runs: the app's own `/prototype` (the app's port) is the working prototype with its states and journeys; the admin's `/prototype` (the admin port) opens on the same app (when `createPrototype({ home: true })`) with every scene and flow one rail item away, in each theme, mode and language (`en-XA` and `ar-XB` included).
3. **Check the scene you changed** (the snapshot is filed under the commit checked out, so a new product from `ape create`, which has none yet, commits first: `git add -A`, then `git commit -m "chore: the product as created"`, as `APE_ALLOW_LINKED=1 git commit …` while it is linked, or the pre-commit check refuses the linked `package.json`): `pnpm ape prototype snapshot --scene <key>` snapshots that scene alone in a few seconds, keeping the other scenes' report entries and screenshots (the development servers must be running; it drives Playwright's headless Chromium, never the installed Chrome: install it once on each machine with `pnpm dlx playwright-core@1.63.0 install chromium-headless-shell`). Look at its screenshots in `prototype/snapshots/<commit>/` and fix what the checks find: text too faint to read as drawn (4.5:1, disabled controls too; 3:1 for large text), text that skipped `t()` (in `en-XA`), text cut off by its box, touch targets under 44 px (app scenes). Font hints suggest where to look for fallback text in the declared theme and leave the snapshot status unchanged. A faint text's colors come from the theme's tokens or the view's choice of them.
4. **Save, then snapshot** for review: while you work, `pnpm ape prototype snapshot --scene <key>` for the scenes you touched; when the change is done, commit the views and scenes, then run `pnpm ape prototype snapshot` once for every scene (it copies the scenes whose inputs did not change). That full snapshot is what a version records and a person approves; a release needs one too. A snapshot taken over unsaved work says `dirty: true` in its report and cannot record a version (it is fine for looking). It draws the scenes it does not copy in the floor (the product's theme, else the first starter, light and dark, its languages and `en-XA`, plus `ar-XB` for a right-to-left language), and in the full matrix (every theme, mode and pseudo-locale) with `--full`, which a release's report takes, or when the theme, `design/` or another shared input changed since the last full report; before a floor run draws, two fresh read-only turns of the agent and model `plan/agents.md` sets for validation (never your own turn) may add scenes to draw again and looks beyond the floor, each with a reason (`selector` in `report.json`; it never removes a floor look, and with an agent that has no fresh read-only turn (OpenCode), in CI, or when a turn fails, times out or answers out of shape, the floor is drawn alone and the run says why). A full run writes the looks the selector missed to `prototype/snapshots/selector-misses.json`: commit it with the report; it screenshots each drawn theme in light mode and the product's in dark, in the first language, checks every look drawn and each theme's tokens, and writes `report.json` and `data.json` beside the screenshots. It fails while a check finds a problem: fix it, or say in the commit why it stays. Format first (Claude Code's format hook formats each file it writes, another agent runs `pnpm format`, and `pnpm lint` reports any file left): the pre-commit hook refuses unformatted files, and the design hash reads `design/components/` as written, so a format fix made after the snapshot leaves the report's hash behind the committed files (snapshot again, and commit that folder as step 6 says).
5. **Commit** the snapshot's `report.json`, `data.json` and `design.json` (a change of `design/` follows the `ape-design-system` skill and is saved before the snapshot, like the views). Git ignores the screenshots: they stay on this computer; elsewhere, `pnpm ape prototype snapshot --remake` makes them again from the commit checked out. With the checkout unchanged, run `pnpm ape prototype version C-012 --why "<what changed and why>"`, then commit `prototype/versions/C-012.json`. Then run `pnpm ape prototype prune` and commit what it removed: the committed snapshot folders no version names (each about 2 MB of data), keeping every folder a version names, the newest, HEAD's and any with unsaved changes; `--dry-run` lists them first, and git keeps their history. It names the full source commit the snapshot was taken from and fingerprints its report, data and design. A partial, stale or unsaved snapshot is refused: only snapshot files may have changed between that source and HEAD. Record derives the design and the sample data again from the commit and refuses a report that differs, so sample data must give the same values every time it is read: no dates from the clock, no random values.
6. **Get that version approved.** A person looks at the version's snapshot report, screenshots and viewer, then runs `pnpm ape prototype approve C-012 [--version <n>]` in their own terminal (latest by default) and types `C-012` to confirm, or clicks approval in the studio. The same version record holds the one approved version and signature (git identity, time, commit and fingerprints); commit it. A second approval is refused, naming the approved version. There is no MCP approve tool: approving is a person's, except at Autopilot, where a fresh approver turn (never you) may approve a version as an AI approval when the floor, every check, a critique without P0 and the selector's second turn all hold; a person can reopen it (`ape prototype reopen C-012`). A milestone's approval needs a full report (`--full`). An agent stops at the version record and reports that approval is waiting; it cannot run approval under `--json` or without a terminal. Asked for changes before approval: change, snapshot, commit and record another version. After approval, use a new change for a new approval; later drafts never replace the old approval.
7. **Build to match.** Wire the approved views to routes, data and actions without changing them; the screens then match the approved screenshots. `pnpm ape prototype data --check --change C-012` reads the approved version and fails (exit 1) when the data model has drifted; no approval exits 2. A later change to those screens starts again at step 1.

**The questions pass.** The checks measure the surface; a person's questions are another check. For each screen the change adds or changes, name the element on it that answers each of four questions, in the commit message or the change's file (the change's "What the person using it will ask" section holds the questions): who enters or is reached, and can they be seen by name; from what data, and how it is kept up to date; what it costs; what each control does. "Does not apply" is a fine answer, with a one-line reason. Simple is for the person using the screen: hiding who is in it or what a control does is not simple for them. A screen with an unanswered question is not ready for the critique.

**The critique, by a fresh agent, in its own turn.** After the full snapshot passes and before `ape prototype version`, an agent that did not draw the looks runs `ape-critique` on it, and its P0s are fixed first. In the studio a passing full snapshot from the Prototype page starts it by itself, as a fresh read-only turn whose answer the studio writes to `design/critique.md`; elsewhere, run it in a new session. If you drew the scenes, never run `ape-critique` yourself, not even at the end of your turn: end the turn after the passing full snapshot and say the critique comes next. This is words for now: nothing blocks the version yet, so the agent that records a version says in its report that both were done.

**What needs a prototype.** Every screen the product writes itself, in its app or its admin console (an extension in the product's own `packages/` included), and any change of look; the screens that come with BuffCore (sign-in, sign-up, the account, settings) or with an installed extension (`@buffcore/payments`' billing, the waitlist) are already approved and wear the product's theme, so make no scenes for them and wait for no approval of them (to see one in the product's theme, list its exported view in the surface's `src/prototype/views.ts` and give it a scene).

Draw the small visual inside a 44 px hit area, for example a 24 px icon inside a 44 px button.

**The chain.** A prototype comes after the change's plan and its design system (the `ape-plan-change` skill's chain): a component a screen needs that `design/components/` lacks is added first (the `ape-design-system` skill), and `pnpm ape design check` passes before the snapshot.

**For agents:** `ape mcp` offers `prototype_snapshot` (`scene` for one), `prototype_version` (`change`, `why`), `prototype_versions` (optional `change`), `prototype_compare` (`change`, `a`, optional `b`) and `prototype_data` (`change`); `design_check` checks the design system. Approving stays a person's, with no MCP tool.

**For people and programs outside the development server:** `pnpm ape prototype export [<commit>]`, with that commit checked out, writes its prototype as static files that run from any plain file server. `--json` on `snapshot` and `data` gives a stable result and exit codes (AI_NATIVE.md).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.