design-system
Works two ways:
- Standalone — user runs
/gsp:design-systemfor a quick workspace audit - Building block —
/gsp:startinvokes this in the background during project setup
Output is workspace-level (not project-scoped), so it's shared across all projects and only needs to run once per codebase state change. Re-runnable — overwrites previous output.
Output: .design/system/{STACK,COMPONENTS,TOKENS,CONVENTIONS,CONCERNS}.md
<execution_context> @${CLAUDE_SKILL_DIR}/../../templates/system/STACK.md @${CLAUDE_SKILL_DIR}/../../templates/system/COMPONENTS.md @${CLAUDE_SKILL_DIR}/../../templates/system/TOKENS.md @${CLAUDE_SKILL_DIR}/../../templates/system/CONVENTIONS.md @${CLAUDE_SKILL_DIR}/../../templates/system/CONCERNS.md </execution_context>
mkdir -p .design/system
Step 1: Detect tech stack (→ STACK.md)
-
Detect package manager & lockfile
- Look for
package.json,bun.lockb,pnpm-lock.yaml,yarn.lock,package-lock.json
- Look for
-
Read
package.json- Framework, dependencies, devDependencies, scripts
-
Detect config files
tsconfig.json/jsconfig.json— language, aliasestailwind.config.*— styling, custom themenext.config.*— Next.jsvite.config.*— Viteapp.json/expo.json— React Native / Expopostcss.config.*,.eslintrc.*,.prettierrc.*
-
Identify styling approach
- Tailwind, CSS Modules, styled-components, StyleSheet, vanilla CSS
-
Identify architecture patterns
- Component style (functional, forwardRef, compound)
- State management (Context, Zustand, Redux, Jotai)
- Data fetching (Server Components, React Query, SWR)
- Routing (App Router, Pages Router, Expo Router, React Router)
- File organization (feature-based, type-based, flat)
-
Classify codebase
- greenfield: No
package.jsonor empty scaffold with no custom code - boilerplate: Scaffolded (create-next-app, create-expo-app, etc.) with minimal customization
- existing: Real custom code — components, pages, business logic
- greenfield: No
-
Write
.design/system/STACK.mdfrom the STACK template
Step 2: Scan components (→ COMPONENTS.md)
-
Scan component directories
- Check:
src/components/,components/,app/,pages/,src/app/,src/pages/,src/ui/,lib/
- Check:
-
For each component found
- Name, path, rough props/variants, reusability assessment
-
Detect UI kit
- shadcn/ui, RN Reusables, Radix, MUI, Headless UI, etc.
- Check package.json dependencies + component directory patterns
-
Cap at 30 components — summarize rest by directory/category
-
"Where to add" guidance
- Where new components go, naming pattern, barrel file conventions
-
Write
.design/system/COMPONENTS.mdfrom the COMPONENTS template
Step 3: Detect tokens & theming (→ TOKENS.md)
-
Tailwind
extendsections — colors, fonts, spacing -
CSS custom properties in
globals.css/global.css -
Theme files —
theme.ts,tokens.json,tokens.ts -
Dark mode setup — next-themes, class strategy, media query
-
Prior GSP tokens — scan
.design/branding/*/patterns/for existing brand tokens -
Write
.design/system/TOKENS.mdfrom the TOKENS template
Step 4: Extract conventions (→ CONVENTIONS.md)
-
Naming patterns — PascalCase, kebab-case, camelCase across files
-
Export style — named, default, barrel files
-
Styling approach —
cn(), className strings, StyleSheet -
Import aliases —
@/,~/from tsconfig/jsconfig -
File organization — feature-based, type-based, flat
-
"Where to add" for each type — component, page, utility, token
-
Write
.design/system/CONVENTIONS.mdfrom the CONVENTIONS template
Step 5: Identify concerns (→ CONCERNS.md)
- Design debt — inconsistent spacing, mixed color systems, hardcoded values vs tokens
- Component fragility — components with excessive props, no variants, tight coupling
- Accessibility gaps — missing aria attributes, color contrast issues, no focus management
- Token coverage — which categories are tokenized vs hardcoded
- Dark mode gaps — components that don't support theme switching
- Responsive gaps — components with fixed widths, missing breakpoints
- Naming inconsistencies — mixed conventions across component directories
Each concern includes: file paths, severity (high/medium/low), and fix approach.
- Write
.design/system/CONCERNS.mdfrom the CONCERNS template
Greenfield shortcut: If codebase is classified as greenfield (no package.json or no source code), write minimal versions of STACK.md and skip COMPONENTS, TOKENS, CONVENTIONS, and CONCERNS (write a one-line note in each: "Greenfield codebase — no existing design system to document.").
Step 6: Completion display
Display a summary box:
/gsp: design-system scan complete
┌──────────────────────────────────────────┐
│ type {classification} │
│ framework {framework} │
│ styling {styling approach} │
│ components {N} detected │
│ token coverage {N}/6 categories │
│ concerns {N} high, {N} medium │
└──────────────────────────────────────────┘
output: .design/system/
Use plain text with Unicode box-drawing characters (┌──┐│└──┘) for the summary box.
More from jubscodes/get-shit-pretty
get-shit-pretty
Design engineering for AI coding tools. Full pipeline: brand research, strategy, identity, guidelines, UI design, critique, accessibility audit, build, and review. Expertise skills (color, typography, visuals) serve the entire pipeline. 14 specialized agents with Apple HIG, Nielsen's heuristics, WCAG 2.2 AA, and design token standards.
17gsp-visuals
Define visual direction — imagery, 3D, video, textures, and surface treatments
16gsp-accessibility
Quick contrast checks and token WCAG audits — inline, no agent
16gsp-help
Show all skills
16gsp-color
Design color systems — palettes, contrast, semantic mapping, dark mode
16gsp-typography
Design type systems — scale, pairing, fluid type, vertical rhythm
16