From godmode
Analyzes UI component architecture for design systems, audits CSS approaches (Modules, Tailwind, CSS-in-JS), design tokens, hierarchies (atoms/molecules), and Storybook setup. For reusable components and UI reviews.
How this skill is triggered — by the user, by Claude, or both
Slash command
/godmode:uiThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- `/godmode:ui`, "component architecture"
/godmode:ui, "component architecture"# Detect framework and CSS approach
grep -r "react\|vue\|svelte\|@angular/core" \
package.json 2>/dev/null
grep -r "tailwindcss\|styled-components\|@emotion\|sass" \
package.json 2>/dev/null
# Count components
find src/ -name "*.tsx" -o -name "*.vue" \
-o -name "*.svelte" 2>/dev/null | wc -l
UI AUDIT:
Framework: <React | Vue | Svelte | Angular>
Styling: <CSS Modules | Tailwind | CSS-in-JS>
Component library: <custom | MUI | shadcn | none>
Storybook: <yes (version) | no>
Design tokens: <yes | no>
Component count: <N>
| Level | Count | Examples |
|----------|-------|----------------------|
| Atoms | <N> | Button, Input, Label |
| Molecules| <N> | FormField, SearchBar |
| Organisms| <N> | Header, DataTable |
| Templates| <N> | DashboardLayout |
| Pages | <N> | HomePage, Settings |
IF existing design system with tokens:
CSS Modules + CSS custom properties
IF rapid prototyping or small team:
Tailwind CSS
IF complex theming (dark, multi-brand):
CSS-in-JS (Emotion/styled-components)
IF SSR is critical:
avoid runtime CSS-in-JS
IF legacy SCSS: keep, migrate incrementally
| Criterion | CSS Modules | Tailwind | CSS-in-JS |
|------------|------------|---------|----------|
| Scoping | Automatic | Utility | Automatic|
| Bundle | Small | Small | Variable |
| Runtime | None | None | Yes |
| Type safety| Plugin | Plugin | Native |
# Find hardcoded colors
grep -rn "#[0-9a-fA-F]\{3,6\}" src/ \
--include="*.css" --include="*.tsx" \
--include="*.scss" 2>/dev/null | head -20
# Find hardcoded spacing
grep -rn "margin:\|padding:\|gap:" src/ \
--include="*.css" --include="*.scss" \
| grep -v "var(--" | head -20
| Token Category | Defined | Hardcoded | Violations |
|---------------|---------|-----------|-----------|
| Colors | 24 | 7 | 7 |
| Typography | 8 | 3 | 3 |
| Spacing | 12 | 5 | 5 |
| Border radius | 4 | 1 | 1 |
| Shadows | 3 | 2 | 2 |
src/components/Button/
Button.tsx Component
Button.module.css Styles
Button.test.tsx Tests
Button.stories.tsx Storybook
Button.types.ts TypeScript interfaces
index.ts Public exports
npx storybook@latest init
npm install --save-dev @storybook/addon-a11y \
@storybook/addon-viewport @storybook/addon-docs
NAMING RULES:
Components: PascalCase (Button, DataTable)
Files: PascalCase matching component
Styles: ComponentName.module.css
Tests: ComponentName.test.tsx
Hooks: use<Purpose> (useMediaQuery)
API CONVENTIONS:
variant for visual styles (not "type")
size: "small" | "medium" | "large"
children for content (not "text")
on<Event> for handlers (onClick)
Boolean props positive (isOpen, not isClosed)
forwardRef on all native-wrapping components
UI REPORT:
Components: {N} total
Well-structured: {N}, Needs work: {N}
Token violations: {N} hardcoded values
Stories coverage: {N}/{N} components
Verdict: PASS | NEEDS REVISION
grep -r "storybook" package.json 2>/dev/null
ls .storybook/ 2>/dev/null
find src/ -name "*.stories.*" 2>/dev/null | wc -l
Log to .godmode/ui-results.tsv:
timestamp\tcomponent\taction\ttests\ta11y\tbundle_kb\tstatus
UI: Components {N}. Stories: {N}. Tokens: {N}.
Violations: {N}. a11y: {N}. Status: {DONE|PARTIAL}.
KEEP if: visual regression passes AND a11y clean
AND responsive at all breakpoints
DISCARD if: visual regression OR a11y violation
OR layout breaks. Revert on discard.
STOP when:
- All components render in Storybook
- Design token coverage >= 95%
- Zero a11y violations (axe-core)
- User requests stop
npx claudepluginhub arbazkhan971/godmodeManages design systems by detecting reusable UI patterns, extracting design tokens, organizing components with Atomic Design, and warning on hard-coded values or duplicates. Activates on component libraries, style guides, or patterns.
Scans a project's package.json and token sources to inventory design tokens, component libraries, and theming conventions before authoring UI primitives.
Provides architecture for design systems: three-tier tokens, light/dark themes, Figma-to-code pipelines via Style Dictionary, component APIs, Storybook integration, versioning.