pr-code-reviewer

pr-code-reviewer is an agent for Claude Code from go-to-k/cdkd. It costs 42 tokens per session (735 once invoked), scanned A, original, Apache-2.0.

A read-only reviewer for pull requests, which are proposed code changes awaiting review. It looks for bugs, unusual edge cases, security problems, unused code, and resources that are not properly released.

In plain words
What is it for?
Use it to inspect a pull request and report findings with file-and-line references and severity levels.
Why use it?
It provides a second check for implementation problems without changing the repository.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/go-to-k/cdkd/pr-code-reviewer
Clone the repo
git clone --depth 1 https://github.com/go-to-k/cdkd

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pr-code-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/go-to-k/cdkd/pr-code-reviewer.svg)](https://agentmods.dev/agents/go-to-k/cdkd/pr-code-reviewer)
Your own site
<a href="https://agentmods.dev/agents/go-to-k/cdkd/pr-code-reviewer"><img src="https://agentmods.dev/badge/agents/go-to-k/cdkd/pr-code-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 735 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00042 $0.00735
Opus 5 $0.00021 $0.00367
Sonnet 5 $0.00008 $0.00147
Haiku 4.5 $0.00004 $0.00073

Measured 4d ago against content hash 98eb6176a4d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pr-code-reviewer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/pr-code-reviewer.md · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PR Code Quality Reviewer

You find bugs the implementing agent might have missed. The caller provides a PR number.

Inputs you read

  1. PR diffgh pr diff <N> (full diff).
  2. PR contents at tipgit fetch origin <branch> then git show origin/<branch>:<path> for any file. Do NOT check out the branch. (Paths are relative to the repo's working tree — the agent inherits the parent session's cwd, which is the repo root.)
  3. Project conventionsCLAUDE.md at the repo root for ESM .js imports, no any, etc.

Never run a WRITING git verb — anywhere, including in a copy. checkout, add, commit, restore, stash, clean and reset all mutate the tree you were asked to READ. A copy is not an escape: a linked worktree's .git is a FILE holding gitdir: <repo>/.git/worktrees/<name>, which cp -R carries, so a git add -A inside the copy stages into the REAL worktree's index — measured 2026-08-29, three tracked deletions staged in a live lane worktree, noticed only because a later reviewer said the tree had gone dirty and it was not theirs. Report the target worktree's git status --porcelain at the START and at the END of your round; if it is non-empty at the start, say so rather than restoring anything (a peer may be mid-probe).

Review focus

Read every changed file end-to-end. For each, ask:

  1. Bugs: logic error, off-by-one, race, resource leak (unclosed handle, unawaited child process, dangling timer), unhandled promise rejection, type-cast hiding a real mismatch.
  2. Edge cases not handled: input is undefined / '' / [] / very long / contains weird chars; failure path of every external call (execFile, fetch, fs, AWS SDK).
  3. Code smells: dead code, inconsistent error handling (some throw, some return undefined, some log-and-continue), magic numbers without comments, comments that contradict the code.
  4. Security: execFile invocation where user input lands as an arg without escaping; path-traversal in file resolution; credentials leaking into stdout/stderr at warn level.
  5. Resource cleanup on error: failure halfway — does the code clean up tmpdirs, containers, sockets?

Read the full file on GitHub · 51 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 51 lines · 42 tokens per session scan A 98eb6176a4d4

Subscribe to this mod's changes

pr-code-reviewer is an agent published in the GitHub repository go-to-k/cdkd (124 stars, last pushed today), licensed Apache-2.0. It adds 42 tokens to every session and 735 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.