From nexus-agents
Reviews code changes for correctness, readability, architecture, security, and performance using project standards. Checks lint compliance, type safety, test coverage, security issues for PRs and audits.
npx claudepluginhub williamzujkowski/nexus-agentsThis skill is limited to using the following tools:
<!--
Conducts multi-axis code reviews evaluating correctness, readability, architecture, security, and performance before merging changes.
Reviews pull requests and code changes for correctness, security, performance, code quality, testing, documentation, and maintainability using git diffs.
Reviews code changes, PRs, and diffs for security vulnerabilities, performance issues, correctness bugs, and maintainability problems with tables for issues and suggestions.
Share bugs, ideas, or general feedback.
This skill is the post-hoc review gate — evaluating someone else's diff after it lands as a PR. The complementary pre-emit gate is self-critique, which the author runs on their own work before submitting:
| Skill | Reviews | When |
|---|---|---|
self-critique | Your own output | Before you emit anything |
reviewing-code (this) | Others' code (PRs, commits) | After someone else writes code |
Both use the same five-axis framework below. Both can apply to the same artifact at different lifecycle points — author self-critiques before PR; reviewer applies this skill on the resulting diff.
Evaluate every change across these dimensions. The order matters — correctness gates merge; the rest are quality.
CLAUDE.md "Canonical Paths") or introduce a new one? Module boundaries respected? No circular deps? Abstraction level appropriate?.rules/untrusted-input.md)? Secrets out of code/logs? Auth/authz where needed? Parameterized queries? See security-checklist.performance-optimization skill.Full documentation:
| Criterion | Limit |
|---|---|
| File | ≤ 400 lines |
| Function | ≤ 50 lines |
| Nesting | ≤ 4 levels |
any typesResult<T, E> for fallible opsSee SECURITY.md for full threat model.
# 1. Run quality gates
pnpm lint && pnpm typecheck && pnpm test
# 2. Check coverage
pnpm test:coverage
A 2026-04-25 audit (#2225) found a 100% false-positive rate in second-pass code-review findings. Each false positive cost ~5min of triage. The fix is a stricter pre-file gate.
Before flagging any finding, run this checklist:
.slice(0, 20) cap on the line above.isValidCommand, Zod schema)
already filter the input?await between read and write —
JS is single-threaded; sync code is atomic at microtask levelNaN comparisons fail closed silently (no observable bad state)as Record<string, unknown> is safe IF every access has typeof
guards — read the whole function before flagging the castIf any check raises "wait, actually..." → drop the finding. Don't file, don't include in the report. False positives compound: pollute the backlog, train future agents on noise, erode trust in tooling.
| Excuse | Counter |
|---|---|
| "It's a small change, no need for thorough review" | Small changes hide subtle bugs: off-by-one, missed null check, type narrowing slipped. Apply the 4-point gate to every finding regardless of diff size. |
| "Tests pass, so it's correct" | Tests verify what was tested. Edge cases the tests don't cover are still bugs. Use the five-axis framework — correctness ≠ "tests green." |
| "I trust the author" | Trust is for the human relationship; the review is for the code. Apply the same gate to senior contributors as to first-timers. |
| "The CI gates would catch any real issue" | CI catches a known set of failure modes. Reviews catch the ones CI doesn't model — architecture drift, unclear naming, subtle security gaps, unintended public-API changes. |
| "I'd refactor this differently, but it works" | If the existing pattern is canonical (per CLAUDE.md), don't fight it. If your way is genuinely better, file a follow-up — don't gate the merge. |
| "I'll flag it; the author can decide" | Every flagged finding costs review-cycle time. Apply the 4-point gate first; only flag what passed all four. |
Every finding gets one of three tags. The bar matters — over-flagging dilutes the signal.
If you tag everything Critical, nothing is Critical. Three or more Critical findings on a non-emergency PR usually means the PR is too big — split it.
## Code Review: [File/PR]
### Critical (Must Fix)
- [ ] Issue at `file:line`
### Major (Should Fix)
- [ ] Issue
### Recommendation
[ ] APPROVE / [ ] REQUEST_CHANGES
See CODING_STANDARDS.md for common issues and patterns.
file:line citations