setting-up-charcoal-css-variables

setting-up-charcoal-css-variables is a skill for Claude Code, Codex from pixiv/charcoal. It costs 96 tokens per session (1,568 once invoked), scanned A, original, Apache-2.0.

A setup guide for using Charcoal, pixiv’s React design system, with CSS variables. It explains the stylesheets and root class needed so Charcoal components receive their colors, spacing and other visual values.

In plain words
What is it for?
Use it when starting or checking a React app that imports @charcoal-ui/react and uses plain CSS variables. It covers installing matching Charcoal packages, loading light or dark theme styles, and enabling the current design tokens.
Why use it?
Charcoal components can appear unstyled when the theme stylesheet or required class is missing. It prevents that setup mistake and documents the needed package versions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when starting or checking a React app that imports @charcoal-ui/react and uses plain CSS variables. It covers installing matching Charcoal packages, loading light or dark theme styles, and enabling the current design tokens.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pixiv/charcoal/setting-up-charcoal-css-variables
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pixiv/charcoal --skill setting-up-charcoal-css-variables
Clone the repo
git clone --depth 1 https://github.com/pixiv/charcoal

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setting-up-charcoal-css-variables

README.md
[![agentmods](https://agentmods.dev/badge/skills/pixiv/charcoal/setting-up-charcoal-css-variables/github.svg)](https://agentmods.dev/skills/pixiv/charcoal/setting-up-charcoal-css-variables)
Your own site
<a href="https://agentmods.dev/skills/pixiv/charcoal/setting-up-charcoal-css-variables"><img src="https://agentmods.dev/badge/skills/pixiv/charcoal/setting-up-charcoal-css-variables/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for setting-up-charcoal-css-variables

Your own site · 80×15
<a href="https://agentmods.dev/skills/pixiv/charcoal/setting-up-charcoal-css-variables"><img src="https://agentmods.dev/badge/skills/pixiv/charcoal/setting-up-charcoal-css-variables.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,568 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00096 $0.01568
Opus 5.5 $0.00038 $0.00627
Sonnet 5.5 $0.00019 $0.00314
Haiku 4.5 $0.00010 $0.00157

Measured yesterday against content hash ecc0b562a5af, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

setting-up-charcoal-css-variables scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/setting-up-charcoal-css-variables/SKILL.md · 137 lines

How it starts

The opening of the file, as written. The whole thing — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Setting up charcoal with CSS variables

The lowest-dependency way to use charcoal: load two stylesheets, add one class, then write var(--charcoal-*) anywhere.

Install

npm install @charcoal-ui/react@^6 @charcoal-ui/theme@^6 react-aria react-stately

Pin the major. Design Token 2.0 and the CSS layout below are v6; v5 and earlier differ. Keep every @charcoal-ui/* package on the same major.

Peer dependencies of @charcoal-ui/react: react >=17.0.0, react-aria >=3.48.0, react-stately >=3.46.0. The two react-aria packages are not installed for you. React 18 and 19 both satisfy the range.

Skip @charcoal-ui/react if you only want tokens — @charcoal-ui/theme alone is enough.

Load the CSS

// Load once at the app root.
import '@charcoal-ui/react/dist/index.css' // component implementation CSS
import '@charcoal-ui/theme/css/v2/light.css' // Design Token 2.0 — light
import '@charcoal-ui/theme/css/v2/dark.css' // Design Token 2.0 — dark

dist/index.css only consumes var(--charcoal-color-*). It never defines them.

The failure this causes is lopsided in a way that misleads people: colors go through var(), but layout does not. Padding, radius, font-size, and line-height are written as literal values, so they keep working. Load dist/index.css alone and you get a correctly shaped, correctly sized button with a transparent background and default black text. Nothing errors — an undefined custom property just makes that one declaration invalid, and the property falls back to its initial value.

If a charcoal component looks structurally right but colorless, this is why.

Prefer @charcoal-ui/react/dist/layered.css over dist/index.css when you need to override charcoal styles from your own CSS. Its contents are wrapped in @layer charcoal, so any unlayered rule of yours wins without a specificity fight. It requires iOS 15.4+.

Opt in to Design Token 2.0 — required

Token 2.0 only applies inside .ch-token-v2.

Read the full file on GitHub · 137 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 137 lines · 96 tokens per session scan A ecc0b562a5af

Subscribe to this mod's changes

setting-up-charcoal-css-variables is a skill published in the GitHub repository pixiv/charcoal (376 stars, last pushed yesterday), licensed Apache-2.0. It adds 96 tokens to every session and 1,568 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-26.

Related

Other skills, from other repositories

kami-landing

Produce a print-grade single-page kami (紙 / 纸) document — warm parchment canvas, ink-blue accent, serif at one weight, no italic, no cool grays. The output reads like a professional white paper or studio one-pager, not an app UI. Multilingual by design (EN · zh-CN · ja). One self-contained HTML file, zero dependencies.

nexu-io/open-design · 81 tokens

fs-electric-studio

OpenDesign as an enterprise design platform: a buyer-forwardable proposal for a design-org's economic buyer — pain, value, ROI, rollout. Built as a decision-grade B2B sales deck for economic buyer, design VP, procurement.

nexu-io/open-design · 53 tokens

hps-bauhaus

A visual-design fundamentals course for new brand designers — grid, type, color, and the exercises that build the eye. Built as a decision-grade professional training deck for junior designers, new hires.

nexu-io/open-design · 45 tokens

ve-terminal-mono

OpenDesign from the CLI: driving the full design workflow with the od command — scripted, composable, agent-ready. Built as a decision-grade AI literacy deck for developers, power users.

nexu-io/open-design · 45 tokens

fs-editorial-forest

Art-directing a fashion house's annual report — the editorial system, the photography rhythm, and the data spreads. Built as a decision-grade design craft deck for brand stakeholders, exec audience.

nexu-io/open-design · 44 tokens

hps-memphis-pop

A pop-culture retrospective on how 1980s design language shaped today's apps — the scenes, the turning point, and the takeaway. Built as a decision-grade story deck for talk audience, design community.

nexu-io/open-design · 49 tokens