Platform
← Foundations

FOUNDATIONS FEATURE

Generate & refine skins

Generate skins from the CLI, from a seed colour or a natural-language prompt, then refine them with knobs. Rebuild re-emits tokens.css from skin.json.

Live demo
1 · Input Seed or prompt

A hex seed + algorithm (deterministic), or prose like "calm forest, soft corners" via an optional LLM.

2 · Source skin.json

The reviewable source of truth — algorithm, seed, knobs. skins:refine edits knobs; never hand-edit the artifact.

3 · Artifact tokens.css

skins:rebuild re-emits the full token contract (light + dark) from the source. This is what the site loads.

skins:generate / refine Deterministic seed mode Optional LLM prompt

Generate & refine skins

A skin has a source of truth (skin.json) and a generated artifact (tokens.css). You never hand-edit the artifact; you generate or refine the source and rebuild. There are two ways in.

Deterministic, with an optional LLM on top

  • Seed mode (default, no model) — skins:generate <algorithm> "<hex>" derives a full skin deterministically from a seed colour and knobs. Reliable, reproducible, needs no key.
  • Prompt mode (optional LLM) — skins:generate --prompt="a calm forest theme with soft corners" lets a model pick the algorithm, seed and knobs. Preview the resolution with skins:explain-prompt before emitting any CSS.
  • Refine — skins:refine <slug> --set=shadow_intensity:pronounced edits an existing skin's knobs (or --prompt= for LLM-assisted refinement), optionally forking under --as=<new-slug>.
  • Rebuild — skins:rebuild <slug> --write re-emits tokens.css from skin.json. This is the canonical path whenever the source changes.

Treating the skin as generated-from-source keeps it reproducible and reviewable: skin.json diffs cleanly, the artifact never drifts from hand-tweaks, and the LLM is a convenience for the first draft — never a dependency. The deterministic path always works without a model key.

© Edsger W. Dijkstra:"Simplicity is prerequisite for reliability."

1 · GenerateSeed + algorithm
# 1. deterministic: seed + algorithm → skin.json + tokens.cssbin/semitexa skins:generate balanced "#2f5e52" --name=moss --write

How it works

`skins:generate <algorithm> "<hex>"` derives a full skin deterministically from a seed colour + knobs — reliable, model-free, the default. `skins:generate --prompt="a calm forest theme with soft corners"` lets an LLM pick the algorithm, seed and knobs for you (preview it with `skins:explain-prompt` before emitting any CSS). `skins:refine <slug> --set=shadow_intensity:pronounced` edits an existing skin's knobs (or `--prompt=` for LLM-assisted refinement), optionally forking under `--as=<new-slug>`. `skins:rebuild <slug> --write` re-emits `tokens.css` from `skin.json` — the canonical path used whenever the source changes.

Why it matters

Treating the skin as generated-from-source keeps it reproducible and reviewable: `skin.json` diffs cleanly, the artifact is never hand-tweaked into drift, and the LLM is a convenience for the first draft — never a dependency. The deterministic path always works without a model key.