/lich:themefrom lich
Write, port, or fix a color theme for the lich harness — the JSON that recolors lich's interface tokens and its xterm terminal palette, as a single file or as a versioned theme repository. Use when asked to build a lich theme, port a palette (Tokyo Night, Gruvbox, Catppuccin, Nord…) into lich, start or lay out a theme repository, publish or version a set of themes, ship an update to a theme somebody already installed, tweak the colors of an installed theme, or when a custom theme is rejected on import, listed in Settings › Appearance as a theme that can't load, or missing from it.
Ships in lich. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A lich theme is one JSON file with two color blocks that are consumed by two different engines:
app — 31 CSS custom properties applied to <html>. Repaints the whole
interface.terminal — an xterm.js theme object handed straight to the terminal.
Repaints the PTY panes only.They are picked independently in Settings › Appearance: the terminal picker has
a Match app theme default, so one theme can dress both.
Two optional keys go further, read by the native window (lich native) only:
syntax — colors the code in its review, diff and file views, by
CodeMirror highlighting tag. See Syntax highlighting.pair — the id of the theme's variant for the other scheme, which the
window draws while the OS asks for that scheme and Auto light/dark is on. See
Pairs.template.json, next to this file, is the same starter lich itself hands out
(Settings › Appearance › Save template). It names every supported color —
start from it, don't type the shape from memory.
lich imports both, and the difference is versioning, not colors. Ask the user which one they want before writing anything — unless they already said, or the answer is obvious (they named a repository, or they are fixing a theme that is already installed from one).
| Single file | Repository | |
|---|---|---|
| What it is | one <id>.json | a git repository: lich-theme.json manifest + the theme files |
| Install | Import › Choose file | Import › paste the URL or path |
| Versioned | no | yes — the manifest's version |
| Update later | re-import by hand | Update on the theme's row |
| Fits | trying a palette out, a one-off, a theme only you use | anything shared, and anything you will keep changing |
Default when the user has no preference: a single file for one throwaway theme, a repository as soon as there are two themes or somebody else will install it.
The themes directory is lich's to write — it stores a theme there on import, you never put one there yourself.
| OS | Directory |
|---|---|
| Linux | ${XDG_CONFIG_HOME:-$HOME/.config}/lich/themes/ |
| macOS | ~/Library/Application Support/lich/themes/ |
| Windows | %AppData%\lich\themes\ |
A lich started with LICH_DEV (that's task dev) uses themes-dev/ instead, so
a theme imported in one window is absent from the other.
Same work either way:
template.json and set id, name, scheme.app by role, not by hue — see the token table below.terminal. background/foreground are required; give the 16 ANSI
colors too unless you want xterm's built-in palette fighting your background.syntax from the source palette's own code colors, and set pair when
the palette has a light and a dark variant. Both are optional; drop the
template's pair when there is no other variant.node validate.mjs <file-or-directory> (in this skill's directory).
It checks the same rules the backend checks, so a pass means the install will
not bounce.<id>.json — and tell them the absolute path.The layout is the whole contract — the manifest carries the version, the themes sit beside it, and nothing lists anything:
my-lich-themes/
├── lich-theme.json {"name": "My themes", "version": "1.0.0"}
├── tokyo-night.json
└── gruvbox.json
Scaffold it in the user's working directory (or the repository they name):
mkdir -p my-lich-themes && cd my-lich-themes
git init
cat > lich-theme.json <<'EOF'
{
"name": "My themes",
"version": "1.0.0"
}
EOF
Write each theme beside the manifest. File names are yours — lich stores each
one as <id>.json in its own directory — so name them after the theme.
node validate.mjs my-lich-themes/ checks the manifest and every theme at
once, the same way an install reads them. Commit only once it passes.
Hand the install to them: Settings › Appearance › Import, paste the absolute path of the directory, Install. An absolute path is an accepted remote, so this works before the repository is pushed anywhere. Once it is on a host, the clone URL is what everyone else pastes.
Shipping a change to an installed pack: edit the themes, bump version in the
manifest, commit, push. The user takes it with Update on the theme's row.
formatVersion: optional, the theme file format. Omitted means 1, the only
format so far, so leave it out. When present it is a positive integer no
greater than the format this lich reads (currently 1); a newer one is
refused by that number ("theme format 2 is newer than this lich reads (up to
1); update lich"). lich writes it into every theme it stores.id: required, matches ^[a-z0-9][a-z0-9._-]{0,63}$. Not light, dark,
system or match; not a Windows device name (con, prn, aux, nul,
com1–com9, lpt1–lpt9) — the id names a file.name: required, non-blank, ≤ 128 characters.scheme: light or dark. Nothing else.app: every one of the 33 tokens must be present. An unknown token is an
error, not a warning.terminal: background and foreground required; the other 20 tokens
optional. Unknown tokens rejected.lich-theme.json is required at the root with a non-blank
name and a MAJOR.MINOR.PATCH version — a pre-release like 1.0.0-rc1 is
rejected, because the update check cannot order two of them. At least one and
at most 32 themes beside it, each with a distinct id.minLichVersion: the oldest lich release the pack is written for, as
MAJOR.MINOR.PATCH. An older lich refuses the install or update ("theme
pack needs lich X or newer (this is Y); update lich") and leaves what is
installed alone; a dev build, or one between release tags, skips the check.
Set it when a theme uses a token only a recent lich has, so an older lich
names the version it needs instead of an unknown token.formatVersion: the same rule as in a theme file; a newer one is refused
with the error prefixed manifest: .app accepts hex (#rgb … #rrggbbaa), a CSS color name, or
rgb()/rgba()/hsl()/hsla()/oklch()/oklab()/lab()/lch()/color().
var(), color-mix(), url(), attr(), image-set() are rejected —
a theme may not name a resource or defer a value.terminal accepts hex only. See the traps.syntax: optional, an object. Each key is a highlighting tag
(keyword, comment, variableName…) or a modifier wrapping one
(definition, constant, function, standard, local, special, as in
function(variableName)); an unknown tag or modifier is an error. Each value
is a color, accepted as an app color is, or an object with color and any
of bold, italic, underline, strikethrough set to true. An object
with neither a color nor a font style is an error.pair: optional, a theme id, not the theme's own. lich lists a theme whose
pair is installed with the same scheme as a theme that can't load,
bundled light and dark included. A pair nobody installed is fine: the
theme loads, with nothing to follow to.<id>.json, or declares a newer formatVersion shows up under the theme strip
as a theme that can't load, with the reason and a Remove action, never as a
theme to pick. A file whose name is not a valid theme id is only logged. Import
is the only path that ends with the theme selected and the errors spelled out
before anything is stored.scheme is not decoration. It toggles the .dark class on the root, which
drives every dark: variant in the components. A dark palette declared
"scheme": "light" renders half-lit.origin is overwritten with custom on install. Leave it out. source is
lich's too: it writes the repository and version there, and strips whatever a
picked file claimed.version ships nothing. The manifest version is the only thing
Update compares; new colors under the same number are reported as already up to
date. Bump it in the same commit that changes a theme.emerald-500, waiting is
amber-500, terminal search hits are amber, and diff gutters use both. They
are hardcoded, so check they still read on your background, card and
terminal background.syntax styles code by CodeMirror highlighting tag,
and resolves the way CodeMirror's HighlightStyle does: code takes the style of
the most specific tag that has one, so lineComment falls back to comment and
definition(propertyName) to propertyName; code no style reaches is drawn in
app.foreground. Style the broad tags first (keyword, string, comment,
number, typeName, variableName, propertyName, function(variableName),
operator, punctuation), then the specific ones a port wants apart.
"syntax": {
"keyword": "#c4a7e7",
"string": "#f6c177",
"comment": { "color": "#6e6a86", "italic": true },
"function(variableName)": "#ebbcba",
"constant(variableName)": { "color": "#83c092", "bold": true },
"annotation": "#e39b7b",
"heading": { "bold": true }
}
Port it from the source's own editor theme, not by guessing from the ANSI
colors: a JetBrains color scheme XML or a VS Code theme's tokenColors names
what each kind of token gets. lich tags Java's enum constants
constant(variableName), its annotations annotation, its field declarations
definition(propertyName) and its import paths namespace, which is what an
IDE's constant, metadata, field and package colors map to.
A lich that predates syntax ignores the key, so a pack adds it without a
minLichVersion.
A palette with a light and a dark variant pairs them, so the native window can follow the desktop: with Auto light/dark on, it draws the pair while the OS asks for the pair's scheme, and goes back when it stops. The theme the user chose stays the one in use.
{ "id": "forest-night", "scheme": "dark", "pair": "forest-day", ... }
{ "id": "forest-day", "scheme": "light", "pair": "forest-night", ... }
A pair need not point back. Three dark variants and one light one pair each
dark with the light, and the light with the variant most people pick: a user on
any dark variant comes back to it, since only the chosen theme is ever followed
from. A single-variant palette leaves pair out.
A lich that predates pair ignores the key, so a pack adds it without a
minLichVersion.
Surfaces (each *-foreground is the text drawn on that surface — keep the
pair contrasty, they are never used apart):
| Token | Role |
|---|---|
background / foreground | app ground and primary text |
card / popover (+ -foreground) | raised chrome: tabs, footer, dock, menus, dialogs |
sidebar / sidebar-foreground | the session sidebar |
accent / accent-foreground | the workhorse — hover and selected fill everywhere. Also used at /50–/60 opacity for hover, so it must read as a step off background, not as a color |
secondary (+ -foreground) | low-emphasis fills |
muted / muted-foreground | secondary text, resting icons, paths, meta |
primary / primary-foreground | the single high-emphasis button fill, and the Switch when on |
destructive | destructive actions and diff removals — must stay legible as red |
tone-pass / tone-wait | status tones: a pass (green) and a wait (amber) on session icons, pull request checks and reviews. Drawn as text and icons on background/card, so they need contrast there. Required since lich 0.53.0 — a pack that carries them is one an older lich rejects as unknown tokens, which is what minLichVersion: "0.53.0" names |
border | hairline seams. Translucent works well in dark (oklch(1 0 0 / 10%)) |
input | input and control edges, usually a touch stronger than border |
ring | focus ring, always visible |
chart-1 … chart-5 | data series |
sidebar-primary, sidebar-accent, sidebar-border, sidebar-ring (+ their -foregrounds) | the same roles scoped to the sidebar; mirroring the app values is fine |
The bundled Light and Dark are achromatic zinc by design — a chromatic palette is exactly what a custom theme is for.
Required: background, foreground.
Optional: cursor, cursorAccent, selectionBackground, selectionForeground,
black, red, green, yellow, blue, magenta, cyan, white,
brightBlack, brightRed, brightGreen, brightYellow, brightBlue,
brightMagenta, brightCyan, brightWhite.
cursorAccent is the glyph under a block cursor — set it to the background.
brightBlack is what dim TUI text lands on; too close to background and
Claude Code's own meta lines vanish.
validate.mjs passes — on the directory when it is a repositoryscheme matches the actual lightness of the paletteaccent is visibly a step off background but not a second brand colorborder reads as a hairline, not a ruleemerald-500 / amber-500 / destructive still read on your surfacesbackground sits well beside app background (they touch)syntax ported from the source's editor theme, the broad tags styledpair set on every variant of a light-and-dark palette, and on no
single-variant oneversion bumped in the same commit as a theme changeWhat SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
Other plugins' skills for the same job
npx claudepluginhub lichdotdev/lich-plugin --plugin lich