OpenParable
Skip to content
← Back to skills

Frontend Design Tokens

Design
frontend-design-tokens

Frontend Design Tokens is an Agent Skill for design published in the imbue-ai/sculptor repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

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

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/imbue-ai/sculptor/blob/HEAD/.claude/skills/frontend-design-tokens/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/frontend-design-tokens, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

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