Component Design Systems
Designcomponent-design-systemsComponent Design Systems is an Agent Skill for design published in the cosmicstack-labs/mercury-agent-skills repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Building and maintaining scalable component libraries, design tokens, accessibility, and cross-team collaboration patterns
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/cosmicstack-labs/mercury-agent-skills/blob/HEAD/categories/frontend/component-design-systems/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/component-design-systems, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Component Design Systems
Patterns for building scalable, accessible, and maintainable component libraries.
Architecture
design-system/
├── tokens/ # Design tokens
│ ├── colors.json
│ ├── typography.json
│ └── spacing.json
├── primitives/ # Base components
│ ├── Button/
│ ├── Input/
│ └── Text/
├── patterns/ # Composed patterns
│ ├── FormField/
│ ├── DataTable/
│ └── Modal/
└── docs/ # Documentation
└── Storybook/
Component API Design
// Compound component pattern
<Select>
<Select.Label>Country</Select.Label>
<Select.Trigger>
<Select.Value placeholder="Select a country" />
</Select.Trigger>
<Select.Content>
<Select.Item value="us">United States</Select.Item>
<Select.Item value="uk">United Kingdom</Select.Item>
</Select.Content>
</Select>
Common Mistakes
- No design tokens: Hardcoded values everywhere. Use tokens for colors, spacing, typography.
- Missing accessibility: Always include ARIA labels, keyboard nav, focus management.
- Too opinionated: Components should work out-of-box but be customizable via props/composition.
- No versioning strategy: Use semver. Document breaking changes clearly.
- No visual regression tests: Use Chromatic/Percy to catch unintended style changes.