agentleFS
shinzoxDshinzoxD/knackbox/skills/coding/design-tokens/SKILL.md

design-tokens

Skill0 starsChanged 5 months agoApache-2.0View on GitHub

Implement a token and theming system — color, type, space,

21 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use brief-to-tasks, information-architecture and 6 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 4 projects that use this

  • fefogarciaSkill

    information-architecture

    Use when organizing content for digital products, designing navigation systems, restructuring information hierarchies, improving findability, creating taxonomies or metadata schemas, or when users mention information architecture, IA, sitemap, navigation design, content structure, card sorting, tree testing, taxonomy, findability, or need help making information discoverable and usable.

    Also in 5 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 3 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 4 projects that use this

  • AICreator-WindSkill

    design-review

    编码设计师工具。设计审计和修复。

    Also in 9 projects that use this

  • AnthropicSkill

    design-system

    Audit, document, or extend your design system. Use when checking for naming inconsistencies or hardcoded values across components, writing documentation for a component's variants, states, and accessibility notes, or designing a new pattern that fits the existing system.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never invent brand hex, typefaces, or a marketing palette.

    line 82
  2. Distinctive:

    Do not put primitive palette steps in component styles.

    line 85
  3. Distinctive:

    Do not invent Style Dictionary APIs.

    line 89

“Common” is measured: kept by at least 6 in 10 of the 19 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

Ship a theme as named values, not hex in components. Primitives hold palette and scale; semantics name intent; components consume those via CSS variables. New component APIs, Storybook, and versioning a primitive belong in design-system-contribution. Stay on the token graph.

Workflow

  1. Inventory. Existing tokens, Figma variables, CSS custom properties, Tailwind theme, or hex/magic numbers in code. Reuse names and values already in the system.
  2. Layers. Primitive (palette.blue.500, space.4) → semantic (color.text.primary, space.stack.md) → component tokens only when a control must diverge. Components never import primitives.
  3. Groups. Color, type (size / line / weight / family), space, radius, elevation, motion. Same naming pattern in every group.
  4. Themes. Dark, high-contrast, and density rebind semantics to different primitives. Same names; no if (dark) #fff in components.
  5. Runtime. CSS variables from the source. Style Dictionary or DTCG JSON when they need a pipeline or multi-platform output.
  6. Pairs. Text/bg and icon/surface pairs must meet contrast in every theme. Dark mode is a new check, not invert.
  7. Migrate. Replace call sites incrementally. List leftover hex.

Layers

LayerHoldsConsumed by
Primitiveraw palette / scale stepssemantic aliases only
Semanticintent (text.primary, space.stack)components, CSS
Componentoptional overridesthat component only

Output format

## Tokens: <system or surface>

**Source of truth:** existing files / Figma / none (structure only)
**Runtime:** CSS variables | Style Dictionary | other

### Layers
| Layer | Examples | Who may consume |

### Semantic set
| Token | Role | Light | Dark | Contrast pair |

### Scales
type, space, radius, elevation, motion — steps and names

### CSS / pipeline
custom-property names, generation, theme switch (class / data-attr)

### Migration
files to touch, leftover hex, breaking renames

### Open questions
missing brand values — do not fill with invented hex

Rules

  1. Semantic tokens in components. Good: var(--color-bg-surface). Bad: background: #0B1F3A or palette.navy.800.
  2. Never invent brand hex, typefaces, or a marketing palette. If the brand is missing, emit token names and ask; neutrals only as labeled placeholders.
  3. Do not put primitive palette steps in component styles.
  4. Dark mode changes bindings, not component CSS.
  5. One spacing scale. No ad-hoc 13px / margin: 17px.
  6. Name by role (color.text.muted), not appearance (color.gray).
  7. Do not invent Style Dictionary APIs. Describe source → transforms → CSS/JS; match their pipeline if one exists.
  8. A new Button or Storybook story is design-system-contribution. Point there; still tokenize pasted hex.
  9. Contrast pairs travel with the token, not as a follow-up.

Edge cases

  • No brand file: propose the graph and CSS variable contract; leave values as [missing — ask brand] — never a guessed hex.
  • Component request: "add a Button to the design system" → design-system-contribution. Offer tokens only if theming is in scope.
  • A11y audit: contrast of existing UI is accessibility-review. Token pairing for a theme stays here.
  • Tailwind / CSS-in-JS / native: map the same semantics; do not fork a second palette.
  • Forced-colors / high-contrast: extra theme or system colors; invert is not enough.
  • Breaking rename: alias the old name; do not silently swap hex.

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.