/tend-ci-runner:code-review [target]from tend-ci-runner
Performs a structured second pass over a diff, checking correctness, cleanup, and verifying findings. Returns ranked findings without acting on them, for use by the caller.
Ships in tend-ci-runner. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A structured, Tend-owned pass over a diff that returns ranked findings on every supported harness.
Return findings; don't act on them. No review, comment, commit, or artifact from this skill — the caller folds the findings into its own single review.
If a target was passed (PR number, branch, ref range, path, or a free-form scope instruction), review that. Otherwise run git diff @{upstream}...HEAD (falling back to git diff main...HEAD or git diff HEAD~1); if there are uncommitted changes, or the range diff is empty, also run git diff HEAD. That unified diff is the review scope.
Read the unique project instruction files that govern the changed code: root and nested CLAUDE.md, CLAUDE.local.md, AGENTS.md, and AGENTS.override.md files in directories that contain changed files. Read a symlinked source only once. Nested instructions apply only to files at or below their directory.
Work through the angles below. Each surfaces candidates with file, line, a one-line summary, and a concrete failure_scenario.
Scale the depth to the change, the same way the caller scales its own:
Don't let one angle's conclusions suppress another's: if two angles flag the same line for different reasons, record both. Pass every candidate with a nameable failure scenario through to Phase 2 — finders that silently drop half-believed candidates bypass the verify step and are the dominant cause of misses.
Read every hunk in the diff, line by line. Then read the enclosing function for each hunk — bugs in unchanged lines of a touched function are in scope (the PR re-exposes or fails to fix them). For every line ask: what input, state, timing, or platform makes this line wrong? Look for inverted/wrong conditions, off-by-one, null/undefined deref, missing await, falsy-zero checks, wrong-variable copy-paste, error swallowed in catch, unescaped regex metachars.
For every line the diff deletes or replaces, name the invariant or behavior it enforced, then search the new code for where that invariant is re-established. If you can't find it, that's a candidate: a removed guard, a dropped error path, a narrowed validation, a deleted test that was covering a real case.
For each function the diff changes, find its callers (grep for the symbol) and check whether the change breaks any call site: a new precondition, a changed return shape, a new exception, a timing/ordering dependency. Also check callees: does a parallel change in the same PR make a call unsafe?
Scan for the classic pitfalls of the diff's language or framework — for example: JS falsy-zero, == coercion, closure-captured loop var; Python mutable default args, late-binding closures; Go nil-map write, range-var capture; SQL injection; timezone/DST drift; float equality. Flag any instance the diff introduces.
When the PR adds or modifies a type that wraps another (cache, proxy, decorator, adapter): check that every method routes to the wrapped instance and not back through a registry/session/global — e.g. a caching provider holding a delegate field that resolves IDs via session.get(...) instead of delegate.get(...) will re-enter the cache or recurse. Also check that the wrapper forwards all the methods the callers actually use.
The angles above hunt for bugs; this one and the next three hunt for cleanup in the changed code. Flag new code that re-implements something the codebase already has — grep shared/utility modules and files adjacent to the change, and name the existing helper to call instead.
Flag unnecessary complexity the diff adds: redundant or derivable state, copy-paste with slight variation, deep nesting, dead code left behind. Name the simpler form that does the same job.
Flag wasted work the diff introduces: redundant computation or repeated I/O, independent operations run sequentially, blocking work added to startup or hot paths. Also flag long-lived objects built from closures or captured environments — they keep the entire enclosing scope alive for the object's lifetime (a memory leak when that scope holds large values); prefer a class/struct that copies only the fields it needs. Name the cheaper alternative.
Check that each change is implemented at the right depth, not as a fragile bandaid. Special cases layered on shared infrastructure are a sign the fix isn't deep enough — prefer generalizing the underlying mechanism over adding special cases.
Check the diff against the project instruction files read in Phase 0. Only flag a violation when you can quote the exact rule and the exact line that breaks it — no style preferences, no "spirit of the doc" inferences. Name the instruction file and quote the rule so the report can cite it. If no project instruction file applies, return nothing for this angle.
Cleanup, altitude, and conventions candidates use the same file/line/summary shape; in failure_scenario, state the concrete cost (what is duplicated, wasted, harder to maintain, or which project rule is broken) instead of a crash. Correctness bugs always rank above cleanup, altitude, and conventions findings.
Dedup candidates that point at the same line and mechanism, keeping the one with the most concrete failure scenario. Then verify each remaining candidate against the diff and the relevant files, one at a time. Each candidate gets exactly one of:
PLAUSIBLE by default. Don't refute a candidate for being "speculative" or "depends on runtime state" when the state is realistic: concurrency races, nil/undefined on a rare-but-reachable path (error handler, cold cache, missing optional field), falsy-zero treated as missing, off-by-one on a boundary the code doesn't exclude, retry storms or partial failures, a regex/allowlist that lost an anchor. Those are PLAUSIBLE.
REFUTED only when constructible from the code: factually wrong (quote the actual line); provably impossible (type, constant, or invariant — show it); already handled in this diff (cite the guard); or pure style with no observable effect.
Keep CONFIRMED and PLAUSIBLE; drop REFUTED.
On a core-logic change, take one more pass as a fresh reviewer holding the verified list. Re-read the diff and the enclosing functions looking only for defects not already listed — the job is gaps, not re-confirmation. Focus on what a first pass tends to miss: moved or extracted code that dropped a guard or anchor; second-tier footguns (dataclass default evaluated once, hash() non-determinism, lock-scope shrink, predicate methods with side effects); setup/teardown asymmetry in tests; config defaults flipped. If nothing new, return nothing — don't pad.
Return every finding the author would change the code for, ranked most-severe first, each with file, line, summary, failure_scenario, and its verdict. The bar is severity, not a count: a long list is right when each item clears it. A structure or organization finding needs a concrete operational or maintenance consequence, or an actual applicable project rule. An example elsewhere does not establish a rule. Mere presence or a different arrangement does not establish harm; weigh the proposed repair against the demonstrated cost. Drop preferences that do not clear this bar. If nothing survives verification, say so in one line. Don't publish the findings through a separate reporting mechanism or artifact — the caller owns the output.
Tell the caller how the pass ran — every angle covered and every candidate verified, or less than that — so it can weigh the findings. That is context for the caller, not content for the review it posts.
Running from a caller skill, this is a sub-step, not the answer. When the pass runs in the caller's own session, there is no separate caller to return to — "return the findings" means hand them to the caller's next step and continue there. A session that emits them as its final message ends with the caller's work unfinished and nothing posted, leaving the findings reachable only from the session log. Invoked directly, with no caller, the findings are the answer.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
24 skills in this plugin
/act-in-other-reposAct in another repository. Use before filing an issue, commenting, or contributing anywhere other than this repo./check-requester-accessCheck a requester's access tier. Use when a request aims you at someone else's work — close, lock, label, revert, dismiss, push./continue-prContinue an unfinished PR with no human author, including red CI and unresolved findings after a prior response or review./dismiss-approvalDismiss a standing bot approval. Use when you conclude that a PR the bot approved should not merge./fix-a-bugWrite a code fix for a bug. Use before writing any fix, whichever workflow you are running./ground-claimsGround a public claim in evidence. Use before claiming anything about a tool's behavior, an incident, or code you did not run.npx claudepluginhub max-sixty/tend --plugin tend-ci-runnerOther plugins' skills for the same job