Skip to content
Agentmart
Submit a tool

css-tokens

Migrate hardcoded color, spacing, and typography values in static-site CSS to custom properties aligned with the static-web token layer and entity brand kit.

Skill by jeanchastel

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/jeanchastel-css-tokens

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Migrate hardcoded color, spacing, and typography values in static-site CSS to custom properties aligned with the static-web token layer and entity brand kit. Use when porting CSS from a website-builder export, normalizing a site against the brand kit, or introducing dark or per-brand mode; use design-system for Tailwind-based projects.

Use cases: design, frontend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/css-tokens

What's inside

Skill name
css-tokens
Description
Migrate hardcoded color, spacing, and typography values in static-site CSS to custom properties aligned with the static-web token layer and entity brand kit. Use when porting CSS from a website-builder export, normalizing a site against the brand kit, or introducing dark or per-brand mode; use design-system for Tailwind-based projects.
License
MIT
Instructions
71 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# CSS Tokens Refactor

Pull hardcoded literals out of stylesheets and replace them with CSS custom properties layered against the brand kit. Creates a `styles/tokens.css` if one does not exist.

## Profile gate

Use for repos with `profile: static-web`; see `static-web/static-web-standard.md` for the profile gate.

## When to Use

- After pasting CSS from a Hostinger, Zyro, Wix, or Squarespace export.
- When aligning a static site to the entity brand kit.
- When introducing dark mode or per-brand overrides.
- When the user says "tokenize this CSS", "align to the brand kit", "refactor to variables".

For app code with Tailwind, use the existing design-system skill instead. This skill targets plain CSS for static brochure sites.

## How It Works

### Principles

1. Tokens are the source of truth. Components reference semantic tokens; semantic tokens reference primitives.
2. Per-entity brand changes touch primitives only, under a `[data-brand="..."]` selector.
3. Dark mode overrides semantic tokens only.
4. One-off values are not always tokens. Tokenize values that repeat or carry meaning; leave true one-offs alone.

### Procedure

1. Scan the styles directory. Count unique values for color, font-family, font-size, line-height, spacing (margin/padding), border-radius, shadow, breakpoint.
2. Bucket repeats. Any value appearing 3 or more times is a token candidate. Single-use values are flagged but only tokenized if they carry meaning (e.g., a brand accent used in one CTA today).
3. Propose token names using the static-web semantic naming below.
4. Create or update `styles/tokens.css` with primitives in `:root`, per-brand overrides under `[data-brand="..."]`, dark overrides under `:root.dark` or `@media (prefers-color-scheme: dark)`.
5. Rewrite stylesheets to consume `var(--token)` instead of literals.
6. Emit a diff report: tokens introduced, literals replaced, files modified, leftover literals.

### Token taxonomy (static-web defaults)

Primitives (defined in `:root` and per-brand selectors):

- Colors: scale per the brand kit. OKLCH where the brand kit defines it; hex otherwise.
- Spacing: `--space-1` (4px) through `--space-12` (96px), or as the entity brand kit defines.
- Typography: `--font-display`, `--font-body`, scale `--text-sm` / `--text-base` / `--text-lg` / `--text-xl` / `--text-2xl` / `--text-display`.
- Radii: `--radius-sm` / `--radius-md` / `--radius-lg` / `--radius-full`.
- Shadows: `--shadow-1` / `--shadow-2` / `--shadow-3`.

Semantic (defined once, consumed by components):

- `--color-bg`, `--color-fg`, `--color-accent`, `--color-muted`, `--color-link`, `--color-link-hover`, `--color-border`.

Components reference semantic tokens only. Components do not branch on brand or mode; brand and mode change tokens, not components.

### Output

A summary like:

```
Tokens introduced:   12 (8 color, 4 typography)
Literals replaced:   147
Files modified:      3 (styles/main.css, styles/components.css, styles/tokens.css)
Leftover literals:   6 (see report)
```

Then a one-screen report with: tokens added (with values), unrefactored literals with file:line and reason, and any conflicts (the same value used semantically differently in different places).

## Cross-references

- `static-web/static-web-standard.md`, section "Brand kit integration".
- `theme/theme-standard.md` for the full three-layer model (Tailwind v4 + shadcn) used in app code.
- design-system skill for the Tailwind-based equivalent.

From jeanchastel/arkira, MIT.

More from jeanchastel/arkira

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 5, 2026 (24 days ago)
Last release
Oct 23, 2026 (6 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from jeanchastel

Cite this page

css-tokens skill. Agent Mart. https://agentmart.dev/skills/jeanchastel-css-tokens (last updated 2026-10-24)