ai-component-metadata
Skill91 starsChanged 6 months agoMITView on GitHub
Generate AI-ready metadata for design system components to enable intelligent UI generation. Analyzes component structure and generates structured metadata that helps AI understand when and how to use components correctly. Useful for teams building AI-consumable design systems.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- cris-achiardi/claude-skillsword for word, first seen Nov 14, 2025
Other versions1 project uses a version of this.
Word for word · 1
- cris-achiardi/claude-skills★ 71100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository22 other files it gives its agents.
- accessibilitySkill
- agentic-design-systemsSkill
- business-kickoff-workshopSkill
- cavemanSkill
- create-prdSkill
- create-skillSkill
- extract-design-systemSkill
- figma-generate-designSkill
- figma-useSkill
- find-skillsSkill
- frontend-designSkill
- marketing-psychologySkill
- performance-review-360-peerSkill
- performance-review-managerSkill
- performance-review-self-assessmentSkill
- pr-branch-namingSkill
- presentationSkill
- product-context-builderSkill
- prompt-engineerSkill
- ux-auditSkill
- web-design-guidelinesSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
When analyzing a component, use the metadata schema template in scripts/generate_metadata.py or follow the manual process below:
- Distinctive: line 33
Create metadata following this schema:
- Distinctive: line 93
Test with AI generation tasks
- Distinctive: line 95
Ensure examples are runnable
- Distinctive: line 112
When combining with Figma MCP:
- Distinctive: line 126
Keep examples real: - Use actual, runnable code
- Distinctive: line 127
Focus on patterns: - Document common usage patterns
- Distinctive: line 129
Validate through usage: - Test with actual AI generation
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AI Component Metadata Generator
Generate structured, AI-consumable metadata for design system components to enable intelligent UI generation and component usage.
Quick Start
When analyzing a component, use the metadata schema template in scripts/generate_metadata.py or follow the manual process below:
# Automatic generation (reads component file)
python scripts/generate_metadata.py path/to/Component.tsx
# Or use the template directly
cp assets/metadata-template.tsx your-component-metadata.tsxCore Workflow
1. Analyze Component Structure
Identify:
- Component composition (slots, children)
- Available variants and states
- Props and their types
- Accessibility attributes
2. Generate Metadata
Create metadata following this schema:
export const componentMetadata = {
component: {
name: "ComponentName",
category: "atoms|molecules|organisms",
description: "Brief description",
type: "interactive|display|container|input|navigation"
},
usage: {
useCases: ["primary-use", "secondary-use"],
requiredProps: [],
commonPatterns: [
{
name: "pattern-name",
description: "When to use",
composition: "JSX example"
}
],
antiPatterns: [
{
scenario: "what-not-to-do",
reason: "why",
alternative: "what-instead"
}
]
},
composition: {
slots: {},
nestedComponents: [],
commonPartners: [],
parentConstraints: []
},
behavior: {
states: [],
interactions: {},
responsive: {}
},
accessibility: {
role: "ARIA role",
keyboardSupport: "description",
screenReader: "behavior",
focusManagement: "strategy",
wcag: "AA"
},
aiHints: {
priority: "high|medium|low",
keywords: [],
context: "when to use"
}
}3. Validate Metadata
- Test with AI generation tasks
- Verify in Storybook
- Ensure examples are runnable
Component Categories
- atoms: Basic building blocks (Button, Text, Input)
- molecules: Simple combinations (Card, Chip, FormField)
- organisms: Complex components (Header, Table, Form)
Advanced Features
For complex scenarios, see:
- Nested components: NESTED.md
- Integration patterns: INTEGRATION.md
- Testing strategies: TESTING.md
Working with Figma
When combining with Figma MCP:
// Figma provides visual context
const figmaContext = await Figma.get_design_context();
// Your metadata provides behavioral context
const componentMetadata = components.Button.metadata;
// AI combines both for complete understandingBest Practices
- Keep examples real - Use actual, runnable code
- Focus on patterns - Document common usage patterns
- Include anti-patterns - Help AI avoid mistakes
- Validate through usage - Test with actual AI generation
Success Metrics
Your metadata is effective when:
- AI uses existing components instead of recreating
- Correct variants are selected based on context
- Accessibility is maintained in generated code
- Patterns are consistent across AI outputs
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

