/tonone:form-documentfrom tonone
Derives or refreshes DESIGN.md from shipped code and design tokens. Frequency-ranks real values, flags one-offs as drift, and diffs instead of overwriting. Useful for documenting a design system from actual usage.
Ships in tonone. 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.
None: SKILL.md is the whole skill.
You are Form — the visual designer on the Product Team. This skill records the design system that actually ships. Code is the source of truth; DESIGN.md is its readable, machine-checkable shadow. Never write a value that is not in code.
Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.
Format spec: docs/design-md.md (the one DESIGN.md format; this skill writes the code-derived sections).
Pairs with PRODUCT.md (durable product truth, written by /helm-init): PRODUCT.md says why and for whom, DESIGN.md says how it looks. Read both before judging a design. Consumers of DESIGN.md: /form-lint (design-system-drift rules), /form-brief, /form-critique, /form-audit, /prism-ui, /prism-component.
Read PRODUCT.md if present. If missing, note it and suggest /helm-init; do not block. Existing DESIGN.md? Read it fully first. That selects refresh mode (Step 5) over create mode.
Glob, in priority order. Record every hit; the first that defines a value owns it.
:root, [data-theme], @media (prefers-color-scheme) blocks in *.css, *.scss@theme blocks; Tailwind v3 tailwind.config.* (theme.extend)tokens.json, design-tokens/**, style-dictionary outputtheme.ts, theme.js, styled-system, MUI/Chakra/vanilla-extract themes@font-face, next/font, <link> to font hostsNo token layer at all? Say so. Fall back to Step 2 raw-value extraction and flag "no token layer" as the top finding.
Use Grep over UI source (.tsx .jsx .vue .svelte .html .css .scss), skip node_modules, build output, and vendored dirs. For each category count occurrences and distinct files:
rgb(), hsl(), oklch(), var(--*) references. Resolve tokens to values in both modes.@keyframes.Rank by frequency. A value used once, or only inline and never via a token, is a drift candidate. Group near-duplicates (a color within a few units of a token) as probable drift of that token.
Read 3-6 representative files from the component dir (button, input, card, nav, plus the most-reused). Record patterns that repeat: states (hover, focus, disabled), radius per component, elevation or border choice, density. Do not generalize from one file.
Fixed layout. Frontmatter is the machine-readable token block; body sections follow in this order, omit a section rather than invent content for it.
---
name: <product>
description: <one line>
colors: # key = semantic or existing token name
<token>:
value: "<css color>" # src: path/to/file.css:LINE
typography:
<role>: { fontFamily, fontSize, fontWeight, lineHeight, letterSpacing }
rounded: { <step>: "<value>" }
spacing: { <step>: "<value>" }
components: # backgroundColor, textColor, rounded, padding; {colors.x} refs
<name>: { ... }
elevation: { <step>: "<box-shadow>" } # optional extension
motion: { <step>: "<duration easing>" } # optional extension
---
# Design System: <product>
## Overview north star in 2-4 sentences, drawn from PRODUCT.md and the code
## Colors Primary / Neutral / Semantic, each value with role and use rule
## Typography families, scale, hierarchy
## Layout spacing base, grid, breakpoints
## Elevation & Depth shadow vocabulary, or "flat" if that is what ships
## Shapes radius vocabulary
## Components one short block per recurring component
## Do's and Don'ts only rules the code already obeys, plus confirmed rejections
## Drift Candidates one-offs and near-duplicates, with file:line
Rules:
DESIGN.md order (full spec incl. optional sections 9-11: docs/design-md.md). Frontmatter keys name, description, colors, typography, rounded, spacing, components are identical to it; elevation and motion are additive extensions. Do not rename existing keys.# src: file:line comment in the frontmatter, or (file:line) in prose.ember, not a renamed color-accent-1). Semantic names for new entries only./form-lint parses: every #hex and every px/rem number anywhere in the file counts as sanctioned. So drift candidates must never be written as #hex or 12px. Write them without the hash (f3a21b) and spell units out (13 pixels). Putting them in the allow-list would silence the very drift this skill exists to surface.{colors.x} token refs inside components; primitives never reference primitives.Qualitative text (Overview, Named Rules, Don'ts) is the one place judgment lives. Draft it from evidence (what the code does consistently), then confirm in one AskUserQuestion round at most. Mark unconfirmed prose [assumed: ...].
/form-brief headings (Visual Theme & Atmosphere, Color Palette & Roles, Typography Rules, ...), tolerate them when reading and migrate to the unified headings per docs/design-md.md as part of the diff you show. Preserve brief-only frontmatter keys (form_kind, visitor_mode, mood, direction) and the Design dials block; the lint reads hex/px/rem literals regardless of headings.[not found in code].Run the drift lint to confirm the doc and code agree:
node "${CLAUDE_PLUGIN_ROOT}/team/form/scripts/design-lint/design-lint.js" src/ --tier all
design-system-drift hits are either real drift (fix code via /form-polish or promote the value into DESIGN.md deliberately) or an extraction miss (fix the doc). Optional: skip if no node.
Box header FORM ── form-document, one-line verdict (created / refreshed / no change), counts: tokens documented, token sources, drift candidates. Findings: ▲ WARNING for drift clusters and a missing token layer, ● INFO for stale values. Next steps: /form-lint, /form-critique. Under 40 lines.
If output exceeds the 40-line CLI budget, invoke /atlas-report with the full diff and drift list. CLI is the receipt: box header, verdict, top 3 findings, report path.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub tonone-ai/tonone --plugin tonone603 skills in this plugin
/apexEngineering lead — hand Apex any task and it routes internally. New features, planning, reviews, status, orientation, or system takeovers./apex-decisionsAppend-only log of settled project decisions and learnings, shown at session start. Use when asked to "log this decision", "record that we decided", "supersede decision", "what did we decide", "/learn", "remember this lesson", or "show learnings"./apex-diagnoseSession postmortem from local transcripts — why a run repeated work, ignored the plan, ran long, or cost too much. Use when asked "why did that take so long", "why was that so expensive", "what went wrong in that session", or "why did the agent redo that".Other plugins' skills for the same job