Skip to content
Back to skills

Ape Design System

ASecurity

Keep a product's design system in design/: its written contract (DESIGN.md: direction, voice and tone, color, type, components, layout, do's and don'ts; manifest.json), its theme, its own components and their showcase; the five directions; ape design check (the contract, no raw colors, fonts or sizes, only design-system components, a showcase scene for each), ape design diff against a commit, the hash in the snapshot, ape-critique after a look change; a new component as its own change.

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

Works with

  • cli
  • mcp

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned December 5, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Ape Design System?

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

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

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-design-system
description: "Keep a product's design system in design/: its written contract (DESIGN.md: direction, voice and tone, color, type, components, layout, do's and don'ts; manifest.json), its theme, its own components and their showcase; the five directions; ape design check (the contract, no raw colors, fonts or sizes, only design-system components, a showcase scene for each), ape design diff against a commit, the hash in the snapshot, ape-critique after a look change; a new component as its own change."
---

# The design system

A product's look and words live in one folder, `design/`, at its root (THEMING_AND_UI.md, "The design system"; PROCESS.md, stage 3). Screens draw only with it, so a change of look is a change there, seen in every scene. In BuffCore's repository, the playground's `apps/playground/design/` is the example.

**Choosing a look with a person happens in the studio's Brand step** (`ape ui`). Without the studio, you set the design system up by hand, as below; the format and the checks are the same.

## The format

| File | Holds |
|---|---|
| `design/DESIGN.md` | The contract: direction; **voice, tone and character**; visual theme; color roles; typography; components; layout and density; motion; depth; do's and don'ts; the agent guide |
| `design/screens.md` | Optional: what one screen needs beyond the contract and its view (its layout, its states, a measurement the view alone doesn't explain), one `## <screen>` section each, read by heading |
| `design/manifest.json` | Its identity and provenance: `schemaVersion` (`buffcore-design-system/v1`), `id` (the product's name), `name`, `source`, and the declared `DESIGN.md` and `theme.ts` |
| `design/theme.ts` | The product's `theme`: a starter theme (`themes.clear`, `themes.warm` or `themes.bold`, the Brand step's three; `themes.neutral` and `themes.soft` stay) or one made with `extendTheme`. The app, the console and the prototype take it from here |
| `design/components/` | The product's own components, one per file, named as the file (`Card.tsx` exports `Card`), built from BuffCore's and reading only tokens |
| `design/showcase.ts` | `showcase`: one scene per component, its view (`<Name>Showcase`) showing every state side by side; `prototype/scenes.ts` adds them to its scenes |

**DESIGN.md stays a contract.** It holds the rules every screen follows, not specs for one screen: `Components` says what each component is for and how it behaves, never where it sits on a given screen or its pixel sizes there. A screen's detail lives in its view and scene; when words are still needed, they go in `design/screens.md` under that screen's `## ` heading, so agents read only the screen they change. `ape design check` warns, without failing, when DESIGN.md passes about 40 KB or one of its sections about 15 KB.

## Reference study

Before choosing a direction, study real products. If the person already gave a brand or a study (a folder or file they point to), read that instead and skip the capture.

1. **Collect pictures.** About 10 to 25 products: the ones the product's buyers already use, and modern products they admire. Take each at a computer width (1440) and a phone width (390), plus one inner page.
2. **Capture politely.** Read each site's `robots.txt` first and skip any page it closes. Skip any page behind a bot check or a login; never work around it. Hide cookie banners with CSS rather than clicking them. Note every skip.
3. **Keep the pictures private.** They stay outside the repository (a folder of the person's, never committed) and are never published.
4. **Write `design/references.md`** from the pictures, and keep it: what buyers expect (the patterns that repeat), what they admire, what looks dated, and the gap this product can own; then each picture's path on this computer and what it shows (`~/refs/acme/home-1440.png`: a calm dashboard, one number first; a path in backticks or as a link), never the pictures themselves. `ape-prototype` reads it before drawing and `ape-critique` looks there first for references; `ape design check` notes a listed path that no longer exists. The studio shows its pictures beside the comp (the three deciding screens `ape-prototype` draws first), in the order listed: any path in `ape ui` on your own computer; under a host, only pictures inside the product's folder (others show a placeholder).
5. **The comp settles the look.** After the theme and before the scenes, `ape-prototype` draws the comp; once a person approves it, the scenes and the critique follow it. A later change to the look is a new comp to approve.

Learn patterns; copy no brand. No logo, name, color or layout is lifted from a single product.

## Choose a direction

Five original starting directions are in `references/directions/`: **Clear and calm** (tools and dashboards), **Warm and human** (people and services), **Technical and precise** (developers and operators), **Bold and playful** (creators and consumers), **Editorial and considered** (writing and taste). Each is a short `DESIGN.md` with a voice and a starting palette.

1. Read the brief, the journeys and `design/references.md`. With the person, choose the direction that fits the audience, the jobs and the study, or adjust one, or bring a brand.
2. Put the chosen direction into `design/DESIGN.md`, in the product's own words; put its values into `design/theme.ts` (the brand ramp, fonts, radius) and add the product's details. `manifest.json` names the product.
3. Run `pnpm ape design check`; then the snapshot; then `ape-critique` when the look changes.

The template's `design/DESIGN.md` is Clear and calm. A direction is a starting point, not a straitjacket: the product's own direction wins, written down in the same sections.


## Set it up by hand

0. **The contract.** Write `design/DESIGN.md` with the sections (Direction; Voice, tone and character; Visual theme; Color roles; Typography; Components; Layout; Motion; Depth; Do's and don'ts; Agent guide), or start from a direction and make it the product's. Write `design/manifest.json`: `schemaVersion` `buffcore-design-system/v1`, `id` the product's name (the `package.json` name), `name`, `source` (`type` and `origin`), and `files` (`design: DESIGN.md`, `theme: theme.ts`). `pnpm ape design check` holds both.
1. **The theme.** In `design/theme.ts`, `export const theme = extendTheme(themes.neutral, { key: 'myapp', label: 'MyApp', color: { light: { … }, dark: { … } } })` (`extendTheme` and `themes` from `@buffcore/tokens`; THEMING_AND_UI.md, "Themes"). Give only what makes it yours. A brand color is the eight `brand-*` colors together (`brand-solid`, `brand-hover`, `brand-pressed`, `brand-on-solid`, `brand-tint`, `brand-tint-strong`, `brand-ink`, `brand-border`) and `text-link`, in `light` and `dark`, each `#rrggbb`. Nothing derives the nine from one color yet (the brand ramp generator comes with `orgs`), so choose them by Neutral's pattern (print it: `themes.neutral.color.light` and `.dark`). Light: `brand-solid` is the main color under a white `brand-on-solid`, `brand-hover` and `brand-pressed` two darker steps of it, `brand-tint` and `brand-tint-strong` its two palest washes, `brand-ink` about as dark as `brand-hover`, `brand-border` a mid-light step, and `text-link` the same as `brand-solid`. Dark flips it: `brand-solid` and `text-link` a light step, `brand-hover` and `brand-pressed` lighter still under a dark `brand-on-solid`, the tints dark washes, `brand-ink` light, `brand-border` a mid step. Type, shape and space stay the starter's until you give `font`, `radius` and the like. The `contrast` mode (high contrast) stays the starter's until you give `color.contrast` its own. A full `pnpm ape prototype snapshot` checks the theme in every mode and names each token that fails (text on its ground 4.5:1, 7:1 in `contrast`; `brand-solid` 60° of hue from `success-solid`).
2. **A component** in `design/components/<Name>.tsx`, and every word a prop. In the app it reads the theme as `@buffcore/ui` does: `StyleSheet.create((theme) => ({ … theme.color['surface-panel'], theme.space['space-3'], theme.radius['radius-panel'] … }))` from `react-native-unistyles`, with `Text` and the rest from `@buffcore/ui`. In the console it uses the CSS variables (`var(--surface-panel)`, `var(--space-3)`).
3. **Its showcase view,** `<Name>Showcase` in `design/components/<Name>.showcase.tsx`: a caption above each state. BuffCore's own `Board`, `State` and `Row` aren't exported, so write them plain. In the app, put the states inside `AppFrame` and `Page` from `@buffcore/ui`, which paint the page (a bare `View` has no background, and dark mode fails the contrast check); in the console, a `div` with `background: 'var(--surface-canvas)'`. The showcase's words go through `t()`, with their keys in the surface's catalog (`apps/app/src/i18n/en.ts` and each language beside it, `apps/admin/src/i18n/`): `design/` has no catalog of its own.
4. **Show it:** the view in the surface's `src/prototype/views.ts` and its scene in `design/showcase.ts` (the checks, below), then the snapshot (the `ape-prototype` skill).

## The checks

`pnpm ape design check` reads the screens (each surface's `src/`, leaving out its tests, `i18n/`, `prototype/` and the app's routes in `src/app/`), `design/components/` and the design contract (`DESIGN.md`, `manifest.json`). It fails (exit 1) on:

- **The contract:** no `design/DESIGN.md`, a missing required section (direction; voice; color; type; component; layout; do and don't; agent), a section with no body, or a missing/invalid `design/manifest.json` (schema, the product's `id`, `name`, `source`, the declared `DESIGN.md` and `theme.ts`).

- **A raw color:** a hex color (`#1e59cd`), a color function (`rgb(…)`, `hsl(…)`, `oklch(…)`), or a color style given a word (`color: 'white'`; `transparent`, `currentColor` and `inherit` are fine). Use a color token.
- **A raw font:** `fontFamily` given a string. Use the theme's font.
- **A raw size:** a type, space or shape style given a number other than 0 (`fontSize: 16`, `gap: 4`, `lineHeight: 1.4`, `16 * scale`) or a length in a string (`'8px'`, `'1px solid var(--border-hairline)'`). The styles: `fontSize`, `lineHeight`, `letterSpacing`, every `padding…` and `margin…`, `gap`, `rowGap`, `columnGap`, and every `border…` (radius, width, the shorthands). Widths, heights and positions are layout, not sizes: numbers are fine there.
- **A component from outside the design system:** an element (`<Name …>`) imported from a package other than `@buffcore/ui`, `@buffcore/admin-shell` and `@buffcore/app-shell`. React's own and React Native's layout primitives (`View`, `ScrollView`, `FlatList`, `SectionList`, `Image`, `Pressable`, `ActivityIndicator`, `KeyboardAvoidingView`) and `react-native-svg` are fine; React Native's `Text`, `TextInput`, `Modal` and controls are not. The product's own files (relative imports) are its screens' parts and `design/components/`.
- **A component with no showcase scene:** a file in `design/components/` with no scene in `design/showcase.ts` whose view is `<Name>Showcase`.

Comments are skipped. `--json` gives the problems and the design system's hash: 0 ok, 1 a problem found, 2 could not run. An agent runs it as the `ape mcp` tool `design_check`, and the diff below as `design_diff`.

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

`ape design check` gives advisory hints on the tells listed in `THEMING_AND_UI.md` under “The design system”.

## The critique

When a look changes, run `ape-critique` after the snapshot passes. It scores Look from the screenshots before reading the contract, then reviews the other six dimensions and reports Keep / Fix / Quick wins. Take the fixes back through this skill, the snapshot and the critique.

## The hash and the diff

- **The hash** is a sha256 over the tokens, resolved in every theme and mode the snapshot checks, and the sources in `design/components/`. `pnpm ape prototype snapshot` writes it into `report.json`, and the tokens and component hashes into `design.json` beside it: commit both.
- **`pnpm ape design diff --against <commit>`** compares the design system now with that commit's (the `design.json` of its newest snapshot): the tokens changed per theme and mode, the component files added, changed or removed, and the scenes they reach. A component reaches the scenes whose views import it. A token reaches the scenes whose views' files name it; a token no file of the product names is read by BuffCore's components, so it reaches every scene.

## A new component, as its own change

A component enters the design system before a screen uses it, in a change of its own (`type: design` in `plan/changes/`, the `ape-plan-change` skill):

1. Write `design/components/<Name>.tsx`, reading only tokens; give every word as a prop (the caller's `t()`).
2. Write `<Name>Showcase` in `design/components/<Name>.showcase.tsx` with every state side by side, its words through `t()`; export it from the surface's `src/prototype/views.ts` and add its scene to `design/showcase.ts`.
3. `pnpm ape design check`, then `pnpm ape prototype snapshot --scene <its key>` while you work (`--scene 'design-*'` for the whole showcase), and one full snapshot when the change is done (the `ape-prototype` skill).
4. Commit with the snapshot's `report.json`, `data.json` and `design.json`; the commit is approved like any look. Then the screens use it, in their own change.

A component BuffCore lacks that any product would need the same way is a request to BuffCore (the `ape-request` skill), not a product component.

Files in this skill

  • SKILL.md12.6 KB
  • references/directions/bold-playful.md2.6 KB
  • references/directions/clear-calm.md2.4 KB
  • references/directions/editorial-considered.md2.6 KB
  • references/directions/technical-precise.md2.5 KB
  • references/directions/warm-human.md2.6 KB

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.