# Choosing charcoal tokens

> Choosing charcoal tokens is an open-source agent skill for developer tools. Guides agents to pick the correct Charcoal design tokens instead of hardcoded values. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/pixiv/charcoal/tree/main/skills/choosing-charcoal-tokens
- **Repository:** https://github.com/pixiv/charcoal
- **GitHub stars:** 380
- **License:** Apache-2.0
- **Skill name:** choosing-charcoal-tokens
- **Collection:** https://github.com/pixiv/charcoal
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill steers an agent writing UI code with @charcoal-ui away from raw hex colors, pixel spacing, font sizes and radii, and toward the named token that Charcoal assigns to each use. It points the agent to separate reference guides for color, typography, spacing, radius, border and overall design philosophy, and tells it which one to open depending on the decision at hand.

The skill sets a few fixed rules up front: text defaults to the text.default color, primary color is reserved for key actions, borders are drawn only when layout and background contrast cannot separate content, and typography is limited to four text styles with Body as the baseline. It also maps token names such as layout.30 or heading.M to the CSS custom property names used in the Charcoal theme, and suggests checking the theme's light.css file when a name is uncertain.

It works on plain text and Markdown guidance only, with no scripts. The user needs a project that already uses @charcoal-ui so that the theme package is installed. The skill guides both writing new screens and reviewing existing code.

## When your agent uses it

> Use before choosing any color, text style, spacing, radius or border value in code that uses @charcoal-ui, and whenever a literal is about to be written where a token exists — a hex color, a px padding or gap, a font-size, a border-radius or border-width. Charcoal has one correct token for each of these and the choice is prescribed, not a matter of taste. Also use when reviewing such code, or when deciding how dense, how loud or how bordered a screen should be.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/pixiv/charcoal/tree/HEAD/skills/choosing-charcoal-tokens)
- [License: Apache-2.0](https://github.com/pixiv/charcoal/tree/HEAD/skills/choosing-charcoal-tokens)

## Features

- **Token selection order:** A step-by-step decision order that favors an existing token and only uses a value when the named use case calls for it.
- **Color usage rules:** Guidance on text, icon, border and state colors, plus limits on primary and warning colors.
- **Typography guidance:** Rules for choosing among the four Charcoal text styles and pairing font-size with line-height.
- **Spacing and tap targets:** Layout and target spacing tokens, with a fallback to a default layout step when unsure.
- **Radius and border rules:** Criteria for when to round corners or draw borders and which border colors to use.
- **CSS variable name mapping:** Converts guideline token names into the exact --charcoal-* custom property names.

## Good for

- Pick the right text style for a heading in a Charcoal-based screen
- Replace hardcoded hex colors in a component with Charcoal color tokens
- Review a pull request for spacing values that should use layout tokens
- Decide whether a card needs a border or a background contrast instead
- Convert a token like container.primary.default into its CSS variable name

## Install

### Claude Code

This skill ships in the `charcoal` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add pixiv/charcoal
/plugin install charcoal@charcoal
```

Or copy only this skill to `~/.claude/skills/choosing-charcoal-tokens`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pixiv/charcoal.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/choosing-charcoal-tokens &&
cp -R "$tmp/skills/choosing-charcoal-tokens" ~/.claude/skills/choosing-charcoal-tokens &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/choosing-charcoal-tokens` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/choosing-charcoal-tokens` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pixiv/charcoal.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/choosing-charcoal-tokens &&
cp -R "$tmp/skills/choosing-charcoal-tokens" ~/.agents/skills/choosing-charcoal-tokens &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/choosing-charcoal-tokens` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/choosing-charcoal-tokens` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pixiv/charcoal.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/choosing-charcoal-tokens &&
cp -R "$tmp/skills/choosing-charcoal-tokens" ~/.cursor/skills/choosing-charcoal-tokens &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/choosing-charcoal-tokens` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/pixiv/charcoal.git --path skills/choosing-charcoal-tokens
```

Or copy the folder to `~/.gemini/skills/choosing-charcoal-tokens` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/choosing-charcoal-tokens`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/pixiv/charcoal.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/choosing-charcoal-tokens &&
cp -R "$tmp/skills/choosing-charcoal-tokens" ~/.copilot/skills/choosing-charcoal-tokens &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/choosing-charcoal-tokens` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/pixiv/charcoal.git
```

Then copy `charcoal/skills/choosing-charcoal-tokens` into your agent's skills folder as `choosing-charcoal-tokens`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Choosing charcoal tokens trigger?

It is meant to be used before choosing a color, text style, spacing, radius or border value in code that uses @charcoal-ui, and also when reviewing such code or deciding how dense or bordered a screen should be.

### What does Choosing charcoal tokens need to run?

No scripts are included. It relies on a project that uses @charcoal-ui, and it refers to node_modules/@charcoal-ui/theme/dist/css/v2/light.css to confirm token names.

### How are token names turned into CSS variables?

The skill gives a mapping rule: --charcoal-, then the category (color, space, radius, border-width, text), then the key with hyphens. For example, layout.30 becomes --charcoal-space-layout-30.

### Which clients does Choosing charcoal tokens support?

The skill is a plain SKILL.md folder and the content does not tie it to a specific client, so it is listed for all supported clients.

### How do I install Choosing charcoal tokens in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/choosing-charcoal-tokens to use it in all your projects, or to .claude/skills/choosing-charcoal-tokens in one project. Or install the charcoal plugin, which includes it: /plugin marketplace add pixiv/charcoal, then /plugin install charcoal@charcoal.

### Does Choosing charcoal tokens run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Choosing charcoal tokens?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Choosing charcoal tokens?

The closest alternatives to Choosing charcoal tokens are Choosing charcoal styling, Setting up charcoal CSS variables, Setting up charcoal tailwind, Setting up charcoal styled and Design system.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Choosing charcoal styling](https://ai-powered.com/skills/choosing-charcoal-styling): Choosing charcoal styling is an open-source agent skill for developer tools.
- [Setting up charcoal CSS variables](https://ai-powered.com/skills/setting-up-charcoal-css-variables): Setting up charcoal CSS variables is an open-source agent skill for developer tools.
- [Setting up charcoal tailwind](https://ai-powered.com/skills/setting-up-charcoal-tailwind): Setting up charcoal tailwind is an open-source agent skill for developer tools.
- [Setting up charcoal styled](https://ai-powered.com/skills/setting-up-charcoal-styled): Setting up charcoal styled is an open-source agent skill for developer tools.
- [Design system](https://ai-powered.com/skills/design-system-daveebbelaar): Design system is an open-source agent skill for design and media.
- [Frontend design](https://ai-powered.com/skills/frontend-design): Frontend design is a free agent skill for design and media.
- [Design system](https://ai-powered.com/skills/design-system-smartworldarafath): Design system is an open-source agent skill for design and media.
- [Design](https://ai-powered.com/skills/design): Design is an open-source agent skill for design and media.

---
Source: https://ai-powered.com/skills/choosing-charcoal-tokens
