code-review-and-quality
Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch. Use when asked to review a diff or a pull request, even when the diff is pasted inline.
1实现原理 · 为什么它能做到
实施五维代码审查标准(正确性、可读性、架构、安全性、性能),杜绝无审查合并
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.
确立实用主义审批标准:代码只要切实提升整体代码健康度即可批准,不苛求完美或个人风格对齐
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.
提出针对架构异味的具名重构方案(Structural Remedies),拒绝仅指出问题不给解法
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.
通过变异测试实验验证测试用例的真实有效性,而非单纯看代码覆盖率
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.
采用带前缀的审查意见分级系统(Critical/Required/Nit/Optional/FYI),明确责任与行动项
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 |
推广多模型审查模式(Multi-Model Review),利用不同模型的认知盲区互相补充交叉验证
Model A writes the code │ ▼ Model B reviews for correctness and architecture │ ▼ Model A addresses the feedback │ ▼ Human makes the final call
死代码清理机制:识别无用遗留代码并在征得同意后安全移除,拒绝积累技术债
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.
2核心能力
4管控建议与判定依据
5第二遍独立确认
- [ok] 零可执行脚本与外发调用复核 — 经风险扫描与目录清查确认,无内置脚本、网络端点或文件写入动作
- [ok] 五维审查维度核验 — SKILL.md 第 52-113 行完整定义了 Correctness, Readability, Architecture, Security, Performance 五大维度
- [ok] 意见前缀严重度映射核验 — 文档清晰划分 Critical、Required(无前缀)、Nit、Optional、FYI 五档对应作者处置动作
- [ok] 变异条件验证策略核验 — 文档第 190 行明确指出通过翻转条件测试冒烟状态以检验测试有效性
- [ok] 单包依赖升级纪律核验 — 文档第 322-329 行详细规范了单个升级、changelog 研读及 lockfile 严格比对准则
6结论
Preview this skill in an interactive chat playground. Generic LLM evaluation trial.
💬 Open Chat Trial (Preview)