用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/nguyenthienthanh/aura-frog --skill refactor-expert命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Vision feedback loop for UI — render the running UI, screenshot it across viewports + dark mode, run deterministic gates then a multimodal critique against the design system, and iterate until it passes. Use after building or changing a UI component/page, when asked to 'check the UI', make it 'look right', or verify a build matches a design spec / Stitch screen.
UI/UX design expertise — component design, design system selection, responsive layout. Includes auto-detection from package.json and Context7 integration for library docs.
Generate a cohesive color-token system from ONE OKLCH brand hue — primary/secondary/background/foreground/muted/border with semantic light + dark, emitted as a Tailwind v4 @theme block or a CSS-variables fallback. Use when starting a design system, defining brand colors, setting up theming/dark-mode, or replacing scattered hardcoded colors with a derived palette.
正在显示 SKILL.md
基于 SOC 职业分类
| name | refactor-expert |
| description | Guide safe, incremental refactoring that improves code quality without changing behavior. |
| autoInvoke | false |
| priority | medium |
| triggers | ["refactor","code cleanup","improve code","refactor:analyze","refactor:plan"] |
| user-invocable | false |
AI-consumed reference. Optimized for Claude to read during execution. Human-readable explanation: see docs/architecture/HIERARCHICAL_PLANNING.md or docs/getting-started/ depending on topic.
Safe, incremental refactoring. Improve quality without changing behavior.
| Command | Output |
|---|---|
refactor:analyze <file> | .claude/logs/refactors/{target}-analysis.md |
refactor:plan <file> | .claude/logs/refactors/{target}-plan.md |
refactor:docs <file> | Analysis + Plan + Summary |
refactor:quick <file> | Skip approvals |
refactor:performance <file> | Performance-focused |
refactor:structure <file> | Structure-focused |
| Signal | Action |
|---|---|
| Code smell detected | Identify specific smell |
| Tests passing | Safe to refactor |
| No tests | Write tests FIRST |
| Large change | Break into small steps |
Golden Rule: Never refactor and add features simultaneously.
| Smell | Refactoring |
|---|---|
| Long Method | Extract Method |
| Large Class | Extract Class |
| Long Parameter List | Parameter Object |
| Duplicate Code | Extract Method/Class |
| Feature Envy | Move Method |
| Primitive Obsession | Replace with Object |
| Switch Statements | Polymorphism |
| Dead Code | Delete it |
1. Ensure tests pass
2. ONE small change
3. Run tests
4. Commit
5. Repeat
Never multiple changes between test runs.
Before: Tests exist and pass, understand current behavior, identify smell. During: One change at a time, test after each, commit frequently. After: All tests pass, code cleaner, behavior unchanged.
rules/core/simplicity-over-complexity.md — the point of refactoring: Rule of 3 before abstracting, delete before extracting, flatten before nestingrules/core/tdd-workflow.md — refactor only when tests are greenrules/core/verification.md — tests must still pass after every steprules/workflow/cross-review-workflow.md — refactorer ≠ reviewerskills/code-simplifier/SKILL.md — companion skill for pure simplification passes