From loom
Design-token authoring guide for loom — OKLCH, references, themes, cycle detection, lint discipline. Auto-invoke when the user mentions tokens, palette, theme, color, spacing, radius, typography.
How this skill is triggered — by the user, by Claude, or both
Slash command
/loom:loom-tokensThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Tokens live as YAML under `tokens/<namespace>.yaml` and resolve through a pure function.
Tokens live as YAML under tokens/<namespace>.yaml and resolve through a pure function.
color, typography, spacing, radius, motion, theme. You can add more.
Use {namespace.path} for inter-token references. The resolver is pure: same inputs → same output.
# tokens/color.yaml
seed:
hue: 250
chroma: 0.20
accent:
primary: oklch(0.65 {seed.chroma} {seed.hue})
Use OKLCH (perceptual lightness) rather than hex. Better for theme generation, contrast math, and dark-mode mirroring.
Cycles error at parse time, naming the cycle path. token_set re-validates before persisting.
/loom:validate ds-lint flags raw color literals outside the token graph. Escape:
// loom-ignore-next-line
const url = "url('data:image/svg+xml;...')";
tokens/theme.yaml defines theme-keyed values. The default theme is light. Override per-token by
publishing a theme-scoped key.
Don't pick random hexes. Set seed.hue and seed.chroma; let the rest of the palette derive.
For dark mode, mirror lightness via oklch(0.18 …) rather than inverting.
token_get, token_set, token_list, token_resolve_all. All accept an optional project arg.
Provides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.
npx claudepluginhub sokoliem/loom --plugin loom