code-review-and-quality
Executes rigorous, senior-engineer level code reviews and quality gate enforcement. Use when evaluating pull requests, auditing code quality, enforcing clean architecture patterns, catching security flaws, and ensuring test coverage compliance before merging.
1How It Works & Mechanism
Structured multi-pass code audit covering correctness, security, performance, maintainability, and testing.
Multi-dimensional code review with quality gates. Every change gets reviewed before merge — no exceptions. Review covers five axes: correctness, readability, architecture, security, and performance.
Explicit severity classification from blocking (P0) to non-blocking suggestions (P3).
Approve a change when it definitely improves overall code health, even if it isn't perfect. Perfect code doesn't exist — the goal is continuous improvement. Don't block a change because it isn't exactly how you would have written it.
Anti-sycophancy review stance: explicitly forbidden from rubber-stamping PRs without substance.
When you flag a structural problem, propose the move — not just the problem. A review that only says "this is complex" leaves the author guessing. Reach for a named restructuring: - **Replace a chain of conditionals** with a typed model or an explicit dispatcher. - **Collapse duplicate branches** into a single clearer flow. - **Separate orchestration from business logic** so each reads on its own.
Security vulnerability scanning covering SQLi, XSS, CSRF, and unvalidated inputs.
Invert one condition the change adds (drop a negation, swap `&&` for `||`), run the suite, then restore the file from a copy. A mutation that stays green is a finding: name the test case that is missing.
Architectural boundary validation and decoupling enforcement.
Label every comment with its severity so the author knows what's required vs optional: | Prefix | Meaning | Author Action | |--------|---------|---------------| | *(no prefix)* | Required change | Must address before merge | | **Critical:** | Blocks merge | Security vulnerability, data loss, broken functionality | | **Nit:** | Minor, optional | Author may ignore — formatting, style preferences | | **Optional:** / **Consider:** | Suggestion | Worth considering but not required | | **FYI** | Informational only | No action needed — context for future reference |
Test adequacy evaluation verifying edge cases, boundary conditions, and mock fidelity.
Model A writes the code │ ▼ Model B reviews for correctness and architecture │ ▼ Model A addresses the feedback │ ▼ Human makes the final call
Concrete drop-in replacement suggestions provided for every flagged defect.
1. Identify code that is now unreachable or unused 2. List it explicitly 3. **Ask before deleting:** "Should I remove these now-unused elements: [list]?" Don't leave dead code lying around — it confuses future readers and agents. But don't silently delete things you're not sure about.
严格的依赖纪律与版本升级工作流:单一变更单包升级、审查 lockfile diff 并核查安全审计
1. **Read the changelog, not just the version number.**… 2. **One dependency per change.** Upgrade and merge them individually (or in small related groups)… 3. **Let the tests decide.**… 4. **Mind the transitive graph.**… 5. **Keep the lockfile honest.** Commit it, review its diff, and never hand-edit it.
2Core Capabilities
4Recommended Governance & Evidence
5Second-Pass Verification
- [ok] 零可执行脚本与外发调用复核 — 经风险扫描与目录清查确认,无内置脚本、网络端点或文件写入动作
- [ok] 五维审查维度核验 — SKILL.md 第 52-113 行完整定义了 Correctness, Readability, Architecture, Security, Performance 五大维度
- [ok] 意见前缀严重度映射核验 — 文档清晰划分 Critical、Required(无前缀)、Nit、Optional、FYI 五档对应作者处置动作
- [ok] 变异条件验证策略核验 — 文档第 190 行明确指出通过翻转条件测试冒烟状态以检验测试有效性
- [ok] 单包依赖升级纪律核验 — 文档第 322-329 行详细规范了单个升级、changelog 研读及 lockfile 严格比对准则
6Verdict & Scenarios
Preview this skill in an interactive chat playground. Generic LLM evaluation trial.
💬 Open Chat Trial (Preview)