code-review
Two-axis code review that checks both standards conformance and spec fidelity. Runs as parallel sub-agents to prevent context pollution. Includes a smell baseline from Fowler's Refactoring. Use after implementation is complete, before committing.
- License 许可
- MIT
- 最近更新
- 2026-08-05
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- code-review
- description
- Two-axis code review that checks both standards conformance and spec fidelity. Runs as parallel sub-agents to prevent context pollution. Includes a smell baseline from Fowler's Refactoring. Use after implementation is complete, before committing.
03 SKILL.md 正文
Code review
Review code changes on two independent axes, then aggregate findings. Both axes run as parallel sub-agents to prevent one axis's findings from biasing the other.
Process
-
Pin the fixed point. Identify the reference commit/branch/tag to diff against. Validate it exists and confirm the diff is non-empty.
-
Identify the spec source. Search commit messages for issue references, check user-provided paths, or look in
docs/,docs/agents/spec.md. Ask the user if no spec source is found. -
Identify standards. Gather repo documentation:
CODING_STANDARDS.md,CONTRIBUTING.md, rootCLAUDE.md, or equivalent. These override the baseline but don't replace it. -
Spawn two parallel sub-agents:
Axis 1: Standards
Does the code conform to this repo's documented coding standards? Plus the smell baseline below. Report violations concisely (< 400 words). Skip anything already enforced by tooling.
Axis 2: Spec
Does the code faithfully implement the originating spec or ticket? Flag missing requirements, scope creep, and implementation errors. Report concisely (< 400 words).
-
Aggregate. Present both reports under separate headings. Do not merge findings across axes.
Smell baseline
Eleven heuristics from Fowler's Refactoring plus depth/locality
checks from /codebase-design:
| Smell | Signal |
|---|---|
| Mysterious Name | Reader can't guess what it does from the name |
| Duplicated Code | Same structure in multiple places |
| Feature Envy | Method uses another class's data more than its own |
| Data Clumps | Same group of fields/params appear together repeatedly |
| Primitive Obsession | Primitives where a domain type would clarify |
| Repeated Switches | Same switch/conditional scattered across the code |
| Shotgun Surgery | One change requires edits in many unrelated places |
| Divergent Change | One module changes for multiple unrelated reasons |
| Speculative Generality | Abstractions for hypothetical future needs |
| Message Chains | Long chains of calls (a.b().c().d()) |
| Middle Man | Class that only delegates without adding value |
| Shallow Module | Interface nearly as complex as implementation — low depth, callers gain little leverage |
| Locality Violation | Related changes scatter across many files instead of concentrating in one module |
| Hypothetical Seam | An abstraction boundary with only one adapter — variation doesn't actually exist |
Repo-specific standards override the baseline.
What this skill must never do
- Never merge the two axes into a single report.
- Never run both axes in the same agent context.
- Never flag issues already caught by automated tooling.
- Never apply the smell baseline rigidly — documented intentional patterns override it.
04 同仓库更多 Skills
wayfinder
The orchestration hub for all work. Creates a map of investigation tickets (grilling, research, prototype, task, bug), resolves them one at a time with strict grilling discipline, manages risk posture pauses during implementation, and hands off to to-spec when the map is complete. Use for any work regardless of size — a trivial task has a small map, a large migration has many tickets.
to-tickets
Break the spec into small, independently-implementable tracer-bullet vertical slices. No checkpoint gate — hands off directly to wayfinder for implementation orchestration.
to-spec
Synthesize a specification from the completed wayfinder map. Never runs its own interview — it only writes down what wayfinder's grilling tickets already established, at a depth proportional to the project's documentation tier.
tdd
Reference material for test-driven development discipline. Red before green, one slice at a time. Use as reference during implementation, not as a step-by-step procedure.
start-session
Orient a new session in any project directory. Detects empty directory, existing codebase, or resume state, gathers cheap signals, and routes to wayfinder. The only user-invoked entry point.
setup
Configures the issue tracker. Called by start-session during first orient. Model-invoked — runs automatically as part of the flow, not user-triggered.