Finds a project's design contract (.design file or DESIGN.md), resolves which one wins, and threads its tokens through the UI as CSS variables, a Tailwind theme, or component props. Also writes design-system docs and checks for drift.
Ships in kheskills. 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.
You own the contract from finding it to a UI where every value resolves to a token. An agent that invents a color beside an existing token has failed the job.
A construction skill. It does ONE thing: make the UI obey the project's own design contract, and write the docs that keep an agent obeying it. It does not design a palette, a contrast pair or a type scale, review a screen for craft, or finish a screen whose tokens are right and which still feels flat (all three are khe-ui).
Every value in the UI resolves to a name in the project's own contract, on the role that name was given, and anything the contract lacks is reported, never guessed.
Five ways it fails:
var(--radius-xl), variant="outline", a documented variant no code has..design and a DESIGN.md with no stated order, a :root that drifted from the contract, a second styling system, a hand-built twin of a catalogued component.The fix: find the one contract, read its intent before its tokens, map each value to a token by the role it plays, land the tokens in the system the project already uses, and report every gap, drift and leftover literal in writing.
When this skill is invoked with no request, reply only with:
I'm ready to find your design contract and thread its tokens through the UI. Usage:
/khe-design-tokens [target]
Then wait. Give nothing else until the user asks.
Bind it the way the contract's author would review it: with the contract open beside every file. The gold examples in examples/ are the bar. If your file holds a literal, a second naming scheme or an unexplained candidate line where the closest gold holds none, that is the first fix. Then picture the single line the author would screenshot and send back: the accent on a surface that is not the primary action, a 6px beside a scale of 4 / 8 / 16, a --brand-2 nobody defined. If you can picture that screenshot, you have found the next fix. A gate pass is where this judgment starts, never where it ends.
Most of the quality is decided before any file changes: which contract, what it intends, and where each token lands. Under khe-auto the same loop runs with this skill's gate.
.design or <name>.design (match the extension in any case) and resolve extends, child over parent. Then look for DESIGN.md at the root, in docs/, design/ and .design/. If both exist, the .design is the contract and DESIGN.md is rationale. In a video project the order is frame.md, then design.md, then DESIGN.md. No contract: say so, scan the code for the system it already uses (global CSS, the Tailwind config, components.json, design notes), and offer to bootstrap one from the closest gold in examples/. Exit: you can name one contract file and its version, or you have said in writing that there is none..design requires schema: design.v1, name, version and agent.instructions, in YAML or JSON. Read gotchas and pov, then using-design-file or using-design-md. For a .design: agent.instructions, intent, constraints, policy and decisions, tokens, voice, components, in that order. For a DESIGN.md: the front matter binds, the body picks between tokens, and its Do's and Don'ts are hard constraints. Exit: you can state from the file what the accent is reserved for and what happens when a token is missing.node scripts/token-check.mjs <folder> on the source as it stands: that is the baseline. Write the token map: each token and where it lands, each existing literal and the token its role calls for, each gap. Report drift between the contract and the real CSS before fixing any of it, as added, removed or modified with a regression flag. For a docs job, the plan is the inventory in design-system-docs: tokens, component unions, two or three real call sites each. Exit: every literal in scope has a token or a named gap, and the drift report is written.integrations.shadcn.enabled is set, write css_vars into the declared CSS file. If the project imports @ui-sdk/core/web.css, add the --ui-* block from using-design-file, UI SDK. A missing token follows policy.if_missing (ask, nearest or invent_with_note) under a .design, and becomes a proposal comment under a DESIGN.md. Apply voice to UI copy with the same force as tokens. Exit: no value was typed that is not in the map.node scripts/token-check.mjs <folder> --gate, on the folder and never on one file, until it ends token-check passed. Fix the largest fault first: contract lines (contract-invalid:, two-contracts:), then names nothing defines, then literals, then candidates. Every line it prints is a value that will drift. inconclusive is never a pass. Exit: the last line reads token-check passed, and every candidate line has a one-line answer.TOKENS.md beside the contract from the template in verify: the gate's last line pasted, the token map, the drift, each literal left in place with its reason, what was not checked. Exit: the file exists and its Not checked line is filled in.px and name the missing token behind every survivor (using-design-md, Check).css_vars trusted in :root. Tokens outrank them; refresh the CSS after token edits (using-design-file, shadcn)..design wins and DESIGN.md is rationale; say so in the file and offer to converge (using-design-file, .design vs DESIGN.md).tokens.sound means silent (using-design-file, Sound, video, and companions).version: alpha; pass the field through (using-design-md, Gotcha)..design beats DESIGN.md. When both exist, the .design is the contract and DESIGN.md is rationale. Offer to converge them, because two sources drift apart..design edit is made in place with version bumped, and any path in locked needs a yes first. Drift is reported before it is fixed.Aliases: contract, apply-design-md. Posture: build.
Open the closest one before you build (step 4). Each file's top comment says what it is the gold for.
| Need | Example | What to learn |
|---|---|---|
A .design threaded through CSS and components | examples/design-file | One mirror file named by token path; components that hold no value of their own; the accent only on the primary action |
| A DESIGN.md threaded through CSS and components | examples/design-md | The front matter binds and the body picks: radii nested by role, the defined button-primary used instead of a second one |
| A project that styles with Tailwind | examples/tailwind-theme | Tokens land in the theme and the component stays in utilities; no bracketed value, no second styling system |
| A design-system doc page | examples/system-docs | The four-part order, a closed variant set with its default, a correct and an incorrect example, every name traced to a line |
| A finished handover | examples/design-file/TOKENS.md | The gate's last line pasted, the token map, the literals that stayed with their reasons, what was not checked |
teaching/ holds fourteen bad/good pairs, indexed in teaching. Use one to diagnose a fault; the bad halves are never starting points.
Open a reference only when the job needs it. Never load the whole folder.
| Job or symptom | Open |
|---|---|
A .design or <name>.DESIGN file exists; which contract wins; a drift check; shadcn css_vars; the --ui-* variables of Vercel's UI SDK; sound or video tokens | using-design-file |
| Only a DESIGN.md exists; linting it; proposing a missing token | using-design-md |
| Writing or repairing design-system docs; an agent keeps hardcoding colors, inventing variants or picking the wrong component | design-system-docs |
The last pass; what a gate line means; a symptom and its fix; the TOKENS.md template | verify |
| Briefing a reviewer who has not seen your plan | review |
| "Mine looks like this bug": the bad/good pair for it | teaching |
Check the work against this table before finishing.
| Never | Instead |
|---|---|
border-radius: 6px when the scale defines 4 / 8 / 16 | The scale token, such as var(--rounded-lg) |
font: 14px/1.5 Inter when the file defines Public Sans 16/1.6 | The typography token |
| A raw hex where a token exists | A token reference; every surviving literal reported with its reason |
| A missing token filled with a literal | A proposal comment for DESIGN.md; policy.if_missing for a .design |
| A silent rewrite of DESIGN.md | A proposal in a review or PR comment, applied after approval |
proposed_changes or a changelog inside the .design | The file edited in place with version bumped; git is the audit trail |
Stale css_vars literals trusted in :root | The CSS refreshed after token edits; tokens outrank them |
A sound added when the contract has no tokens.sound | Silence; an absent group means silent |
| An unknown DESIGN.md field flagged as an error | The field passed through unchanged |
| Docs written from memory | An inventory of tokens, component unions and two or three real call sites |
| "Use small text sparingly" in the docs | "Body 16px, captions 14px, never below 12px" |
| An open variant list | "Variants: primary, secondary, danger. Nothing else exists." |
| A gate line cleared by hiding the value | The value bound, or the line answered in TOKENS.md with its file and line |
| "No literals left" said from memory | The gate's last line, pasted |
TOKENS.md beside the contract, and the same in the reply: the contract and its version, the token map (token, where it lands), the drift report, the edits, the gate's last line, every literal left in place with its reason, and what was not checked.
Deferential to the contract and strict about literals. Say "there is no contract here" when there is none, and say "the contract sets 400ms; I would pick under 300ms; using 400ms" when the two disagree. Report every literal left in place with its reason.
Read both before producing anything. They outrank the defaults in this skill, and a project's .design contract or DESIGN.md outranks them.
khe-ui: the contract is silent on a scale, a contrast pair, dark mode or motion, and that gap needs its rules; and after tokens are threaded, when the screen still feels unfinished.khe-auto: runs this skill first whenever a project has a contract, then the skill that picks colors, sizes or curves.khe-sound: only when the contract has a tokens.sound group; its values outrank that skill's defaults.Names without the khe- prefix are other people's skills, not part of this one: stageshow is Benji Taylor's (benjitaylor/skills); animate, emil-design-eng and the rest are Emil Kowalski's (emilkowalski/skills); ui-sdk is Vercel's (vercel-labs/ui). Install them from their own repos.
Harshit Khemani. MIT.
LICENSE (opens in a new tab)README.md (opens in a new tab)assets/flow.svg (opens in a new tab)examples/design-file/Button.tsx (opens in a new tab)examples/design-file/PlanCard.tsx (opens in a new tab)examples/design-file/TOKENS.md (opens in a new tab)examples/design-file/button.css (opens in a new tab)examples/design-file/harbor.design (opens in a new tab)examples/design-file/plan-card.css (opens in a new tab)examples/design-file/tokens.css (opens in a new tab)examples/design-md/DESIGN.md (opens in a new tab)examples/design-md/SettingsCard.tsx (opens in a new tab)examples/design-md/settings-card.css (opens in a new tab)examples/design-md/tokens.css (opens in a new tab)examples/system-docs/Button.tsx (opens in a new tab)examples/system-docs/button.css (opens in a new tab)examples/system-docs/button.md (opens in a new tab)examples/system-docs/kit.design (opens in a new tab)examples/tailwind-theme/PlanRow.tsx (opens in a new tab)examples/tailwind-theme/app.css (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
14 skills in this plugin
/khe-autoThe mode that runs the rest. Reads a request, picks a playbook or the one or two skills that own it, says why in a line, then does the work in order. Covers every skill in this collection: the khe skills (UI craft, design tokens, SVG, diagrams, sound, launch films), the skills by Emil Kowalski and Benji Taylor linked beside them, Vercel's `ui-sdk`, `eve` and agent skills, and the engineering skills of Lauren Tan (poteto) and Matt Pocock. Use when a request names no skill, spans several, or someone says "auto", "which skill", "where do I start", "what order", "list the skills", "make this better", "I need a launch video", "build this screen", "build it with ui-sdk", "we ship Thursday", "the agent keeps doing this". When the request already names a skill, use that skill./khe-content-engineBuilds and runs a content engine: a folder of small linked markdown nodes in your own project (a voice sampled from posts you wrote, audience segments, one node per platform you use, hooks, repurposing rules, content types, cadence), then turns one idea into a different draft for each platform and names the node behind every choice. Also reviews drafts against the engine and tunes the node that caused a wrong line. It drafts; a person posts. Use when someone says "build me a content engine", "turn this into posts for X and LinkedIn", "repurpose this", "write in my voice", "make a thread out of this", "why doesn't this sound like me", or wants one idea written for several platforms. For a launch film use `khe-launch-film`, for a product demo `khe-demo`, for stickers `khe-sticker`, for faux product UI `stageshow` (Benji Taylor). When unsure which skill owns a job, `khe-auto`./khe-decisionPuts one decision to a council whose seats are the brain skills installed beside it: seats each brain whose published corpus covers the decision, has every seat answer only from its own corpus in that brain's cited reply format, then reports where the published material agrees, where it disagrees and why, what none of it covers, and a recommendation labelled as its own synthesis. A seat cites or says it is silent; it never speaks for a person, and no council sits on fewer than two relevant brains. Use when someone says "should I", "help me decide", "put this to the council", "what do the brains say", "convene the council", "khe-Decision", "which way should we go", or wants one decision weighed against several bodies of published work. For one person's view use that brain skill, such as `khe-brain-varun`; to pick a skill use `khe-auto`. A reading by Harshit Khemani, not endorsed by anyone it cites./khe-demoRecords a demo of the real running product: seeds its state, writes the flow as a script file, drives the actual web app or desktop app, and hands back a short clean take (mp4 or webm, plus a GIF for a README) in which one thing happens and every pointer move has a cause. Use when someone says "record a demo of the app", "screen recording for the README", "walkthrough video", "GIF of the feature", "capture the real flow", "show it working", or wants a product take to cut into a film. For a faux or illustrated UI that never runs the product use `stageshow`; for a cut, scored launch video use `khe-launch-film` (a take from here is often one shot inside it); for sound use `khe-sound`./khe-diagramDecides whether a diagram earns its place over a sentence or a table, picks the surface by who touches the picture next, then draws a finished editorial figure or edits a live tldraw canvas, with connector, accent and budget rules that also serve as the review. Use when someone says "can you diagram this", "draw the architecture", "make a flowchart", "sketch this on a board", "my diagram looks like Mermaid", or names tldraw, a .tldraw file or diagram-design. For SVG markup and animation use `khe-svg`; for a live chart inside a product use `khe-ui`; for a leader line on a product shot use `stageshow`; for a blueprint line illustration use `plotter`./khe-eveBuilds, changes and verifies agents on Vercel's eve framework (npm `eve`) so they survive production: scaffolds with `npx eve@latest init`, reads the installed version and its bundled docs before writing, memoizes every read in `defineDynamic`, gates and keys every side effect in code, and proves a change with a real turn instead of a green build. Four jobs: `new`, `add`, `verify`, `ship`. Use when someone says "build an eve agent", "add a tool to my agent", "npx eve init", "my eve agent calls the API twice", "is this eve agent safe to deploy", "why does my defineDynamic run so often", or a repo has an `agent/` folder and `eve` in its package.json. For Vercel deploy mechanics use `deploy-to-vercel` (Vercel), for the chat interface `khe-ui` or `ui-sdk` (Vercel), for the API surface itself Vercel's own `eve` skill and the docs bundled with the package. When unsure, `khe-auto`./kheskills:khe-design-tokensfrom kheskills
npx claudepluginhub hktitan/skills --plugin kheskillsOther plugins' skills for the same job