用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/arbazkhan971/godmode --skill ui命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | ui |
| description | UI component architecture. Design systems, Storybook, CSS architecture, design tokens, component patterns. |
/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