agentleFS
pahlevikunpahlevikun/levistack/skills/product/design-system-kit/SKILL.md

design-system-kit

Skill0 starsChanged 19 days agoMITView on GitHub

Build a design system step by step, then critique with it. Discover what exists (code, a live website, Stitch, screenshots), set the direction from a wide reference library, assemble tokens for type, space, shape, elevation and platform sizes, write DESIGN.md, critique the real screens against the new system, record component specs, set up the library and governance, validate and hand off. It calls color-kit for every color decision and ui-ux-kit for components, motion and UX. Fits mobile, desktop, web, TV and car. Use when the user wants a design system, token file, DESIGN.md or governance, to extract a site's design, or brand slides. Not for choosing a palette (color-kit), building one screen (ui-ux-kit) or brand identity.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run all steps. A step can be short (a line or two for a small request), but never skip one silently.

    line 46
  2. Distinctive:

    Read what exists. Use every source that applies: code, a website (static extractor and in-browser extractor), a Stitch project, screenshots.

    line 77
  3. Distinctive:

    If a system already exists and should stay, build from the as-found values instead of re-mixing.

    line 84
  4. Distinctive:

    Run every check from validate and handoff and name each with its result.

    line 102
  5. Distinctive:

    System first, critique second: No judgment of a screen without a system to judge it by.

    line 110
  6. Distinctive:

    Use the system that exists: Read the project's tokens, theme and components before proposing values.

    line 111
  7. Distinctive:

    Report what you ran: Every script and check is named with its result.

    line 118
  8. Distinctive:

    Every step ran, or has a one-line reason for being skipped.

    line 169
  9. Distinctive:

    Every script that ran is named with its result, and the preview was looked at.

    line 174

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Design system kit

A pipeline, not a menu. Every request goes through the same steps in the same order: find what exists, decide the system, then critique with it. The system comes first, so every critique is a check against a rule instead of a matter of taste.

This skill owns the system: token layers, type, space, radius, elevation, platform sizes, DESIGN.md, governance and the critique against the system. It calls two other skills instead of doing their work:

  • color-kit for every color decision: strategy, palette, roles, modes, contrast proof and stack binding.
  • ui-ux-kit for every component, state, motion and UX decision, on every platform.

product-polish-workflow audits a shipped product and prototype-wireframe answers one open question with a throwaway. Neither is a step here.

Run all steps. A step can be short (a line or two for a small request), but never skip one silently. If a step does not apply, write Step N: skipped, because ... and move on.

Paths are relative to this folder. Run scripts from specialities/design-system/.

The pipeline

StepNameOutputGuide
0FrameOne paragraph: product, users, platforms, region, what existsbelow
1DiscoverThe as-found sheetdiscover
2Direction and tokensdesign/ with tokens, CSS, DESIGN.md, report, preview. Calls color-kitdirection, color
3CritiqueFindings against the system, with exact fixescritique
4Components and motionComponent records in system format. Calls ui-ux-kitcomponents, motion
5Library and governanceStructure, docs, tests and the change processlibrary and governance
6ValidateEvery check run, with results, and the preview looked atvalidate and handoff
7Hand offFiles, adoption plan, rebuild commandvalidate and handoff

Steps 2 and 3 are the heart of it. Do not critique before Step 2 has produced a system. If the user only asked for a critique, still do Steps 0 to 2 first (the system can be the as-found one, read from their code), and keep them short.

Step 0: Frame

Say in a few lines, and ask only for what is missing, one question at a time with your recommended answer:

  • What the product is and who uses it.
  • Platforms: mobile, desktop, web, TV, car. Which one leads. Read platforms.
  • Region and language (it changes color cautions and layout direction).
  • What exists: a repo, a live site, a Stitch project, screenshots, or nothing.
  • What the user wants at the end: a system, a critique, a theme, a DESIGN.md, slides, or all of it.

Step 1: Discover

Read what exists. Use every source that applies: code, a website (static extractor and in-browser extractor), a Stitch project, screenshots. Write the as-found sheet. Greenfield means "nothing found", and that is a valid result. See discover.

Step 2: Direction and tokens

  1. Choose the non-color ingredients with the user: shape, type voice, motion profile, signature move, density and platform. Use the ingredient library.
  2. Load color-kit and run it for the color decisions. It frames the feeling, picks the strategy, builds the palette with this kit's builder, composes the modes, proves the contrast and binds the stack. Share one design/brief.json (see color). Do not state color rules here and do not invent hex values.
  3. Build everything in one pass: python3 scripts/theme/theme.py build --from-brief design/brief.json --out design/. It writes light and dark tokens, per-platform overrides, a DESIGN.md, a report and a preview, and exits non-zero on a failed check.
  4. If a system already exists and should stay, build from the as-found values instead of re-mixing. If a site is the inspiration, remix from the extraction. Never copy a brand's signature look.

Details: direction, color, motion, DESIGN.md format.

Step 3: Critique

Judge the real screens against the system from Step 2, top-down: purpose and hierarchy, spacing, type, color, shape, states, content, motion, accessibility, and fit for each platform. Every finding names the element and the exact token or value to change. Include what to change in the system itself. See critique and specialities/ui-critique/GUIDE.md.

Step 4: Components and motion

Load ui-ux-kit for each screen or component the system must serve. It specifies states, geometry, motion, UX and platform behavior (including the car and the TV). Record each component here in the system format: variants, sizes, states supported, component tokens that alias semantic tokens, platform mapping and status. See components, motion and the token specs in specialities/design-system/references/ (token-architecture, component-specs, states-and-variants, tailwind-integration).

Step 5: Library and governance

Decide how the system lives: where tokens are the source of truth, how components are built and documented, how changes are tested (visual regression, accessibility linting) and who approves them. See library and governance. Brand slides use the slide tooling in specialities/design-system/ (strategies, layouts, color logic, token validator).

Step 6: Validate

Run every check from validate and handoff and name each with its result. Look at the preview in light and dark at the lead platform's size. A failure sends you back to the step that owns it.

Step 7: Hand off

List the files, how to load them, the first three adoption tasks, the governance note, the assumptions and the rebuild command with the seed. Do not commit.

Rules that hold in every step

  1. System first, critique second. No judgment of a screen without a system to judge it by.
  2. Use the system that exists. Read the project's tokens, theme and components before proposing values. Keep what works.
  3. Every value comes from a scale. Spacing, type, color, radius and motion come from named tokens, not typed ad hoc.
  4. Accessibility is built in by the owners. Contrast comes from color-kit and is checked by the builder in both modes. Targets, states and gestures come from ui-ux-kit. This skill records the result and runs the gates.
  5. Each platform is its own input and distance. Tokens are shared. Sizes, focus, motion and layout are set per platform.
  6. Be specific and distinct. Mix ingredients to fit the brief. Do not start from indigo, Inter and a purple gradient. Pick one signature move.
  7. Give exact fixes. Name the element and the value, ordered by impact.
  8. Learn from sites, do not clone them. Take mechanics, not a brand's identity.
  9. Report what you ran. Every script and check is named with its result.
  10. One owner per decision. Color goes to color-kit. Components, motion and UX go to ui-ux-kit. This skill records their output and does not restate their rules. Never invent a hex or a motion time here.

What is in this folder

PathWhat it holds
references/The step guides above, plus platforms and the ingredient library. The color and motion guides here only say how to call color-kit and ui-ux-kit
specialities/design-system/The scripts, data, templates and token references. scripts/theme/ has the mixer, builder, extractor and DESIGN.md writer. data/theme/ has the ingredient library. scripts/ also has the token generators and the slide tools
specialities/design-system/references/Token architecture, component specs, states, Tailwind, library and governance, the Stitch DESIGN.md guide
specialities/ui-critique/The core critique method used in Step 3

Bundled helpers, from specialities/design-system/:

ScriptUse
scripts/theme/theme.pylist, explore, build, check, contrast, audit, bind. The command line for the steps. --from-brief reads a JSON brief
scripts/theme/check_pairs.pyThe one contrast gate: measures pairs, composites alpha, reads role names from tokens.json
scripts/theme/audit_colors.pyInventories color literals in a project and groups near duplicates
scripts/theme/bind.pyWrites the stack's color file: Flutter, Compose, SwiftUI, React Native, Vue
scripts/theme/scales.pyChart scales (categorical, sequential, diverging) with color-blind checks: theme.py scale
scripts/theme/mixing.pyBlends two colors in sRGB, linear, OKLab and OKLCH: theme.py mix
scripts/theme/names.pyNames a color with the nearest plain word: theme.py name
data/theme/names.jsonOur own list of about 100 plain color names (OKLCH values) that names.py reads
scripts/theme/mixer.pySeeded mixer: brief, domains, moods and platform to one recipe
scripts/theme/build.pyRecipe to ramps, light and dark roles, per-platform sizes, and every contrast check
scripts/theme/emit.pyWrites tokens.json, theme.css, platforms.css, tailwind-theme.css, DESIGN.md, report.md, preview.html
scripts/theme/oklch.pyColor math: OKLCH, gamut fit, WCAG and APCA contrast, color-blindness simulation
scripts/theme/extract_site.pyRead a website's design into JSON and an as-found DESIGN.md
scripts/theme/extract-in-browser.jsRead computed styles from a page that builds its CSS in the browser
scripts/generate-tokens.cjsCSS or Tailwind from a token JSON file
scripts/validate-tokens.cjsFind hard-coded values in code
scripts/embed-tokens.cjsEmbed tokens into CSS
scripts/generate-slide.py, search-slides.py, slide_search_core.py, html-token-validator.pyBrand slides
scripts/tests/test_theme.py, scripts/tests/test_validate_tokens.pyTests for the theme tools and the token validator
templates/stitch-example-DESIGN.mdA sample DESIGN.md written from a Stitch project

Related skills

  • color-kit: required at Step 2. Owns palette, roles, modes, contrast proof and stack binding.
  • ui-ux-kit: required at Step 4. Owns components, states, motion and UX on every platform.
  • challenge-me: stress-test the direction before you build it.
  • prototype-wireframe: sketch or prototype a screen before specifying it.
  • product-polish-workflow: audit and change a shipped product and run its journey QA. It calls this skill for the system.
  • write-plan: turn the adoption plan into tasks.
  • verify: prove accessibility or visual claims by running them.
  • polyglot-copywriter: clean the prose in DESIGN.md and the report.
  • handoff: pause the work and keep the state.

Done when

  • Every step ran, or has a one-line reason for being skipped.
  • A system exists (built, or read from the code) before any critique was written.
  • color-kit ran for the color decisions and ui-ux-kit ran for the components, or each has a reason it was skipped.
  • The tokens, DESIGN.md and report exist, and all contrast and platform checks pass.
  • Findings name the element and the exact token or value to change.
  • Every script that ran is named with its result, and the preview was looked at.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.