design-systems:implement
Apply a DESIGN.md design system to the project's existing CSS/style files. Triggers on: "implement the design system", "apply design system", "set up design tokens", "apply DESIGN.md", or /design-systems:implement. Reads DESIGN.md, detects the project's CSS framework, and updates style files with design tokens.
What this skill does
# Implement Design System
Read DESIGN.md and apply its tokens to the project's existing style files.
## DESIGN.md Discovery
Find DESIGN.md using this search order:
1. Check CLAUDE.md in cwd for a reference to DESIGN.md
2. Look for DESIGN.md in cwd
3. Search upward from cwd
4. Search common locations: project root, `src/`, `packages/*/`
5. If not found, tell the user: "No DESIGN.md found. Run `/design-systems:create` first."
Use Glob to search: `**/DESIGN.md`
## Implementation Flow
### Step 1: Parse the Design System
Extract all implementable tokens from DESIGN.md:
- **Colors**: Every hex value with its token name from the Palette subsection
- **Typography**: Font families, sizes (rem), weights, line-heights from the Type Scale table
- **Spacing**: Base unit and all derived values from the Spacing Scale table
- **Shadows**: Exact CSS values from Shadow Definitions
- **Radius**: Border-radius values from the Components section
- **Any other CSS-expressible values** mentioned in the schema
### Step 2: Detect Framework/CSS Setup
Scan the project for the styling approach:
| Indicator | Framework | Token Format |
|-----------|-----------|-------------|
| `tailwind.config.*` present | Tailwind CSS | Extend theme in config file |
| `*.module.css` or `*.module.scss` files | CSS Modules | CSS custom properties in global stylesheet |
| `styled-components` or `@emotion` in package.json | CSS-in-JS | Theme object exported from a theme file |
| `*.css` or `*.scss` files present | Vanilla CSS/SCSS | CSS custom properties in a variables file |
| `*.vue` files with `<style>` blocks | Vue SFC | CSS custom properties in global stylesheet |
| `*.svelte` files with `<style>` blocks | Svelte | CSS custom properties in global stylesheet |
| None detected | Unknown | Ask user; default to CSS custom properties |
Use Glob to detect: `**/tailwind.config.*`, `**/*.module.css`,
`**/*.module.scss`, `**/*.vue`, `**/*.svelte`.
Use Grep to check package.json for styled-components or @emotion.
### Step 3: Apply Tokens
Based on the detected framework:
**CSS Custom Properties** (default for vanilla CSS, CSS Modules, Vue, Svelte):
Create or update a tokens file with all design tokens:
```css
:root {
/* Colors — Surface */
--surface: #value;
--surface-dim: #value;
--surface-bright: #value;
--surface-container-lowest: #value;
--surface-container-low: #value;
--surface-container: #value;
--surface-container-high: #value;
--surface-container-highest: #value;
/* Colors — Primary */
--primary: #value;
--primary-container: #value;
--on-primary: #value;
--on-primary-container: #value;
/* Colors — Secondary */
--secondary: #value;
--secondary-container: #value;
--on-secondary: #value;
--on-secondary-container: #value;
/* Colors — Tertiary */
--tertiary: #value;
--tertiary-container: #value;
--on-tertiary: #value;
--on-tertiary-container: #value;
/* Colors — Outline */
--outline: #value;
--outline-variant: #value;
/* Colors — On Surface */
--on-surface: #value;
--on-surface-variant: #value;
/* Typography */
--font-display: 'Font Name', fallback;
--font-body: 'Font Name', fallback;
--font-mono: 'Font Name', monospace;
/* Spacing */
--spacing-1: 0.25rem;
--spacing-2: 0.5rem;
/* ... all spacing tokens ... */
/* Shadows */
--shadow-sm: /* value */;
--shadow-md: /* value */;
--shadow-lg: /* value */;
/* Radius */
--radius-sm: /* value */;
--radius-md: /* value */;
--radius-lg: /* value */;
}
```
Place the tokens file at:
- If a `variables.css`, `_variables.scss`, or similar exists: update it
- Otherwise: create `design-tokens.css` next to DESIGN.md
**Tailwind CSS**:
Extend the existing `tailwind.config.*` file's theme:
```js
// Add to theme.extend
colors: {
surface: { DEFAULT: '#value', dim: '#value', bright: '#value', ... },
primary: { DEFAULT: '#value', container: '#value' },
// ... map all color tokens
},
fontFamily: {
display: ['Font Name', 'fallback'],
body: ['Font Name', 'fallback'],
mono: ['Font Name', 'monospace'],
},
spacing: {
// ... map spacing scale
},
boxShadow: {
// ... map shadow tokens
},
borderRadius: {
// ... map radius tokens
},
```
**CSS-in-JS** (styled-components, emotion):
Create or update a theme file:
```ts
export const theme = {
colors: {
surface: { default: '#value', dim: '#value', ... },
primary: { default: '#value', container: '#value' },
// ...
},
fonts: {
display: "'Font Name', fallback",
body: "'Font Name', fallback",
mono: "'Font Name', monospace",
},
spacing: { ... },
shadows: { ... },
radii: { ... },
} as const;
```
### Step 4: Replace Hardcoded Values (Optional)
If existing CSS files contain hardcoded values that match DESIGN.md tokens,
offer to replace them with variable references. Show the user what will change:
```
Found 12 hardcoded values matching design tokens:
- src/styles/global.css:14 — #1a1a1a → var(--surface)
- src/styles/global.css:28 — #0052FF → var(--primary)
...
Replace these with token references? [y/n]
```
### Step 5: Report
Tell the user:
- Files created or modified (with paths)
- Number of tokens defined
- Any DESIGN.md values that couldn't be mapped
- Suggest: "Run `/design-systems:review` to verify your existing code matches the new tokens"
## In-Session Agent Guidance
After completing the implementation, follow these rules for the rest of
the session when writing any UI code:
- **Surface hierarchy**: Use DESIGN.md's layering rules to choose backgrounds
- **Typography**: Match content type to the type scale (headlines → display/headline, body → body-md, data → label with mono)
- **Spacing**: Derive all values from the spacing scale. Never invent new values.
- **Prohibitions**: Respect Core Prohibitions unconditionally
- **Edge cases**: Use the closest defined token. Do not introduce new values.
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.