code-review — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited code-review (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
code-review.Structured, actionable code review focused on correctness, bugs, style, and maintainability. Act as a senior engineer: thorough, pragmatic, impact-first.
#pragma warning disable).When NOT to use:
python-testing or equivalent).| Area | Look for |
|---|---|
| Correctness & Logic | Wrong behavior, broken contracts, off-by-one |
| Bugs & Edge Cases | Nil/null paths, boundary values, error propagation |
| Code Quality & Style | Naming, readability, idiomatic usage |
| Structure & Maintainability | Coupling, duplication, separation of concerns |
| Best Practices | Language/framework conventions, SOLID, DRY |
| Test Adequacy | Missing tests for behavior changes, regression gaps |
| Performance | N+1 queries, unbounded loops/fan-out, missing pagination, sync calls in hot paths, large allocations, missed async |
| Security & Risk | OWASP Top 10: access control, injection, crypto, auth, supply chain, logging, error handling — use securing-code checklist |
| Documentation | Misleading comments, missing doc for public API |
Determine review scope and available tooling before doing any analysis.
Scope detection:
Identify whether this is a pre-commit or pre-merge review, then set the base ref accordingly.
Build the review packet first. Run scripts/build-review-packet.py (shipped in this skill's scripts/) to resolve scope deterministically and write one packet — diff, changed-file list, and source-of-truth — that every later step and every subagent reads by path instead of re-deriving the base ref and re-running git:
# Auto-detects staged vs. branch vs. worktree. Pass the spec so the packet
# carries what the change is judged against (see source-of-truth note below).
scripts/build-review-packet.py --intent "<what this change is for>" --include <spec-or-plan-if-any>It prints JSON with packet_path and has_source_of_truth. Use packet_path as the deterministic scope baseline for the rest of the review and for every subagent dispatch — it fixes _what changed_ so no one re-derives it, but it is a floor, not a ceiling: keep reading surrounding code, callers, history, and tests beyond the diff as the review demands. The raw git commands below are what the script automates; reach for them directly only when scoping a review the script's scope detection does not cover.
Source of truth. If has_source_of_truth is false, the packet is a bare diff. A reviewer grading spec compliance from a bare diff will silently invent a spec and grade against it. When a spec exists, supply --intent/--include so the packet carries it; when it does not, judge only stated intent and say so — never infer a spec from the diff and grade against it.
_Pre-commit (staged changes):_
# List staged files
git diff --cached --name-status
# View staged diff
git --no-pager diff --cached_Pre-merge (branch vs. target):_
# Resolve target base branch from origin/HEAD when available
BASE_BRANCH=$(git rev-parse --abbrev-ref origin/HEAD 2>/dev/null)
BASE_BRANCH=${BASE_BRANCH#origin/}
BASE_BRANCH=${BASE_BRANCH:-main}
MERGE_BASE=$(git merge-base "$BASE_BRANCH" HEAD)
# List changed files on this branch relative to the target base
git diff --name-status "$MERGE_BASE"...HEAD
# View full branch diff
git --no-pager diff "$MERGE_BASE"...HEADIf the user does not specify scope, infer from context:
Graph-enhanced tooling gate:
If the code-review-graph MCP plugin is available, probe and ensure freshness:
build_or_update_graph_tool() to run an incremental update.list_graph_stats_tool() to verify the graph has nodes and check last_updated.Do not retry.
When the graph is available, follow references/code-review-graph-integration.md for enhanced analysis at each subsequent step. The reference doc specifies required and optional tool calls per phase, with decision criteria for when to use each.
Parallel subagent gate:
If the Agent tool is available and the change is non-trivial, plan to use the parallel-subagent path in Step 2. See references/parallel-subagent-review.md for the thresholds, dispatch pattern, and prompt templates. Otherwise continue with the single-agent path.
Build a prioritized review plan before reading any code in detail.
Always (git-based):
Git diagnostics (useful for unfamiliar codebases or large diffs — see references/git-diagnostics-before-review.md):
When graph is available (see references/code-review-graph-integration.md Phase 1):
detect_changes_tool(base=<base>) for risk-scored, priority-ordered triage.Use its risk scores to order files highest-risk first.
get_review_context_tool(base=<base>) for token-efficient structural context instead of reading entire changed files.get_affected_flows_tool (change touches 2+ files), get_architecture_overview_tool (change spans 3+ directories), or get_impact_radius_tool (need raw blast-radius data) as the scope warrants.Triage output: Produce a prioritized file list and a brief review plan identifying the highest-risk areas to focus on.
Pick the path set at the Step 0 parallel subagent gate.
Parallel-subagent path (when gate is active):
Follow references/parallel-subagent-review.md — fan out quality, spec-compliance, and security subagents in parallel (plus architecture when warranted), synthesize, dispatch a devil's-advocate subagent for a challenge pass, then do final synthesis and tiebreak yourself. The security subagent (Agent 4) is always dispatched; it uses the OWASP Top 10:2025 checklist from securing-code skill references. Include the architecture subagent when: pre-merge / pre-PR review, the user mentions "merge", the user explicitly requests architectural review, or you judge it necessary (confirm with the user before dispatching). Clarify author intent with the user before dispatching; subagents have no conversation history. Skip the single-agent steps below — the reference doc drives this path end-to-end through Step 3.
Single-agent path (default):
For each changed file or module, summarize what changed and why. Review tests before implementation: do tests exist for the changed behavior, do they assert behavior (not internals), do they cover edge cases and regressions? Test gaps shape what to scrutinize in the implementation pass. Then evaluate each area in the Quick Reference table above.
Rules:
securing-code skill's references/tier2-review.md checklist (OWASP-mapped) as the evaluation framework.When graph is available (see references/code-review-graph-integration.md Phase 2):
query_graph_tool(pattern="tests_for", target=<function>) to flag test coverage gaps.query_graph_tool(pattern="callers_of", target=<function>) to verify consumers are updated.query_graph_tool("importers_of") for module-level API changes, query_graph_tool("inheritors_of") for base class changes, find_large_functions_tool for complexity flags, semantic_search_nodes_tool to check for duplication, and refactor_tool("dead_code") to catch orphaned code.Compile findings into issues using the template in assets/issue-template.md. Sort issues by priority: critical > high > medium > low. For each issue, include blocking status, confidence, and evidence.
Present the review as a prioritized list of issues from Step 2.
When graph was used, append:
Proceed only when the user asks to "apply changes", "fix issues", "implement suggestions", or similar.
Treat these recommendations as preferred defaults. When a default conflicts with project constraints, suggest a better-fit alternative, call out tradeoffs, and note compensating controls.
assets/issue-template.md — issue type/priority legends and suggestion format.references/review-best-practices-links.md — external review best-practice links used by this skill.references/git-diagnostics-before-review.md — git commands for assessing codebase health before reviewing.references/code-review-graph-integration.md — tool dispatch playbook for code-review-graph MCP plugin (required + optional tools per phase, decision guide).references/parallel-subagent-review.md — parallel-subagent dispatch path: thresholds, agent prompt templates, synthesis and red-team steps.securing-code skill (references/tier2-review.md, references/tier3-*.md) — OWASP-mapped security checklist used by the security subagent and single-agent security lens.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.