cris-achiardi/claude-skills/ai-ds-composer
Claude Code and agent skill by cris-achiardi/claude-skills
- community
Checking that the SKILL.md file is still in the repository.
Strategic guide for consuming design system metadata to compose components intelligently. Use when generating or modifying UI components and layouts to ensure component reuse, proper variant selection, and adherence to design system patterns. Helps Claude understand project structure, read hierarchical metadata indexes, apply anti-pattern rules, and flag when existing components don't fit a requirement.
Install
npx vskill@latest install cris-achiardi/claude-skills/ai-ds-composerSKILL.md
Design System Component Reasoning
Your role is to help generate UI using existing design system components—not to invent new code. This skill teaches you to reason through design system metadata hierarchically and make component decisions that prioritize reuse.
Core Principle
Consume metadata → Understand intent → Select components → Compose patterns → Flag gaps
Success means high component reuse with intentional, justified decisions.
Getting Started: Understanding the Project
When you encounter a design system request, your first step is understanding the project structure. Read the available documentation:
- Top-level system metadata - Usually in
src/or project root, shows framework decisions, philosophies, and metadata hierarchy - Package.json - Reveals framework (Astro, Next.js, etc.), dependencies (React, Vue), styling approach, icon library
- CSS metadata (if exists) - How the project structures styling: tokens, utilities, layout patterns
If none of these exist, infer from folder structure and ask the user for clarity. The project stack directly influences which components to suggest (Astro components ≠ React patterns).
Example Metadata Hierarchy
When working with a project, you'll read metadata at multiple levels—start broad, narrow down to specific.
The Component Selection Algorithm
When you need to suggest a component, follow this flow:
1. Parse the User's Intent
Convert vague requests into clear requirements:
Vague: "Add a button like the one on the homepage" Clear: "Need a primary call-to-action button matching the hero section style, size=lg, with an arrow icon"
Tools for clarity: Ask follow-up questions, reference existing usage, look for patterns in the codebase.
2. Consult the Metadata Hierarchy (Hybrid Approach)
First pass (cache once per conversation):
- Read
design-system.metadata.ts(or infer from structure) - Understand project philosophies: "Prefer native HTML" vs "Use components"
- Note the metadata organization
Subsequent passes (per component decision):
- Read the appropriate layer index (
atoms/index.metadata.tsetc.) - Scan the
SelectionGuidefor your use case - Pull the specific component metadata
Example workflow for "I need a button":
3. Apply Selection Criteria
Component metadata contains selectionCriteria or SelectionGuide. Use these to justify your choice:
Match user intent to these criteria, not your intuition.
4. Check Anti-Patterns (Hard Rules)
Anti-patterns are violations of design system philosophy. They exist in metadata as warnings.
From Button metadata:
Core rule: Never suggest an anti-pattern without explicit user override and human acknowledgment. If the user says "I know, but I need it anyway," that's a decision they own—but flag it clearly.
5. Suggest Composition & Variants
Once you've selected the component, determine:
- Which component? (e.g.,
Button) - Which variant? (e.g.,
variant="primary") - What props? (e.g.,
size="lg",disabled={false}) - How composed? (e.g., Button with Icon inside, following composition rules from metadata)
- Why this choice? (cite the metadata criterion that led here)
6. Explain Your Reasoning
Always show your thinking by referencing metadata:
Good:
"You need a primary call-to-action. Button metadata showsvariant="primary"is used for 'main call-to-action, high visual prominence.' Size should belgfor hero sections, following the composition pattern shown inselectionGuide.actions."
Avoid:
"You need a button. I'll use primary variant because it looks good."
When Components Don't Fit
If the user's request doesn't map to existing components, flag it explicitly:
- Identify the gap: "You need X, but the design system has Y. These don't align because..."
- Explain why: Reference what exists and why it doesn't work
- Don't auto-generate: Don't invent a new component. Instead:
- Suggest a workaround (compose existing components differently)
- Explain the implication (e.g., "This would require custom CSS")
- Let the human decide if it warrants a new component
Example:
"Your use case needs a collapsible accordion with nested groups. The design system has no Accordion component. You could:- Compose with existing Button + disclosure patterns (simpler, limits nesting)- Create a new Accordion component (more work, but more flexible)Which approach works for your requirement?"
Handling Vague Metadata Hints
Metadata includes AI-specific fields like aiHints and keywords. Use these as starting points, but rely on structured fields (props, variants, selectionCriteria, antiPatterns) for real decisions.
CSS vs Components Decision
Your project likely emphasizes "use native HTML + CSS utilities" when possible, reserving components for complex interactive patterns.
Pattern from atoms/index.metadata.ts:
Apply this philosophy:
- Layout problem? Suggest CSS utilities (grid, flexbox, gap)
- Spacing issue? Suggest margin/padding utilities, not Spacer component
- Simple text? Suggest native
<p>, not Text component - Complex interaction? That's when components shine
Output Format
When suggesting components, structure your response as:
Working with Reference Files
When the SKILL.md body isn't enough, see the bundled references:
- COMPONENT_SELECTION.md - Detailed component selection examples across different project types
- METADATA_STRUCTURE.md - How to read and interpret different metadata formats
- COMPOSITION_PATTERNS.md - Common component compositions and pattern rules
- ANTI_PATTERNS.md - Full anti-pattern reference with explanations
Load these when you encounter complexity or need validation.
Key Reminders
- Metadata is authority - Your suggestions should always map back to documented metadata, not assumptions
- Prefer reuse - Composing existing components > generating new code (every time)
- Make trade-offs explicit - If you're choosing component A over B, explain why
- Flag gaps early - The human decides if a gap warrants a new component; you identify it
- Respect anti-patterns - They exist for reasons in the metadata; violations need explicit override
- Cite your sources - Reference which metadata file informed your decision
Next Steps
When ready to apply this skill:
- Understand the project structure (folder layout, package.json, top-level metadata)
- Parse the user's intent clearly
- Navigate the metadata hierarchy
- Apply selection criteria and check anti-patterns
- Suggest components with reasoning
- Flag gaps without auto-generating
- Iterate based on feedback
The goal isn't perfect UI from the first prompt—it's intelligent component reuse with clear, justifiable decisions.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/ai-ds-composer/SKILL.md
Popularity
- Repository stars
- 70
- Repository forks
- 8
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 3 Nov 2026, 4 days ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cris-achiardi/claude-skills/ai-ds-composer)