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.
In this repository23 other files it gives its agents.
- openhost-agent/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- address-commentsSkill
- auto-qa-changesSkill
- auto-qa-iphoneSkill
- batch-claude-runnerSkill
- code-review-checklistSkill
- cut-releaseSkill
- debug-integration-testSkill
- manually-qa-branchSkill
- measure-react-rendersSkill
- openhost-frontend-previewSkill
- openhost-sculptorSkill
- post-pr-to-slackSkill
- profile-sculptor-backendSkill
- promote-releaseSkill
- run-integration-testSkill
- storybook-screenshotSkill
- update-help-docsSkill
- update-review-rulesSkill
- update-specsSkill
- write-integration-testSkill
- write-release-notesSkill
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
- Very specific: line 10
When writing CSS/SCSS in the Sculptor frontend, use design tokens instead of hardcoded values.
- Distinctive: line 16
Read the source of truth directly:
- Distinctive: line 40
Read our custom token definitions:
- Distinctive: line 95
Run to find style violations:
≈ “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.
Files
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.cssThis file contains all Radix CSS variables including:
--space-1through--space-9(spacing)--font-size-1through--font-size-9(typography)--font-weight-light,--font-weight-regular,--font-weight-medium,--font-weight-bold--radius-1through--radius-6,--radius-full(border radius)
For color tokens, read the individual color files:
sculptor/frontend/node_modules/@radix-ui/themes/tokens/colors/*.cssThese 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.cssThis defines tokens for things Radix does not provide.
Radix Overrides
Global overrides to Radix component styles live in:
sculptor/frontend/src/styles/radix-overrides.cssGlobal Styles
Brand colors, utility classes, and theming live in:
sculptor/frontend/src/index.cssRules
- Never hardcode values that have a corresponding token or Radix variable
- Prefer Radix component props (e.g.,
<Flex gap="2">) overvar()when possible - Use
var()in SCSS modules for values that can't be expressed through props - 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:stylesDoes 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
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.

