AGENT SKILL

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

  1. Pin the fixed point. Identify the reference commit/branch/tag to diff against. Validate it exists and confirm the diff is non-empty.

  2. 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.

  3. Identify standards. Gather repo documentation: CODING_STANDARDS.md, CONTRIBUTING.md, root CLAUDE.md, or equivalent. These override the baseline but don't replace it.

  4. 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).

  5. 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

lynchypin
lynchypin/project-onboard

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.

★ 0
lynchypin
lynchypin/project-onboard

to-tickets

Break the spec into small, independently-implementable tracer-bullet vertical slices. No checkpoint gate — hands off directly to wayfinder for implementation orchestration.

★ 0
lynchypin
lynchypin/project-onboard

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.

★ 0
lynchypin
lynchypin/project-onboard

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.

★ 0
lynchypin
lynchypin/project-onboard

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.

★ 0
lynchypin
lynchypin/project-onboard

setup

Configures the issue tracker. Called by start-session during first orient. Model-invoked — runs automatically as part of the flow, not user-triggered.

★ 0