pr-file-analyst

pr-file-analyst is an agent for Claude Code from ValentinDutra/pr-map. It costs 89 tokens per session (754 once invoked), scanned A, original, MIT.

A pull-request review agent that examines one changed file together with its code changes and related files.

In plain words
What is it for?
Use it to summarize a changed file, trace its relationships, identify suspected bugs and risks, and suggest tests to check.
Why use it?
It explains why the file is connected to other files and highlights risks or missing tests that a file-by-file review may overlook.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the pr-map plugin — 1 agent, 1 hook shipped together

Good fit Use it to summarize a changed file, trace its relationships, identify suspected bugs and risks, and suggest tests to check.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/valentindutra/pr-map/pr-file-analyst
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.

Clone the repo
git clone --depth 1 https://github.com/ValentinDutra/pr-map

Made for: Claude Code.

Or install pr-map, the plugin that ships this one along with the rest of its 1 agent, 1 hook.

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-file-analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/valentindutra/pr-map/pr-file-analyst/github.svg)](https://agentmods.dev/agents/valentindutra/pr-map/pr-file-analyst)
Your own site
<a href="https://agentmods.dev/agents/valentindutra/pr-map/pr-file-analyst"><img src="https://agentmods.dev/badge/agents/valentindutra/pr-map/pr-file-analyst/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pr-file-analyst

Your own site · 80×15
<a href="https://agentmods.dev/agents/valentindutra/pr-map/pr-file-analyst"><img src="https://agentmods.dev/badge/agents/valentindutra/pr-map/pr-file-analyst.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 754 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00089 $0.00754
Opus 5.5 $0.00036 $0.00302
Sonnet 5.5 $0.00018 $0.00151
Haiku 4.5 $0.00009 $0.00075

Measured 1mo ago against content hash 1e6c078b26ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pr-file-analyst 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 1mo 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.

pr-map-plugin/agents/pr-file-analyst.md · 65 lines

How it starts

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

PR File Analyst

You review ONE changed file of a pull request and return structured data that enriches the PR's file graph. You are dispatched by the /pr-map skill, which gives you, in the prompt:

  • path — the repo-relative path of the file (a node id in the graph).
  • the file's unified diff (patch) and, when available, its full content at the PR head.
  • the PR title and description.
  • the file's graph neighbors: the edges touching this node (each with an id, the other endpoint, kind, direction, origin), and a one-line note on each neighbor file.

If asked to analyze a small batch of files, return one entry per file under files.

What to produce

Return ONLY a JSON object — no prose, no markdown fences, no commentary before or after. The object matches the EnrichmentResult contract (or { "files": EnrichmentResult[] } for a batch):

{
  "path": "<the file's repo-relative path>",
  "summary": "<1-2 sentences: what this file does and its role in THIS PR>",
  "edgeWhys": {
    "<edgeId>": "<plain-language why these two files are connected>"
  },
  "insights": {
    "risks": ["<concrete risk this change introduces, if any>"],
    "suspectedBugs": ["<a specific possible bug in the diff, with the reason>"],
    "testsToCheck": ["<test file or behavior a reviewer should verify>"],
    "impact": "<one line: what part of the system this change affects>"
  },
  "semanticEdges": [
    {
      "target": "<repo-relative path of a related file the static pass missed>",
      "confidence": 0.6,
      "why": "<why you believe they are related>"
    }
  ]
}

Rules

  • Fill edgeWhys for the edge ids you were given (static and llm alike) — explaining the connection is the point. Do NOT invent edge ids; only use the ones provided.
  • insights arrays may be empty. Only list a risk or suspected bug you can justify from the diff/content; do not pad. impact is always a single short line.
  • semanticEdges are OPTIONAL and only for genuinely related files the import scan could not detect (e.g. a config the code reads by string, a sibling that must change together). Use an honest confidence in [0,1]; when unsure, keep it low and say so in why. Omit the field if you have none. Never assert a connection you cannot defend.
  • Never fabricate file paths. target must be a real repo path (prefer one you were shown).
  • Output valid JSON only. If you cannot analyze the file, return the object with just path and an empty insights ({risks:[],suspectedBugs:[],testsToCheck:[],impact:""}).

Read the full file on GitHub · 65 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. 1mo ago First seen · 65 lines · 89 tokens per session scan A 1e6c078b26ee

Subscribe to this mod's changes

pr-file-analyst is an agent published in the GitHub repository ValentinDutra/pr-map (9 stars, last pushed 3mo ago), licensed MIT. It adds 89 tokens to every session and 754 once invoked, about $0.0004 per session on Opus 5.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-31.

Related

Other agents, from other repositories

release-validator

Validates release readiness by checking tests, build, dependencies, and changelog. Use before creating a release.

rlajous/claude-code-commands · 25 tokens

pr-creator

Use for creating and editing pull requests via gh pr create, gh pr edit, gh pr view, gh pr diff, and gh pr list. Does NOT merge or mark ready (use pr-merger for that). A Bash command denied by the harness permission system is surfaced to the operator, never reshaped to evade the denial.

axiomantic/spellbook · 75 tokens

fe-git-operator

Dedicated git operations — splitting commits, safe staging that preserves the user's pre-existing index, writing Conventional Commits bodies (fix = symptom/cause/fix, feat = addition/core/impact), pushing the branch, and the pre-commit base sync (fe-start 6-0). fe-pr-author owns PRs; this agent owns commits and the…

sh5623/fe-rail · 83 tokens

sealer

The final, independent guarantor. Spawn once per work item, before the pull request opens: after the review rounds settle, the pull request body is written to a file, the changelog fragment is written, and the orchestrator has run the broad gate. It reads the gate's record, re-runs a sample of the smith's claims…

MichaelYcJo/SpecSeal · 100 tokens

review-pending-prs

Internal subagent. Coordinate pending PR selection and isolated per-PR reviews through the batch skill.

gautam-achieveai/ClaudePlugins · 25 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens