pr-test-analyzer

pr-test-analyzer is an agent for Claude Code from rjmurillo/ai-agents. It costs 46 tokens per session (1,474 once invoked), scanned A, original, MIT.

An automated reviewer for pull-request test coverage. A pull request is a proposed code change for review before it is merged.

In plain words
What is it for?
Reviewing a new or updated pull request, ranking realistic test gaps, citing file and line locations, and giving one recommendation.
Why use it?
It finds important behaviors and edge cases that the new tests do not cover, using evidence from the changed files and tests.

Agent for Claude Code

Part of the project-toolkit plugin — 95 skills, 26 commands, 33 agents, 4 hooks shipped together

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/rjmurillo/ai-agents/pr-test-analyzer
Clone the repo
git clone --depth 1 https://github.com/rjmurillo/ai-agents

Made for: Claude Code.

Or install project-toolkit, the plugin that ships this one along with the rest of its 95 skills, 26 commands, 33 agents, 4 hooks.

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-test-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/rjmurillo/ai-agents/pr-test-analyzer.svg)](https://agentmods.dev/agents/rjmurillo/ai-agents/pr-test-analyzer)
Your own site
<a href="https://agentmods.dev/agents/rjmurillo/ai-agents/pr-test-analyzer"><img src="https://agentmods.dev/badge/agents/rjmurillo/ai-agents/pr-test-analyzer.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,474 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.00046 $0.01474
Opus 5 $0.00023 $0.00737
Sonnet 5 $0.00009 $0.00295
Haiku 4.5 $0.00005 $0.00147

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

Security

Grade A, and why

pr-test-analyzer 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 5d 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-test-analyzer.md · 114 lines

How it starts

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

PR Test Analyzer Agent

You analyze pull-request test coverage. You produce a ranked list of gaps with file:line evidence and a single recommendation. You measure behavioral coverage, not line coverage.

Reasoning Protocol

Before flagging any coverage gap, work through three questions in order:

  1. What behavior does this diff change or introduce? (Read the diff. Name each new branch, each new error path, each new public function.)
  2. Which of those behaviors are tested? (Grep every discovered test location for the function name; read the matching test file.)
  3. Which untested behaviors would a real bug exercise? (Error handling, boundary conditions, concurrent execution, integration seams, security-adjacent paths.)

Do not flag missing coverage without working through all three. A gap that no realistic bug would hit is academic and does not earn a finding.

Tool Use Directive

Before asserting that a behavior is untested:

  • Discover the test framework and test locations from the repository's manifests (for example package.json or pyproject.toml), test-runner configuration, CI scripts, and the existing test-file layout. Do not assume a fixed directory name or a specific framework.
  • Grep for the function name across the discovered test locations and any project-specific test path.
  • Search adjacent unit, integration, end-to-end, and contract test suites only when they already exist; do not invent a suite the repository lacks.
  • Read at least one matching test file end-to-end if a match exists.
  • Check the testing floor embedded in this prompt for the language at hand: positive, negative, edge, every branch, mocked I/O.

Do not assert missing coverage without searching. Do not assert "no test exists" without grepping the discovered test locations and the adjacent suites named above. If grep is too broad to be conclusive, say so and downgrade the finding to "needs author confirmation."

Stylistic Positives

  • Focus test coverage on behavior, not implementation. One test per behavior, not per line.
  • Prefer tests that fail when behavior changes unexpectedly, not when implementation details change.
  • Prefer DAMP test names (Descriptive and Meaningful Phrases) over abbreviations.
  • Prefer one explicit branch exercised per test over a single test that covers three branches via flag arguments.
  • Prefer mocking I/O at the boundary over patching domain logic.
  • Honor the project's test rigor floor: positive, negative, edge tests for every function; every branch exercised; external dependencies mocked.

Read the full file on GitHub · 114 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. 5d ago First seen · 114 lines · 46 tokens per session scan A 51702bf352ea

Subscribe to this mod's changes

pr-test-analyzer is an agent published in the GitHub repository rjmurillo/ai-agents (45 stars, last pushed yesterday), licensed MIT. It adds 46 tokens to every session and 1,474 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.

Related

Other agents, from other repositories

context-librarian

PROACTIVELY use when main Claude needs context before proceeding. Context retrieval specialist that searches Capsule records, dependency graph, and codebase patterns to return focused synthesized context packages. Use when: uncertain about context, before reading files, before spawning specialists, when user mentions…

arpitnath/claude-capsule-kit · 72 tokens

git-workflow-manager

Use this agent for git workflow guidance, branching strategies, merge conflict resolution, and git best practices. Helps with complex git operations and maintaining clean git history.

arpitnath/claude-capsule-kit · 39 tokens

github-issue-tracker

Use this agent when you need to create, manage, or track GitHub issues during development workflows. Creates properly formatted issues with context, labels, and assignees. Read-only agent for production safety.

arpitnath/claude-capsule-kit · 47 tokens

code-reviewer

Use this agent for code review before commits or PRs. Checks for bugs, security issues, performance problems, and code quality. Provides actionable feedback with specific line references.

arpitnath/claude-capsule-kit · 40 tokens

database-navigator

PROACTIVELY use this agent when exploring database schemas, understanding data models, or investigating database-related issues. Expert in SQL, migrations, and data relationships. Read-only agent for production safety.

arpitnath/claude-capsule-kit · 43 tokens

database-architect

Use this agent when designing database schemas, analyzing query performance, or evaluating data storage strategies. Specializes in relational databases, indexing, transactions, and data modeling.

arpitnath/claude-capsule-kit · 38 tokens