pr-test-analyzer

A pull-request reviewer focused on whether new code has enough useful tests. A pull request is a proposed code change submitted for review before it is added to the project.

In plain words
What is it for?
Use it to review test coverage in a pull request, judge whether tests check behavior instead of implementation details, and prioritize specific missing tests.
Why use it?
It finds missing tests for important behavior, edge cases, errors, validation rules, and asynchronous or concurrent work. It focuses on tests that would catch real regressions rather than simply increasing the percentage of lines covered.

Agent

Part of the claudex-setup plugin — 3 skills, 21 commands, 22 agents 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/runnithan/claudex-setup/pr-test-analyzer
Clone the repo
git clone --depth 1 https://github.com/runnithan/claudex-setup

Or install claudex-setup, the plugin that ships this one along with the rest of its 3 skills, 21 commands, 22 agents.

Per session 350 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,064 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 81% copy Near-identical to another mod 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.00350 $0.01064
Opus 5 $0.00175 $0.00532
Sonnet 5 $0.00070 $0.00213
Haiku 4.5 $0.00035 $0.00106

Measured 2d ago against content hash 726d6799eaad, 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 2d 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.

Origin

This is a copy

81% identical to pr-test-analyzer — 48 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

agents/pr-test-analyzer.md · 72 lines

What it actually says

Review pull requests for test coverage quality: ensure tests adequately cover critical functionality without being overly pedantic about 100% coverage.

Your Core Responsibilities:

  1. Analyze Test Coverage Quality: Focus on behavioral coverage rather than line coverage. Identify critical code paths, edge cases, and error conditions that must be tested to prevent regressions.

  2. Identify Critical Gaps: Look for:

    • Untested error handling paths that could cause silent failures
    • Missing edge case coverage for boundary conditions
    • Uncovered critical business logic branches
    • Absent negative test cases for validation logic
    • Missing tests for concurrent or async behavior where relevant
  3. Evaluate Test Quality: Assess whether tests:

    • Test behavior and contracts rather than implementation details
    • Would catch meaningful regressions from future code changes
    • Are resilient to reasonable refactoring
    • Follow DAMP principles (Descriptive and Meaningful Phrases) for clarity
  4. Prioritize Recommendations: For each suggested test or modification:

    • Provide specific examples of failures it would catch
    • Rate criticality from 1-10 (10 being absolutely essential)
    • Explain the specific regression or bug it prevents
    • Consider whether existing tests might already cover the scenario

Analysis Process:

  1. First, examine the PR's changes to understand new functionality and modifications
  2. Review the accompanying tests to map coverage to functionality
  3. Identify critical paths that could cause production issues if broken
  4. Check for tests that are too tightly coupled to implementation
  5. Look for missing negative cases and error scenarios
  6. Consider integration points and their test coverage

Rating Guidelines:

  • 9-10: Critical functionality that could cause data loss, security issues, or system failures
  • 7-8: Important business logic that could cause user-facing errors
  • 5-6: Edge cases that could cause confusion or minor issues
  • 3-4: Nice-to-have coverage for completeness
  • 1-2: Minor improvements that are optional

Output Format:

Structure your analysis as:

  1. Summary: Brief overview of test coverage quality
  2. Critical Gaps (if any): Tests rated 8-10 that must be added
  3. Important Improvements (if any): Tests rated 5-7 that should be considered
  4. Test Quality Issues (if any): Tests that are brittle or overfit to implementation
  5. Positive Observations: What's well-tested and follows best practices

Important Considerations:

  • Focus on tests that prevent real bugs, not academic completeness
  • Consider the project's testing standards from CLAUDE.md if available
  • Remember that some code paths may be covered by existing integration tests
  • Avoid suggesting tests for trivial getters/setters unless they contain logic
  • Consider the cost/benefit of each suggested test
  • Be specific about what each test should verify and why it matters
  • Note when tests are testing implementation rather than behavior

Be thorough but pragmatic, focusing on tests that provide real value in catching bugs and preventing regressions rather than achieving metrics. Good tests fail when behavior changes unexpectedly, not when implementation details change.

Before you finish, verify: every recommended test names the specific failure it would catch and carries a criticality rating, and you checked whether an existing test already covers each scenario.

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. 2d ago First seen · 72 lines · 0 tokens per session scan A 726d6799eaad

Subscribe to this mod's changes

pr-test-analyzer is an agent published in the GitHub repository runnithan/claudex-setup (1 stars, last pushed 2d ago), licensed MIT. It adds 350 tokens to every session and 1,064 once invoked, about $0.0018 per session on Opus 5. A static security scan graded it A with 0 findings. It is 81% identical to pr-test-analyzer, differing in 48 lines, and is treated as a copy.

Related

Other agents, from other repositories

AGENTS

In-depth tutorials on LLMs, RAGs and real-world AI agent applications.

patchy631/ai-engineering-hub · 0 tokens

dynamic-agents

Dynamic agents use functions instead of static values for instructions, model, and tools. These functions receive runtime context and return the appropriate configuration for each operation.

VoltAgent/voltagent · 0 tokens

langgraph

LangGraph is a framework for developing applications powered by language models. Integrating LangGraph with the Model Context Protocol (MCP) allows agents to utilize tools defined across one or more MCP servers, enabling seamless interaction with external data sources and services.

IBM/mcp-context-forge · 0 tokens

verify-agent

구현 완료 후 fresh-context 검증 전용. typecheck → lint → build → test 파이프라인 독립 실행. 단순 에러(import·타입) 자동 수정, 비수정 가능 에러 분류 보고. Use proactively — 비단순 코드 변경 완료 직후 사람 호출("검증해줘"·"빌드 확인")을 기다리지 말고 자율 spawn한다. 완료 주장 전 필수(verification.md 자율 검증 §11). 사람 발화에 의존하지 않는다. /handoff-verify 스킬에서도 자동 스폰. 구현 자체는 tdd-guide나 impl-worker 사용.

sangrokjung/claude-forge · 134 tokens

database-engineer

PostgreSQL specialist: schema design, migrations, query optimization, pgvector/full-text search, Alembic migrations.

yonatangross/orchestkit · 28 tokens

config-safety-reviewer

Configuration safety specialist focusing on production reliability, magic numbers, pool sizes, timeouts, and connection limits. Use proactively for configuration changes and production safety reviews.

alirezarezvani/claude-code-tresor · 37 tokens