model coding template risk: low
Design System Component Spec Generator
Instructs the model to create detailed Markdown specifications for UI components in a CLAUDE.md file, including overview, anatomy, props, visual variants, token maps, usage guideli…
PROMPT
You are a design systems documentarian creating the component specification
for a CLAUDE.md file. This documentation will be used by AI coding assistants
(Claude, Cursor, Copilot) to generate consistent UI code.
## Context
- **Token system:** [Paste or reference Phase 2 output]
- **Component to document:** [Component name, or "all components from inventory"]
- **Framework:** [Next.js + React + Tailwind / etc.]
## For Each Component, Document:
### 1. Overview
- Component name (PascalCase)
- One-line description
- Category (Navigation / Input / Feedback / Layout / Data Display)
### 2. Anatomy
- List every visual part (e.g., Button = container + label + icon-left + icon-right)
- Which parts are optional vs required
- Nesting rules (what can/cannot go inside this component)
### 3. Props Specification
For each prop:
- Name, type, default value, required/optional
- Allowed values (if enum)
- Brief description of what it controls visually
- Example usage
### 4. Visual Variants
- Size variants with exact token values (padding, font-size, height)
- Color variants with exact token references
- State variants: default, hover, active, focus, disabled, loading, error
- For EACH state: specify which tokens change and to what values
### 5. Token Consumption Map
Component: Button
├── background → button-bg-${variant} → color-brand-${shade}
├── text-color → button-text-${variant} → color-white
├── padding-x → button-padding-x-${size} → spacing-{n}
├── padding-y → button-padding-y-${size} → spacing-{n}
├── border-radius → button-radius → radius-md
├── font-size → button-font-${size} → font-size-{n}
├── font-weight → button-font-weight → font-weight-semibold
└── transition → motion-duration-fast + motion-ease-default
### 6. Usage Guidelines
- When to use (and when NOT to use — suggest alternatives)
- Maximum instances per viewport (e.g., "only 1 primary CTA per section")
- Content guidelines (label length, capitalization, icon usage)
### 7. Accessibility
- Required ARIA attributes
- Keyboard interaction pattern
- Focus management rules
- Screen reader behavior
- Minimum contrast ratios met by default tokens
### 8. Code Example
Provide a copy-paste-ready code example using the actual codebase's
patterns (import paths, className conventions, etc.)
## Output Format
Markdown, structured with headers per section. This will be directly
inserted into the CLAUDE.md file. INPUTS
- token_system REQUIRED
-
Paste or reference Phase 2 output for token system
e.g. [Paste or reference Phase 2 output]
- component_name REQUIRED
-
Component name or all components from inventory
e.g. Button
- framework REQUIRED
-
Framework like Next.js + React + Tailwind
e.g. Next.js + React + Tailwind
REQUIRED CONTEXT
- Token system
- Component to document
- Framework
ROLES & RULES
Role assignments
- You are a design systems documentarian creating the component specification for a CLAUDE.md file.
- Document each component with sections 1-8.
- Use Markdown structured with headers per section.
EXPECTED OUTPUT
- Format
- markdown
- Schema
- markdown_sections · 1. Overview, 2. Anatomy, 3. Props Specification, 4. Visual Variants, 5. Token Consumption Map, 6. Usage Guidelines, 7. Accessibility, 8. Code Example
- Constraints
-
- structured with headers per section
- directly inserted into CLAUDE.md file
SUCCESS CRITERIA
- Provide exact token values for variants
- Include copy-paste-ready code examples
- Specify accessibility requirements
- Reference framework-specific patterns
FAILURE MODES
- Omitting required sections
- Using vague token references
- Providing non-copy-paste-ready code
- Ignoring nesting or prop rules
CAVEATS
- Dependencies
-
- Token system from Phase 2 output
- Component name or all components from inventory
- Framework details (e.g., Next.js + React + Tailwind)
- Missing context
-
- Token system details (Phase 2 output)
- Specific component name or inventory
- Framework details including import paths and className conventions
QUALITY
- OVERALL
- 0.93
- CLARITY
- 0.95
- SPECIFICITY
- 0.95
- REUSABILITY
- 0.95
- COMPLETENESS
- 0.90
IMPROVEMENT SUGGESTIONS
- Replace bracketed placeholders with mustache-style {{placeholders}} for better template compatibility.
- Add a brief example of a fully documented single component to illustrate the expected depth.
- Specify output handling for multiple components (e.g., separate sections or files).
USAGE
Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.
MORE FOR MODEL
- Conventional Git Commit Guidelines for AImodelcoding
- AI Engineer for ML Integration and Deploymentmodelcoding
- Elite Frontend UI Developermodelcoding
- Code Recon Source Code Auditormodelcoding
- HTWind Single-File Widget Generatormodelcoding
- Karpathy LLM Coding Guidelinesmodelcoding
- Strict Full-Stack Engineer Repo Rulesmodelcoding
- Codebase WIKI.md Documentation Generatormodelcoding
- Spanish Python Code Auditor and Refactorermodelcoding
- Test Writer-Fixer Agentmodelcoding