code-review
Strict review of a PR, diff, commit range, branch, staged/unstaged changes, or AI patch. Finds only high-confidence issues introduced or exposed by the reviewed change.
- License 许可
- MIT
- 所属仓库
- japurcell/skills
- 最近更新
- 2026-11-11
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- code-review
- description
- Strict review of a PR, diff, commit range, branch, staged/unstaged changes, or AI patch. Finds only high-confidence issues introduced or exposed by the reviewed change.
- compatibility
- Requires subagent dispatch, including for lightweight reviews.
- disable-model-invocation
- true
02 资源文件 10
- 参考文档agents/openai.yaml164 B
- 参考文档evals/evals.json5.1 KB
- 脚本evals/grade_benchmark.py8.9 KB
- 参考文档references/code-smells.md1.6 KB
- 参考文档references/false-positive-rubric.md841 B
- 参考文档references/large-change-triage.md1.1 KB
- 参考文档references/maintainability-criteria.md1.6 KB
- 参考文档references/output-formats.md1.5 KB
- 参考文档references/pr-protocol.md717 B
- 参考文档references/standards-files.md550 B
03 SKILL.md 正文
Code Review
Review only the requested change. Report only high-confidence, change-linked findings.
Core rules
- Do not run the review yourself in the main thread. Dispatching subagents preserves your context window from large diff files and runs deep specialist logic.
- Do not expand scope beyond the requested PR, diff, commit range, branch, or local changes.
- If the review target is unclear, ask one clarifying question and stop.
- Do not run builds, tests, linters, typechecks, benchmarks, or broad validation unless asked.
- Do not report unrelated pre-existing issues unless the change makes them reachable or worse.
- Do not report style preferences, speculation, generic test/doc requests, or issues tooling should catch.
- Standards findings require an explicit cited repo rule.
- Keep findings only if they score 80+ under
references/false-positive-rubric.md. - If a required skill, subagent, intake source, or reference file is unavailable, stop and explain.
Workflow
-
Setup Before continuing, ensure the following skills are activated or loaded:
addy-code-review-and-qualitydelegate-to-subagents: delegate tasks to the most suitable subagents
-
Lock target
- PR: review that PR.
- Local: review staged, unstaged, or both exactly as requested.
- Fixed point: review against the named branch, commit, or base.
- If user says
review since Xand X is not fixed, ask exactly:Review against what — a branch, a commit, or main?. Then stop.
-
Collect intake
- PR: follow
references/pr-protocol.md. - Local: collect the requested
git diff --cached,git diff, or both separately. - Fixed point: collect
git diff <target>...HEADandgit log <target>..HEAD --oneline.
- PR: follow
-
Triage large changes If the change exceeds 1000 changed lines or 15 files, follow
references/large-change-triage.md. -
Gather coding standards
- Read relevant repo instructions, standards, ADRs, contribution docs, and configs from repo root and touched-path ancestors.
- Prefer snippets over full files.
- Skip standards enforced mechanically by tooling unless the change bypasses or weakens that tooling.
- Common context files are listed in
references/standards-files.md.
-
Find spec
- Use PR metadata, linked issues, commits, user-supplied paths, or obvious files under
docs/,specs/,.scratch/,.agents/scratchpad/**. - If none exists, record
no spec availableand skip spec compliance review.
- Use PR metadata, linked issues, commits, user-supplied paths, or obvious files under
-
Review Dispatch parallel subagents concurrently in a single turn (do NOT run them sequentially across multiple turns) using available catalog names as the
agent_type:addy-code-reviewer: correctness, regressions, edge cases, architecture boundaries. The subagent prompt should require activating theaddy-code-review-and-qualityskill.addy-security-auditor: vuln, unsafe data handling, auth/authz, injection, secrets, attack surface. The subagent prompt should require activating theaddy-security-and-hardeningskill.addy-test-engineer: inadequate, misleading, or broken tests for changed behaviorgeneralist or default: quality review covering maintainability, standards, code smells, spec compliance if available, and PR-only checks if reviewing a PR. The subagent prompt should require:references/maintainability-criteria.mdreferences/code-smells.md- explicit repo standards only
- spec, if available
references/pr-protocol.md, if reviewing a PR
For all reviews, you MUST run all four required subagents in parallel (concurrently) within the same response turn to prevent context bloat and speed up execution, unless the user explicitly asks for a lightweight review. If the runtime doesn't allow it, run as many as possible concurrently. For large changes, chunk input per
references/large-change-triage.md. -
Each subagent result must include
- role
- file and line
- issue
- why it is introduced, exposed, or made reachable by the change
- evidence
- practical impact
- severity
- specific fix
- preliminary confidence
-
Filter false positives with fast-tier subagents
- Apply
references/false-positive-rubric.md. - Verify each finding against the exact diff hunk.
- Keep only findings on changed lines, or unchanged lines directly reached/exposed by changed hunks with explicit evidence.
- Drop findings that rely only on nearby unchanged context.
- Keep only findings scoring 80+.
- Assign final severity.
- Apply
-
Output
- Use the user’s requested mode.
- For PR comment or machine-readable output, use
references/output-formats.md. - Normal format:
- severity
- file/line
- issue
- impact
- suggested fix
- If no findings survive, say:
No change-linked issues were found.
Tone
Be brief, direct, and serious. Do not soften important correctness, security, or maintainability problems.
Final checklist
- [ ] Prerequisite skills (
addy-code-review-and-qualityanddelegate-to-subagents) were successfully activated. - [ ] Target is fixed or clarified.
- [ ] PR eligibility was checked, if applicable.
- [ ] Relevant context and standards were reviewed.
- [ ] Spec review ran or
no spec availablewas recorded. - [ ] Required catalog subagents ran for correctness, security, tests, and general quality.
- [ ] Large-change triage ran if thresholds were exceeded.
- [ ] Every kept finding is change-linked and verified against an exact diff hunk.
- [ ] Standards findings cite explicit repo rules.
- [ ] False-positive score is 80+ for every kept finding.
- [ ] Findings cite code, standards, specs, or diff evidence as applicable.
- [ ] Output matches the requested mode.
04 同仓库更多 Skills
spec-create
Create or revise a portable behavioral SPEC for a feature or whole product. Use when specifying a new idea, documenting an existing system for reimplementation, or defining a change while preserving compatibility. Implementation planning is a separate task.
prd-ralph
Complete at most one eligible unfinished PRD task, verify it, log progress, and optionally create one scoped commit.
fsdp-style-guide
Mandatory for all UI/UX design, implementation, review, audit, or visual regression tasks. Always use for any work that affects user-facing appearance, behavior, accessibility, branding, layout, navigation, forms, dialogs, alerts, tables, or visual design.
agency-priorities
Provide self-contained USDA strategic goals and Forest Service priorities for agency briefings, proposals, and work-plan alignment. Use when explaining agency direction or evaluating how a project contributes to USDA and Forest Service priorities.
accomplishment-report
Create a concise Forest Service executive accomplishment report when all work in an ExecPlan is completed, or update its existing report. Use at ExecPlan closeout and when asked to report completed work, agency alignment, and estimated AI-assisted versus human-only time and cost savings.
writing-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.