Web Design Reference Sheet Generator
Generate a project-specific design reference sheet and companion enforcement skill
from any website codebase, mirroring the structure of the
Figma Web Design Reference Sheet.
Mindset
Document what exists, not what should exist.
Every invented token is technical debt dressed as documentation — developers trust the
reference sheet and will use the wrong values in production. When data is missing, write
TBD — not yet defined. A reference sheet with honest gaps is more useful than one with
plausible fictions.
When to Use
Apply this skill when:
- Starting a new project and needing a living design token reference
- Onboarding a design system from an existing codebase
- Creating a Figma-compatible reference for designers and developers
- Auditing existing styles to identify undocumented or orphaned tokens
- Porting design tokens between frameworks
Workflow
See references/workflow.md for the full 8-step generation process:
Discover design tokens
grep -r "\-\-" src/ --include="*.css" -h | grep -E "^\s+--" | sort -u
grep -r "@theme\|@font-face\|@import" src/ --include="*.css"
Inspect existing components (read 3–5 representative files)
Check dark mode and accessibility patterns
Fill templates/skill-output.yaml — structured scratchpad validated against schemas/design-reference.schema.json
Generate docs/design/design-reference.md from the template
# Review populated scratchpad before generating final docs
cat templates/skill-output.yaml | grep -E "TBD|null" && echo "Gaps found — fill before generating"
Generate the enforcement skill from the enforcement skill template
bun run generate --template enforcement-skill --output ./{project-slug}/SKILL.md
Confirm output with a structured report listing populated sections and TBD items
bun run validate --schema schemas/design-reference.schema.json --input templates/skill-output.yaml
When NOT to Use
- The project has no CSS source files (generated styles only, e.g. CSS-in-JS with no extractable tokens)
- A design reference sheet already exists and only needs updating — use the companion enforcement skill's update workflow instead
- The user wants a generic design system template, not a project-specific one
Anti-Patterns
NEVER invent or infer design tokens that don't exist in source code
- WHY: Invented values create false documentation. Developers trust the reference sheet and may use wrong tokens, causing design inconsistencies that are hard to trace.
| BAD |
GOOD |
Infer --space-4: 1rem because it seems reasonable |
Document only values found in CSS; mark missing sections as TBD — not yet defined |
| Expand one brand colour into a full 9-shade palette |
Document only the hardcoded hex values found; note they are not formalised tokens |
NEVER generate the reference sheet before reading actual CSS/config files
WHY: Even well-known frameworks have project-level overrides. Reading source files is the only way to capture what is real.
# BAD: assuming defaults
# GOOD: always verify
grep -r "screens" tailwind.config.ts
NEVER leave sections empty without a TBD marker
- WHY: Blank sections appear complete;
TBD — not yet defined is an actionable signal that makes gaps impossible to miss.
| BAD |
GOOD |
## Dark Mode followed by empty content |
## Dark Mode followed by TBD — not yet defined |
NEVER use non-copy-pasteable code examples in the reference sheet
WHY: A reference sheet that requires editing before use wastes developer time and erodes trust.
/* BAD: placeholder that doesn't exist */
/* GOOD: actual token from source */
--color-brand-primary: #1a2b3c;
NEVER use a generic description in the companion enforcement skill
- WHY: A generic description means the skill doesn't activate correctly for the project. A common pitfall is copying the parent skill description verbatim.
- BAD —
description: Enforce design tokens for any web project
- GOOD —
description: Enforce design tokens for the Acme Corp marketing site
References
references/workflow.md — Full 8-step generation workflow
references/design-reference-template.md — Output template for docs/design/design-reference.md
references/enforcement-skill-template.md — Output template for the companion enforcement skill
templates/skill-output.yaml — Structured scratchpad; populate before writing any markdown
schemas/design-reference.schema.json — JSON schema for scratchpad validation
references/accessibility-guidelines.md — WCAG 2.1 AA criteria, contrast ratios, keyboard nav, ARIA
references/typography-principles.md — Hierarchy, readability, type pairing, modular scale
references/psychology-of-color.md — Colour associations, brand strategy, harmony, WCAG contrast
references/visual-hierarchy.md — The seven hierarchy variables, Z/F-patterns
references/grid-and-layout-theory.md — Column grids, 8-point system, responsive strategies
references/whitespace-theory.md — Macro/micro whitespace, density, hierarchy
references/gestalt-principles.md — Proximity, similarity, figure-ground, closure, continuity
1---2name: web-reference-sheet-generator3description: Generate a project-specific web design reference sheet (docs/design/design-reference.md) and companion enforcement skill for any website codebase. Extracts CSS custom properties, validates against a JSON schema scratchpad, inspects components, and produces a 12-section document covering colours, typography, spacing, layout, borders, shadows, motion, accessibility, dark mode, and Figma sync notes. Use when starting a new project, onboarding a design system, creating a Figma reference sheet, porting design tokens, or auditing existing styles. Triggers on: create a design reference, generate a style guide, document the design tokens, make a brand reference sheet, port design tokens, audit existing styles.4---56# Web Design Reference Sheet Generator78Generate a project-specific design reference sheet and companion enforcement skill9from any website codebase, mirroring the structure of the10[Figma Web Design Reference Sheet](https://www.figma.com/community/file/1318219306256490255/web-design-reference-sheet).1112---1314## Mindset1516**Document what exists, not what should exist.**1718Every invented token is technical debt dressed as documentation — developers trust the19reference sheet and will use the wrong values in production. When data is missing, write20`TBD — not yet defined`. A reference sheet with honest gaps is more useful than one with21plausible fictions.2223---2425## When to Use2627Apply this skill when:28291. Starting a new project and needing a living design token reference302. Onboarding a design system from an existing codebase313. Creating a Figma-compatible reference for designers and developers324. Auditing existing styles to identify undocumented or orphaned tokens335. Porting design tokens between frameworks3435---3637## Workflow3839See [`references/workflow.md`](references/workflow.md) for the full 8-step generation process:40411. Discover design tokens4243 ```bash44 grep -r "\-\-" src/ --include="*.css" -h | grep -E "^\s+--" | sort -u45 grep -r "@theme\|@font-face\|@import" src/ --include="*.css"46 ```47482. Inspect existing components (read 3–5 representative files)49503. Check dark mode and accessibility patterns51524. Fill [`templates/skill-output.yaml`](templates/skill-output.yaml) — structured scratchpad validated against [`schemas/design-reference.schema.json`](schemas/design-reference.schema.json)53545. Generate `docs/design/design-reference.md` from the template5556 ```bash57 # Review populated scratchpad before generating final docs58 cat templates/skill-output.yaml | grep -E "TBD|null" && echo "Gaps found — fill before generating"59 ```60616. Generate the enforcement skill from the enforcement skill template6263 ```bash64 bun run generate --template enforcement-skill --output ./{project-slug}/SKILL.md65 ```66677. Confirm output with a structured report listing populated sections and TBD items6869 ```bash70 bun run validate --schema schemas/design-reference.schema.json --input templates/skill-output.yaml71 ```7273---7475## When NOT to Use7677- The project has no CSS source files (generated styles only, e.g. CSS-in-JS with no extractable tokens)78- A design reference sheet already exists and only needs updating — use the companion enforcement skill's update workflow instead79- The user wants a generic design system template, not a project-specific one8081---8283## Anti-Patterns8485### NEVER invent or infer design tokens that don't exist in source code8687- **WHY:** Invented values create false documentation. Developers trust the reference sheet and may use wrong tokens, causing design inconsistencies that are hard to trace.8889| BAD | GOOD |90|-----|------|91| Infer `--space-4: 1rem` because it seems reasonable | Document only values found in CSS; mark missing sections as `TBD — not yet defined` |92| Expand one brand colour into a full 9-shade palette | Document only the hardcoded hex values found; note they are not formalised tokens |9394### NEVER generate the reference sheet before reading actual CSS/config files9596- **WHY:** Even well-known frameworks have project-level overrides. Reading source files is the only way to capture what is real.9798 ```bash99 # BAD: assuming defaults100 # GOOD: always verify101 grep -r "screens" tailwind.config.ts102 ```103104### NEVER leave sections empty without a TBD marker105106- **WHY:** Blank sections appear complete; `TBD — not yet defined` is an actionable signal that makes gaps impossible to miss.107108| BAD | GOOD |109|-----|------|110| `## Dark Mode` followed by empty content | `## Dark Mode` followed by `TBD — not yet defined` |111112### NEVER use non-copy-pasteable code examples in the reference sheet113114- **WHY:** A reference sheet that requires editing before use wastes developer time and erodes trust.115116 ```css117 /* BAD: placeholder that doesn't exist */118 /* GOOD: actual token from source */119 --color-brand-primary: #1a2b3c;120 ```121122### NEVER use a generic description in the companion enforcement skill123124- **WHY:** A generic description means the skill doesn't activate correctly for the project. A common pitfall is copying the parent skill description verbatim.125- **BAD** — `description: Enforce design tokens for any web project`126- **GOOD** — `description: Enforce design tokens for the Acme Corp marketing site`127128---129130## References131132- [`references/workflow.md`](references/workflow.md) — Full 8-step generation workflow133- [`references/design-reference-template.md`](references/design-reference-template.md) — Output template for `docs/design/design-reference.md`134- [`references/enforcement-skill-template.md`](references/enforcement-skill-template.md) — Output template for the companion enforcement skill135- [`templates/skill-output.yaml`](templates/skill-output.yaml) — Structured scratchpad; populate before writing any markdown136- [`schemas/design-reference.schema.json`](schemas/design-reference.schema.json) — JSON schema for scratchpad validation137- [`references/accessibility-guidelines.md`](references/accessibility-guidelines.md) — WCAG 2.1 AA criteria, contrast ratios, keyboard nav, ARIA138- [`references/typography-principles.md`](references/typography-principles.md) — Hierarchy, readability, type pairing, modular scale139- [`references/psychology-of-color.md`](references/psychology-of-color.md) — Colour associations, brand strategy, harmony, WCAG contrast140- [`references/visual-hierarchy.md`](references/visual-hierarchy.md) — The seven hierarchy variables, Z/F-patterns141- [`references/grid-and-layout-theory.md`](references/grid-and-layout-theory.md) — Column grids, 8-point system, responsive strategies142- [`references/whitespace-theory.md`](references/whitespace-theory.md) — Macro/micro whitespace, density, hierarchy143- [`references/gestalt-principles.md`](references/gestalt-principles.md) — Proximity, similarity, figure-ground, closure, continuity