# Setting up charcoal tailwind

> Setting up charcoal tailwind is an open-source agent skill for developer tools. Sets up charcoal design tokens and classes in a Tailwind CSS project. 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/setting-up-charcoal-tailwind
- **Repository:** https://github.com/pixiv/charcoal
- **GitHub stars:** 380
- **License:** Apache-2.0
- **Skill name:** setting-up-charcoal-tailwind
- **Collection:** https://github.com/pixiv/charcoal
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill guides an agent through wiring the @charcoal-ui Tailwind preset into a project. It covers installing the tailwind-config and theme packages, building the Tailwind config with light and dark theme maps, and choosing between Design Token 1.0 and 2.0. It explains the extra CSS imports and the ch-token-v2 class that Token 2.0 needs, since the preset alone does not define those variables.

The skill also warns about side effects of the preset. It replaces Tailwind's default color, spacing and radius scales at the top level of the theme, disables line-height utilities, and does not support the dark: variant. It shows how to restore stock colors through theme.extend and how to inspect the resolved config with resolveConfig to confirm what classes exist.

Expect a Node-based Tailwind project using JavaScript config files. The skill is text-only, with no scripts, and it also notes how to combine the preset with @charcoal-ui/react components.

## When your agent uses it

> Use before writing or editing code that uses @charcoal-ui with Tailwind, and whenever such a project's charcoal setup is unverified or incomplete. The v2 token route still needs the theme CSS and the .ch-token-v2 opt-in, which the preset does not supply.

## 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/setting-up-charcoal-tailwind)
- [License: Apache-2.0](https://github.com/pixiv/charcoal/tree/HEAD/skills/setting-up-charcoal-tailwind)

## Features

- **Preset installation steps:** Lists the npm packages and peer dependency versions needed for the charcoal Tailwind preset.
- **Design Token version choice:** Explains how to enable Token 2.0 versus staying on Token 1.0 and what each requires.
- **Theme CSS wiring:** Covers importing the v2 light and dark CSS files and applying the ch-token-v2 class to the page.
- **Default scale replacement warnings:** Describes how the preset overrides Tailwind's stock colors, spacing and radius and how to restore them.
- **Dark theme configuration:** Shows how to map light and dark themes via OS preference or a data-theme attribute.
- **Common mistake reference:** Tabulates frequent setup errors with the fix for each.

## Good for

- Add charcoal design tokens to an existing Tailwind project
- Fix charcoal colors that disappear after enabling Design Token 2.0
- Restore default Tailwind color classes alongside charcoal tokens
- Set up light and dark themes for a charcoal-based app
- Check which charcoal color classes the Tailwind config generates

## 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/setting-up-charcoal-tailwind`:

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

For one project only, put the folder in `.claude/skills/setting-up-charcoal-tailwind` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/setting-up-charcoal-tailwind` 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/setting-up-charcoal-tailwind &&
cp -R "$tmp/skills/setting-up-charcoal-tailwind" ~/.agents/skills/setting-up-charcoal-tailwind &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/setting-up-charcoal-tailwind` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/setting-up-charcoal-tailwind` 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/setting-up-charcoal-tailwind &&
cp -R "$tmp/skills/setting-up-charcoal-tailwind" ~/.cursor/skills/setting-up-charcoal-tailwind &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/setting-up-charcoal-tailwind` 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/setting-up-charcoal-tailwind
```

Or copy the folder to `~/.gemini/skills/setting-up-charcoal-tailwind` yourself.

### VS Code

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

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

For one project only, put the folder in `.github/skills/setting-up-charcoal-tailwind` inside it instead.

### Other agents

Get the folder:

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

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

## FAQ

### Why do colors disappear when unstableTokenV2 is enabled?

The preset only emits var() references to --charcoal-color-* variables. Those are defined by the v2 theme CSS, so that CSS must be imported and the ch-token-v2 class added to the html element.

### Does the dark theme follow the OS setting for Design Token 2.0?

Not by default. The v2 theme CSS defines dark only under data-theme dark, so the OS preference block in the config does not switch v2 tokens. You either set data-theme from JavaScript or add a bridge rule.

### Why are my stock Tailwind classes like bg-red-500 gone?

The preset writes colors, spacing and other scales at the top level of theme, which replaces Tailwind's defaults. You can add them back under theme.extend.

### Can I use Tailwind's dark: variant with charcoal?

No. The skill says dark: is unsupported because token names stay the same across themes. Use the theme map instead.

### How do I install Setting up charcoal tailwind in Claude Code?

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

### Does Setting up charcoal tailwind 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 Setting up charcoal tailwind?

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 Setting up charcoal tailwind?

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

## Where this comes from

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

## Alternatives

- [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.
- [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 styled](https://ai-powered.com/skills/setting-up-charcoal-styled): Setting up charcoal styled is an open-source agent skill for developer tools.
- [Choosing charcoal tokens](https://ai-powered.com/skills/choosing-charcoal-tokens): Choosing charcoal tokens is an open-source agent skill for developer tools.
- [Design system](https://ai-powered.com/skills/design-system-smartworldarafath): Design system is an open-source agent skill for design and media.
- [Design system](https://ai-powered.com/skills/design-system-daveebbelaar): Design system is an open-source agent skill for design and media.
- [Design kit](https://ai-powered.com/skills/design-kit): Design kit is an open-source agent skill for design and media.
- [Expo design system](https://ai-powered.com/skills/expo-design-system-scaledockhq): Expo design system is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/setting-up-charcoal-tailwind
