Skip to content
Skill

Setting up charcoal styled

Guides wiring charcoal design tokens into an existing styled-components codebase

Setting up charcoal styled is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
380
Last commit
License
Apache-2.0
Listing updated

Similar skills

About Setting up charcoal styled

This skill covers setting up the charcoal design system in projects already written with styled-components. It explains when the styled-components bindings are the wrong choice, since that package stays on Design Token 1.0 and pulls in the React component library as a peer. It walks through installing the matching major versions, wrapping the app in a theme provider alongside a token injector that emits CSS variables, and declaring the theme types for styled-components.

The guide also shows how to write components against the theme object, including the utility helpers for margin, padding, typography and focus rings, and lists the limits of those helpers such as the accepted font sizes and spacing scale. It includes an SSR-safe theme switching script and a migration path that moves a project off the styled-components layer step by step toward CSS variables.

Expected inputs are a React project using styled-components with the charcoal packages. The examples are written in TSX and TypeScript.

When your agent uses it

Use before writing or editing code that uses @charcoal-ui with styled-components, TokenInjector, createTheme or addThemeUtils, and whenever such a project's charcoal setup is unverified or incomplete.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (7 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

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

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

Or copy only this skill to ~/.claude/skills/setting-up-charcoal-styled:

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-styled &&
cp -R "$tmp/skills/setting-up-charcoal-styled" ~/.claude/skills/setting-up-charcoal-styled &&
rm -rf "$tmp"

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

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/setting-up-charcoal-styled to use it in every repository:

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-styled &&
cp -R "$tmp/skills/setting-up-charcoal-styled" ~/.agents/skills/setting-up-charcoal-styled &&
rm -rf "$tmp"

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

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/setting-up-charcoal-styled to use it in every project:

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-styled &&
cp -R "$tmp/skills/setting-up-charcoal-styled" ~/.cursor/skills/setting-up-charcoal-styled &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/setting-up-charcoal-styled inside it instead.

Cursor docs on skills

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

gemini skills install https://github.com/pixiv/charcoal.git --path skills/setting-up-charcoal-styled

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

Gemini CLI docs on skills

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

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-styled &&
cp -R "$tmp/skills/setting-up-charcoal-styled" ~/.copilot/skills/setting-up-charcoal-styled &&
rm -rf "$tmp"

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

VS Code docs on skills

Get the folder:

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

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

The SKILL.md format

What it does

Setup and version pinning
Covers installing the matching charcoal packages at major version 6 and the required peer dependency versions.
Theme provider and token injection
Shows how to supply the JS theme object and emit CSS variables for light and dark modes.
Typed theme declarations
Provides a module declaration that extends the styled-components default theme with charcoal types.
Theme utility helpers
Describes the margin, padding, gap, typography and focus ring helpers and their accepted values.
SSR theme switching
Explains a theme-setting script to inject into the page head to avoid flicker on load.
Migration path
Lists ordered steps for moving away from styled-components and the deprecated createTheme API.

Good for

  • Add charcoal design tokens to an existing styled-components React app
  • Set up light and dark theme switching with styled-components
  • Write a styled component that uses charcoal spacing and typography
  • Migrate a styled-components project toward charcoal CSS variables
  • Fix a typography size that the theme utility helper rejects

Setting up charcoal styled FAQ

Is Setting up charcoal styled suitable for a new project?

No. The skill recommends the CSS variables setup for new projects or when only tokens are needed, since the styled-components package is frozen at Design Token 1.0.

Which packages does the setup require?

It installs @charcoal-ui/styled, @charcoal-ui/theme and @charcoal-ui/react at major version 6, with styled-components 5.1.1 or newer and React 17 or newer as peers.

Why doesn't changing CSS variables switch the theme in styled components?

The JavaScript theme objects hold literal color values, so the ThemeProvider's theme prop must be swapped as well.

Can I use font size 32 with the typography helper?

No. The helper accepts only 12, 14, 16 and 20, so the skill shows how to expand the size 32 values by hand.

How do I install Setting up charcoal styled in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/setting-up-charcoal-styled to use it in all your projects, or to .claude/skills/setting-up-charcoal-styled 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 styled 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 styled?

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 styled?

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

Where this comes from

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

More from pixiv/charcoal

  1. Guides agents to pick and correctly set up pixiv's charcoal-ui styling routes

    • Open source
    • 380 GitHub stars
    • Developer tools
  2. Guides agents to pick the correct Charcoal design tokens instead of hardcoded values

    • Open source
    • 380 GitHub stars
    • Developer tools
  3. Builds a UI screen from a prepared Figma design pack and checks it against the spec

    • Open source
    • 380 GitHub stars
    • Developer tools
  4. Turns a Figma design or .fig export into structured files an agent can build from

    • Open source
    • 380 GitHub stars
    • Design and media