agentleFS
TomSzenessyTomSzenessy/AI_TEMPLATE/.agents/skills/design-tokens/SKILL.md

design-tokens

Skill0 starsChanged 11 days agoMITView on GitHub

Builds design tokens — colour roles, type scale, spacing, radius, shadows and every component with its states — for a reference product you studied or for your own original product, with original assets instead of logos, icons, illustrations or licensed fonts. Includes a WCAG contrast checker. Use when the user says "design tokens", "match the design system", "WCAG contrast", or "make it look like X".

35 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use brief-to-tasks, design-flow and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • julianoczkowskiSkill

    brief-to-tasks

    Break a design brief into an ordered checklist of independently buildable tasks using vertical slices. Saves as a markdown checklist. Use when user wants to break down work, create tasks from a brief, plan implementation order, or mentions "tasks" or "breakdown".

    Also in 7 projects that use this

  • julianoczkowskiSkill

    design-flow

    Run the full design-to-build workflow as a guided sequence. Orchestrates all designer skills in order, from grilling through review. Use when user wants to go through the complete design process, start a project from scratch, run the full flow, or mentions "design flow" or "full workflow".

    Also in 6 projects that use this

  • nandanosqlSkill

    design-brief

    Create a design brief that clearly communicates the product context, user needs, constraints, and success criteria to the design team — bridging PM requirements and design execution.

    Also in 8 projects that use this

  • solinkzSkill

    micro-interactions

    Expert micro-interaction architect for mobile apps, web applications, and responsive websites. Use this skill when the user asks to add, build, fix, audit, or consult on micro-interactions, animations, transitions, motion design, gesture feedback, haptics, loading states, skeleton screens, pull-to-refresh, swipe actions, scroll animations, button states, form validation feedback, toast notifications, modals, dropdowns, toggles, progress indicators, shared element transitions, spring physics, easing curves, motion tokens, or any interaction that provides visual/haptic/auditory feedback to user actions. Triggers on: "micro-interaction", "animation", "transition", "motion", "easing", "spring", "gesture", "haptic", "feedback", "loading state", "skeleton", "shimmer", "pull to refresh", "swipe", "drag", "hover effect", "press state", "focus ring", "scroll animation", "parallax", "stagger", "orchestration", "reduced motion", "View Transitions", "layout animation", "shared element", "hero animation", "morphing", "Framer Motion", "GSAP", "Lottie", "Rive", "React Spring", "anime.js", or any request to make an interface "feel better", "feel alive", "feel snappy", "feel responsive", or "feel polished".

    Also in 3 projects that use this

  • jpoindexterSkill

    design-system-audit

    Audit code for design system violations - grid spacing, tokens, existing components

    Also in 3 projects that use this

  • dillonluiSkill

    design-review

    Review a view or flow for UX and UI issues. Provides severity-ranked, actionable findings grounded in established design heuristics. Use when the user asks for design feedback, UX review, or UI critique.

    Also in 12 projects that use this

  • +1 more from julianoczkowski

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 32 edited versions we read keep these.

  • 4

    Distinctive

    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. Distinctive:

    Logos, icons, illustrations, photos, sounds: Use an open icon set (Lucide, Phosphor, Heroicons, Tabler, all MIT or similar) and make or …

    line 41
  2. Distinctive:

    Licensed fonts: If the reference product uses a paid or proprietary font, pick an open one with the same job: Inter, Geist, IBM Plex, …

    line 44
  3. Distinctive:

    Their copy: Every label and empty state gets written fresh.

    line 47
  4. Very specific:

    Add a pairs list for every text and background combination the app uses (including ["focus", "bg", "ui"] for the focus ring), then:

    line 80
  5. Distinctive:

    Every state the reference recon saw or the confirmed original brief requires, plus the ones it should have: focus, disabled, loading, …

    line 109

“Common” is measured: kept by at least 6 in 10 of the 32 edited versions of this file we could read. “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-tokens

Two modes. Reference mode (matching a product you studied): reads reference/recon.md and the screenshots in reference/screens/, both from product-recon. Original mode (your own product, no reference): reads the confirmed goal, users and accepted design from VISION.md and docs/design.md (product-kickoff writes both) and skips only the reference comparisons, marking them not applicable. Both modes write tokens.json (template: tokens.json in this folder), tokens.css, the theme mapping, and components.md — reference mode under reference/design/, original mode under docs/design/. Original mode never invents a competitor: if the brief is missing, ask the owner the few blocking questions rather than fabricate one.

# reference mode
python3 .agents/skills/design-tokens/contrast.py reference/design/tokens.json
# original mode
python3 .agents/skills/design-tokens/contrast.py docs/design/tokens.json

The rules

What you rebuild is the system: the roles, the scale, the patterns, the way a form or a modal behaves. Those functional patterns are widespread and users expect them; they are not owned by any one product, though a specific expression of them can be. What you never take:

  • Logos, icons, illustrations, photos, sounds. Use an open icon set (Lucide, Phosphor, Heroicons, Tabler, all MIT or similar) and make or commission your own illustrations. Do not trace theirs.
  • Licensed fonts. If the reference product uses a paid or proprietary font, pick an open one with the same job: Inter, Geist, IBM Plex, Manrope, Source Serif.
  • Their copy. Every label and empty state gets written fresh.
  • Their brand colour. Record it as a role (accent), use a neutral placeholder now, and brand-sweep gives you your own. A signature colour plus a distinctive layout may be protected as trade dress in some jurisdictions; change both before launch and get legal advice if you are unsure.

Step 1: measure, do not guess

Reference mode — from the screenshots (zoom in, use a colour picker on the user's machine). Original mode — from the confirmed design brief (docs/design.md): the chosen direction, mood words and any colours the owner already picked. When the brief is silent, use the defaults below.

  • Colour roles, not colours: bg, surface, border, border-input, text, text-muted, accent, on-accent, danger, success, warning. Count how many greys the app really uses. Usually 5 to 7.
  • Type scale: sizes, line heights, weights. Snap to a scale (12, 14, 16, 20, 28, 40 is common). Note the font category, not the font file.
  • Spacing: measure gaps between elements. It is almost always a 4 or 8 base. Write the scale.
  • Radius, shadow, motion: two or three of each.
  • Layout: max content width, grid, breakpoints, sidebar width, header height.

Step 2: write the tokens

Fill the mode's tokens.json (reference/design/ or docs/design/). Keep the role names. brand-sweep only changes values. Generate the mode's tokens.css as custom properties and map them into the project's theme (Tailwind's theme where that is the stack) so components use bg-surface text-muted, never raw hex.

Add a pairs list for every text and background combination the app uses (including ["focus", "bg", "ui"] for the focus ring), then:

python3 .agents/skills/design-tokens/contrast.py reference/design/tokens.json   # or docs/design/

AA is the floor (the checker owns the thresholds). Hex may be bare or #, 3, 4, 6 or 8 digits (alpha ignored: composite a transparent pair against the actual resolved background before the opaque check). It exits 1 on a failure; zero failures is a checked floor, not WCAG certification. Fix it in the tokens, not per component.

Step 3: component specs

For every component in product-recon's list (reference mode) or in the accepted design brief (original mode), one block in the mode's components.md:

Button
  variants  primary, secondary, ghost, danger
  sizes     sm 32px, md 40px, lg 48px
  states    default, hover, active, focus-visible (2px ring, accent), disabled, loading
  tokens    bg accent, text on-accent, radius md, font sm/600
  a11y      real <button>, visible focus, loading keeps the label for screen readers
  used on   S02, S07, S09

Every state the reference recon saw or the confirmed original brief requires, plus the ones it should have: focus, disabled, loading, error, empty. Keyboard and screen reader behaviour is part of the spec.

Step 4: build the primitives

Build the components in code once, in isolation (a /design route or Storybook), before any screen. Use an accessible base if the stack has one (Radix, shadcn/ui, React Aria). Screenshot the page. That is the design system check.

Output

tokens.json, tokens.css, the theme mapping, components.md, the primitives built, and a contrast report with zero AA failures. Then the project's issue-backed build loop (AGENTS.md) builds screens against the primitives.

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.