agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when building a theme or theming system for an interface. Covers token architecture, dark mode, contrast preservation across themes, and generating a coherent palette from a seed colour.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill theming --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/themingContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when building a theme or theming system for an interface. Covers token architecture, dark mode, contrast preservation across themes, and generating a coherent palette from a seed colour.
name: theming description: Use when building a theme or theming system for an interface. Covers token architecture, dark mode, contrast preservation across themes, and generating a coherent palette from a seed colour. metadata: category: design version: 1.0.0 tags: [theming, dark-mode, tokens, color, css]
Build themes that remain readable and coherent when switched. Dark mode is not an inversion; a palette that works on white will not work on black without being redesigned, and inverting it produces the vibrating, exhausting interfaces that dark mode is criticized for.
1. **Build on semantic tokens** — Components reference `--color-surface`, never `--grey-900`. Only the semantic layer changes between themes; components do not change at all. 2. **Design the dark theme, do not invert it** — Pure black is harsh and causes halation with white text. Use a very dark grey. Desaturate the accents: a colour that is vivid on white is glaring on dark. 3. **Preserve the contrast relationships** — Verify every text-on-surface pairing in every theme. A ratio that passes in light frequently fails in dark. 4. **Work in a perceptual colour space** — OKLCH lightness is perceptually uniform; HSL's is not. Generating a scale in HSL produces steps that look wrong even though the numbers are even. 5. **Respect the system, allow an override** — Default to `prefers-color-scheme`, and store an explicit user choice. 6. **Handle elevation** — In light mode, elevation is a shadow. In dark mode, shadows are invisible; elevation is a lighter surface.
**Semantic tokens, with the dark theme designed rather than inverted:**
:root {
/* Light: surfaces are near-white; elevation is a shadow. */
--color-bg: oklch(99% 0 0);
--color-surface: oklch(100% 0 0);
--color-surface-raised: oklch(100% 0 0);
--shadow-raised: 0 1px 3px oklch(0% 0 0 / 0.12);
--color-text: oklch(20% 0.01 250);
--color-text-muted: oklch(50% 0.01 250);
--color-border: oklch(90% 0.005 250);
--color-action: oklch(55% 0.20 255); /* the brand blue */
--color-action-text: oklch(100% 0 0);
}
[data-theme="dark"] {
/* Not an inversion. #121212-equivalent, not black: pure black causes
halation with white text. */
--color-bg: oklch(15% 0.005 250);
--color-surface: oklch(19% 0.005 250);
/* Elevation in dark mode is a LIGHTER surface. A shadow would be invisible. */
--color-surface-raised: oklch(24% 0.006 250);
--shadow-raised: none;
--color-text: oklch(93% 0.005 250); /* not pure white */
--color-text-muted: oklch(65% 0.008 250);
--color-border: oklch(30% 0.008 250);
/* The brand blue, desaturated and lightened. The light-mode value
(55% 0.20) glows uncomfortably against a dark surface. */
--color-action: oklch(68% 0.14 255);
--color-action-text: oklch(15% 0.005 250);
}**Verifying contrast mechanically, in every theme:**
const PAIRS = [
["--color-text", "--color-surface", 4.5], // body text: AA
["--color-text-muted", "--color-surface", 4.5],
["--color-action", "--color-surface", 3.0], // UI component boundary
["--color-action-text","--color-action", 4.5], // text on the button
] as const;
for (const theme of ["light", "dark", "high-contrast"] as const) {
for (const [fg, bg, required] of PAIRS) {
const ratio = contrastRatio(resolve(fg, theme), resolve(bg, theme));
if (ratio < required) {
throw new Error(
`Theme "${theme}": ${fg} on ${bg} is ${ratio.toFixed(2)}:1, ` +
`below the required ${required}:1.`
);
}
}
}A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…