skills/ui/SKILL.md
UI component architecture. Design systems, Storybook, CSS architecture, design tokens, component patterns.
npx skillsauth add arbazkhan971/godmode uiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
/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
development
Web performance optimization. Lighthouse, bundle analysis, code splitting, image optimization, critical CSS, fonts, service workers, CDN.
development
Webhook design, delivery, retry, HMAC verification, event subscriptions, dead letter queues.
development
Vue.js mastery. Composition API, Pinia, Vue Router, Nuxt SSR/SSG, Vite optimization, testing.
development
Evidence gate. Run command, read full output, confirm or deny claim. No trust, only proof.