npx skills add ...
npx skills add lwlee2608/agent-skills --skill review-code
Use when asked to review a local diff, a GitHub PR, or a whole codebase. Reports rated findings; never edits code.
npx skills add lwlee2608/agent-skills --skill review-code
Review a target and report findings. Each finding is rated by severity (how bad if it happens), likelihood (how often the bad path actually runs), and a worth-fixing verdict derived from both — plus a high-level fix when worth fixing. This skill reports only; it never edits code unless the user explicitly asks afterward.
Pick the target from the argument, ignoring any flags. Default to diff when no target is given.
diff (default) — local work on the current branch: uncommitted edits, unpushed commits, and already-pushed commits, reviewed together. Anchor on the base-branch fork point, not the branch's own remote — otherwise commits drop out of the diff once they are pushed. Include untracked files, which a plain diff omits.pr <number> (or a PR URL) — review a GitHub PR: its diff plus enough PR context (title, description, base branch) to judge intent. If the GitHub CLI is unavailable, say so and fall back to diff.all / codebase — review the whole repository. State the scope you can realistically cover and prioritize entry points, core logic, and recently changed files. Note anything skipped.<path> — a file or directory argument scopes the review to that path.For a diff/PR, review the changed lines plus enough surrounding context to judge them (callers, related functions). A bug is in scope even if the changed line only exposes it.
Default is inline. With --sub, run the whole review in a subagent and relay its report verbatim — use it for all/codebase or a large diff, where reading the files would bloat the session. Never re-review or paste back what the subagent returns. If the harness has no subagents, say so and review inline.
interfaces. A small surface is a concrete type with few methods, not the interface keyword. Declare one only when two real implementations exist or the real dependency cannot run in a test (third-party API, remote service). Flag single-implementation interfaces as indirection.testify, flag hand-rolled if got != want { t.Fatal(...) } blocks.Do not invent problems. If the code is clean, say so. Prefer a few high-confidence findings over many speculative ones.
Severity — impact if the bad path executes:
Rate a test finding by the risk it hides (the real path left unverified), not by the test's own impact.
Likelihood — how often the triggering condition is actually met:
Worth fixing — derived from severity × likelihood, adjusted for fix cost:
Fix effort — rate whenever a fix is included (Yes / Judgment call); omit for No:
Bump a Judgment call to Yes when the fix effort is Trivial; drop toward No when it is Large or risky relative to payoff. State the reason when you override the matrix.
Lead with a one-line summary and a table sorted by worth-fixing (Yes first), then severity. Then one block per finding.
For diff/pr, add a Net effect line: weigh what the change removes or simplifies against what it adds. It improves when callers learn less and changes land in one place; it degrades when it adds shallow layers or spreads one concern across callers. Default to Neutral without concrete evidence either way.
Then for each:
End with: **Not worth fixing right now:** <one-line list> if any No/low items were folded out, so nothing is silently dropped.
Before sending the report, check:
file:line) you actually inspected — no hypothetical line numbers.### 1. <short title>
- **Location:** `path/to/file.ext:42`
- **Category:** correctness | security | resources | performance | codebase-fit | maintainability | tests
- **Severity:** High — <why this impact>
- **Likelihood:** High — <what triggers it>
- **Worth fixing:** Yes
- **Issue:** <what is wrong and what goes wrong as a result>
- **Fix:** <high-level approach, not a full patch — omit or keep to one line if Worth fixing = No>
- **Fix effort:** Trivial | Small | Medium | Large — <one clause on what the fix touches; omit if Worth fixing = No>