agentleFS
imbue-aiimbue-ai/sculptor/.claude/skills/frontend-design-tokens/SKILL.md

frontend-design-tokens

Skill246 starsChanged 5 months agoMITView on GitHub

Guide for using design tokens in the Sculptor frontend. Use when writing or reviewing CSS/SCSS to pick correct token variables.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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:

    When writing CSS/SCSS in the Sculptor frontend, use design tokens instead of hardcoded values.

    line 10
  2. Distinctive:

    Read the source of truth directly:

    line 16
  3. Distinctive:

    Read our custom token definitions:

    line 40
  4. Distinctive:

    Run to find style violations:

    line 95

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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

Frontend Design Tokens

When writing CSS/SCSS in the Sculptor frontend, use design tokens instead of hardcoded values.

Where to Find Tokens

Radix Built-in Tokens (spacing, font sizes, radius, colors, font weights)

Read the source of truth directly:

sculptor/frontend/node_modules/@radix-ui/themes/tokens/base.css

This file contains all Radix CSS variables including:

  • --space-1 through --space-9 (spacing)
  • --font-size-1 through --font-size-9 (typography)
  • --font-weight-light, --font-weight-regular, --font-weight-medium, --font-weight-bold
  • --radius-1 through --radius-6, --radius-full (border radius)

For color tokens, read the individual color files:

sculptor/frontend/node_modules/@radix-ui/themes/tokens/colors/*.css

These provide 12-step scales (e.g., --gray-1 through --gray-12, --accent-1 through --accent-12).

These are all loaded via @radix-ui/themes/styles.css which is imported in Main.tsx.

Custom Tokens (animation, z-index, shadows, semantic colors)

Read our custom token definitions:

sculptor/frontend/src/styles/tokens.css

This defines tokens for things Radix does not provide.

Radix Overrides

Global overrides to Radix component styles live in:

sculptor/frontend/src/styles/radix-overrides.css

Global Styles

Brand colors, utility classes, and theming live in:

sculptor/frontend/src/index.css

Rules

  1. Never hardcode values that have a corresponding token or Radix variable
  2. Prefer Radix component props (e.g., <Flex gap="2">) over var() when possible
  3. Use var() in SCSS modules for values that can't be expressed through props
  4. No hex or rgb colors in SCSS files -- use Radix color variables or semantic tokens

Examples

/* Bad */
.card {
  padding: 16px;
  font-size: 14px;
  border-radius: 8px;
  transition: opacity 0.2s ease;
  color: #3d63dd;
}

/* Good */
.card {
  padding: var(--space-4);
  font-size: var(--font-size-2);
  border-radius: var(--radius-4);
  transition: opacity var(--duration-normal) var(--ease-default);
  color: var(--accent-9);
}

Audit Script

Run to find style violations:

cd "sculptor/frontend" && npm run lint:styles

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.