一键导入
code-quality
Code quality validation with linters, SOLID principles, DRY detection, error detection, and architecture compliance across all languages.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Code quality validation with linters, SOLID principles, DRY detection, error detection, and architecture compliance across all languages.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, or colorize a frontend interface. Covers websites, landing pages, dashboards, product UI, components, forms, onboarding, empty states. Handles UX review, hierarchy, accessibility, responsive behavior, theming, typography, layout, color, motion, UX copy, design tokens. Also bolder/quieter redesigns, live browser iteration, ambitious visual effects.
Use when creating expert agents. Generates agent.md with frontmatter, hooks, required sections, and skill references.
Systematic development workflow: Analyze → Plan → Execute → eLicit → eXamine. Use for ANY development task: features, bug fixes, refactoring, hotfixes. Triggers: "implement", "create", "build", "fix", "add feature", "refactor", "develop". Auto-detects project type (Laravel, Next.js, React, Swift) and loads framework-specific references. Enforces: files <100 lines, interfaces separated, SOLID principles, expert self-review, sniper validation.
Use when user requests creative work - creating features, building components, adding functionality, or modifying behavior. Activates BEFORE APEX Analyze phase to refine requirements through structured questioning.
Auto-review skill for expert agents. After coding, expert applies elicitation techniques to self-correct before sniper validation. Inspired by BMAD-METHOD.
Codebase exploration techniques for rapid discovery, architecture analysis, pattern detection, and dependency mapping.
| name | code-quality |
| description | Code quality validation with linters, SOLID principles, DRY detection, error detection, and architecture compliance across all languages. |
PHASE 1: Exploration (explore-codebase) → BLOCKER
PHASE 2: Documentation (research-expert) → BLOCKER
PHASE 3: Impact Analysis (Grep usages) → BLOCKER
PHASE 3.5: DRY Detection (jscpd duplication) → NON-BLOCKING
PHASE 4: Error Detection (linters)
PHASE 5: Precision Correction (with docs + impact + DRY)
PHASE 6: Verification (re-run linters, tests, duplication)
CRITICAL: Phases 1-3 are BLOCKERS. Never skip them. DRY: Phase 3.5 is non-blocking but findings inform Phase 5 corrections.
Launch explore-codebase agent FIRST:
> Agent(subagent_type="fuse-ai-pilot:explore-codebase", prompt="...")
Gather:
Launch research-expert agent:
> Agent(subagent_type="fuse-ai-pilot:research-expert", prompt="Verify [library/framework] documentation for [error type]. Find [language] best practices for [specific issue].")
Request for each error:
For EACH element to modify: Grep usages → assess risk → document impact.
| Risk | Criteria | Action |
|---|---|---|
| 🟢 LOW | Internal, 0-1 usages | Proceed |
| 🟡 MEDIUM | 2-5 usages, compatible | Proceed with care |
| 🔴 HIGH | 5+ usages OR breaking | Flag to user FIRST |
Tool: jscpd — 150+ languages — npx jscpd ./src --threshold 5 --reporters console,json
| Level | Threshold | Action |
|---|---|---|
| 🟢 Excellent | < 3% | No action needed |
| 🟡 Good | 3-5% | Document, fix if time |
| 🟠 Acceptable | 5-10% | Extract shared logic |
| 🔴 Critical | > 10% | Mandatory refactoring |
See references/duplication-thresholds.md for per-language thresholds, config, and extraction patterns. See references/linter-commands.md for language-specific jscpd commands.
See references/linter-commands.md for language-specific commands.
| Priority | Type | Examples | Action |
|---|---|---|---|
| Critical | Security | SQL injection, XSS, CSRF, auth bypass | Fix IMMEDIATELY |
| High | Logic | SOLID violations, memory leaks, race conditions | Fix same session |
| High | DRY | Code duplication > 10%, copy-paste logic blocks | Mandatory refactoring |
| Medium | DRY | Code duplication 5-10%, repeated patterns | Extract shared logic |
| Medium | Performance | N+1 queries, deprecated APIs, inefficient algorithms | Fix if time |
| Low | Style | Formatting, naming, missing docs | Fix if time |
See references/solid-validation.md for S-O-L-I-D detection patterns and fix examples.
See references/file-size-rules.md for LoC limits, calculation, and split strategies.
See references/architecture-patterns.md for project structures and patterns.
See references/validation-report.md for the complete sniper report template.
See references/examples.md for detailed walkthrough.