pr-review AGENTS.md

pr-review AGENTS.md is an instructions file for Codex, OpenCode from guimatheus92/pr-review. It costs 5,892 tokens per session, scanned A, original, MIT.

A pull-request review tool for GitHub, Azure DevOps, and GitLab. A pull request is a proposed code change that others review before it is merged.

In plain words
What is it for?
Use it to review pull requests, run the project’s build and tests, and report findings as inline review threads.
Why use it?
It runs several review passes in one agent session and places findings directly on the changed lines, where they can be resolved.

Instructions file for CodexOpenCode

Installs and runs on its own, but its text points at files inside the plugin that ships it — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed.

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 instructions/guimatheus92/pr-review/agents-md
Clone the repo
git clone --depth 1 https://github.com/guimatheus92/pr-review

Made for: Codex, OpenCode.

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-review AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/guimatheus92/pr-review/agents-md.svg)](https://agentmods.dev/instructions/guimatheus92/pr-review/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/guimatheus92/pr-review/agents-md"><img src="https://agentmods.dev/badge/instructions/guimatheus92/pr-review/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 5,892 This file is loaded in full into every session.
When invoked 5,892 The same file — it is already loaded in full.
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.1 $0.05892 $0.05892
Opus 5 $0.02946 $0.02946
Sonnet 5 $0.01178 $0.01178
Haiku 4.5 $0.00589 $0.00589

Measured today against content hash d97666e1a4ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

pr-review AGENTS.md 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 today.

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.

AGENTS.md · 101 lines

How it starts

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

pr-review

Generic, plugin-based PR review tool for GitHub, Azure DevOps, and GitLab, packaged as a plugin for Copilot CLI or Claude Code. Orchestrates parallel review passes — each one a skill applied by a generic agent — in a single agent session via the task tool (Copilot) / Task tool (Claude Code), and posts every finding back to the PR as a resolvable inline review thread.

Build & test

npm run build          # tsc + esbuild → dist/cli.cjs
npm run test           # node scripts/test.mjs → node --test over tests/**/*.test.ts (566 tests, ~15s)
npm run build:watch    # tsc watch (re-run `npm run bundle` for esbuild)

The bundle at dist/cli.cjs is the single-file distribution artifact. The slash command (commands/pr-review.md) finds it via $CLAUDE_PLUGIN_ROOT/dist/cli.cjs under Claude Code (falling back to ~/.copilot/installed-plugins/), locates the checkout whose git origin matches the PR URL (current dir, its subdirectories, then its siblings; a primary worktree beats a linked one), prints a project-skill count that approximates the loader's rule, and runs node "$CLI" review $ARGUMENTS.

Architecture

Two-layer model: slash command → Node CLI → single agent session (Copilot CLI or Claude Code) dispatching review passes as generic agents (subagent_type/agent_type general-purpose) via task() / Task().

  • src/cli.ts — commander entry, subcommand routing
  • src/commands/review.ts — gather → selection → planned delivery → complete-only dedupe/post. Schema-v1 --resume validates HMAC authority, PR identity, execution-mode transition, and hashes before targeted recovery (a live PR must still be open only to publish); legacy consolidated output keeps replay support, while legacy Phase 1 is diagnostic-only.
  • src/commands/status.ts / src/commands/detach.ts — authenticated live/recoverable/terminal status plus detached execution. Exit 21 means targeted recovery is possible; exit 22 is terminal.
  • src/dispatch/single-session.ts — materializes context/pass files and an immutable plan, emits description-bearing dispatch-only task calls, promotes attempt outputs, performs one automatic selective recovery, assembles Phase 1/final output in Node, and runs a direct conditional verifier.
  • src/dispatch/delivery.ts / src/util/atomic-json.ts / src/util/control-auth.ts / src/util/finalization-lease.ts — strict Finding[] delivery, atomic create-only canonicals, attempt ceilings, digests, non-mutating control reads, Windows transaction-safe state, HMAC authority, and one recoverer/finalizer/poster per run.
  • src/dispatch/runtime.ts — runtime selection (resolveRuntime, runtimeSpawnArgs, taskCall, normalizeModel); --runtime copilot|claude|auto (default auto: probes PATH, copilot first). runtimeSpawnArgs adds the materialized run dir and checkout root as readable directories while denying shell and posting paths.
  • src/util/progress.ts / src/util/posted-marker.ts — the phase/heartbeat feed and posting idempotency guard. Schema-v1 decisions use authenticated authority; posted.marker in the run dir is diagnostic only.
  • src/dispatch/codex.ts — optional read-only Codex sibling; strict attempt-scoped Finding[] output and crash-safe attempt accounting (opt out: --no-codex)
  • src/dispatch/line-snap.ts — snaps finding line numbers to the nearest valid diff line before posting
  • src/providers/github.ts / azuredevops.ts / gitlab.ts — PR data fetchers + comment posters (GitHub inline comments go out as one review batch — ONE attempt, runPost owns retry because only it can reconcile — with per-comment fallback; GitLab posts per-discussion via plain fetch)
  • src/dispatch/parsers.ts — JSON / bracketed-markdown / section-header output parsers
  • src/dedupe.ts — Jaccard token similarity, strict/loose/off modes
  • src/config.ts — 5-level config merge (flags > env > repo yaml > global yaml > defaults)
  • src/util/retry.ts — retry/backoff helper for transient posting errors
  • src/packs/sync.ts / load.ts — skill packs: clone/pull configured git repos into ~/.pr-review/packs/<name>/ (fail-soft; >30 days without packs sync warns on every review) and load their skill files per include/exclude globs
  • src/stack/linguist.ts / manifests.ts / detect.ts — stack detection: GitHub Linguist languages.yml (auto-downloaded to ~/.pr-review/cache/, refreshed on packs sync) tags changed files by language; dependency names parsed from manifests only when cwd's git origin is the PR's repo (identity via src/providers/identity.ts, so legacy *.visualstudio.com remotes match canonical dev.azure.com); beyond the shallow root scan, changed manifests and manifests beside/above changed files are read, so a deeply nested project contributes its own dependencies; evidence stays categorized (canonical Linguist languages, ecosystems, full dependency names, dependency tokens, dependency groups) rather than collapsing into one tag bag
  • src/dispatch/pass-select.ts — pass selection: project skills (repo/configured/forced) become shared CONTEXT in every pass (skills-project.md, never pass slots) — every match injects, no numeric cap, bodies inlined whole (no byte truncation); passes are ranked by EVIDENCE TIER — specific path glob > manifest-backed dependency/framework token > language-consistent type/manifest glob > exact stack tag (cap MAX_STACK_PASSES=6) — plus EVERY baseline, which is contractual and rides on top of the total pass ceiling. A product guide cannot qualify from a bare language or a generic manifest alone, and product identity tokens must co-occur in ONE dependency group. Up to two installed-plugin passes may be admitted from repository/path/topic evidence. With no pack passes, project skills become the passes; overflow + unmatched + index-mode packs get materialized bodies referenced by digest-bound skills-index.md shards.
  • src/commands/packs.tspacks list / packs sync / packs add / packs suggest subcommands
  • src/plugins/loader.ts — discovers skills from standard paths (.claude/skills, .claude/rules, .copilot/skills, .github/skills, .github/instructions, .agents/skills, plus the ~/ mirrors) and from configured dirs. Follows directory links (symlinks and NTFS junctions) ONE hop, in every discovery and configured dir: a link the PR added or changed (its path, or any parent of it, is in the diff) is refused BEFORE anything behind it is read and named as degraded coverage; a link met inside a linked directory is not followed. Under a skills root a subdirectory is a skill only through <dir>/SKILL.md — a SKILL.md-less subdirectory is skipped (stderr warning when it holds .md files), flat .md files at the root are still skills, a README.md directory entry is never a skill; rules/ and instructions/ roots recurse as before. Applies rule trust before same-name dedupe, and folds semantically identical mirrors silently while still warning on divergent same-name rules. It is the only walker for repo, personal and configured dirs (packs and installed plugins have their own): walkSkillDirs/loadFromDir in src/plugins/builtin.ts were removed because a second walker meant a second link policy
  • src/plugins/trust.ts — a rule file added or modified by the PR under review is UNTRUSTED input: it is dropped from both authoritative context and the on-demand index, and named as degraded coverage. Checks lexical AND real paths, so a changed later mirror cannot evict its unchanged counterpart; comparisons fold letter case and Unicode (NFC) on EVERY platform — win32-only folding let a PR committing .Agents/skills bypass a macOS reviewer. Trust is by authorship, not location: content whose real path is outside the checkout is trusted when the PR did not author the link that reaches it AND the file is committed and clean in its home git repository (git ls-files + git status; a SKILL.md also needs its whole directory clean) — the same gate applies to every rule outside the checkout (linked, configured or personal), and a repository git cannot read is skipped, never trusted — on Windows git checkout of a PR branch writes THROUGH an NTFS junction into the shared directory, so a planted file would otherwise become a trusted rule for every sibling repo's review. Untracked or modified files there are skipped and named; a directory under no git repository at all is trusted as the reviewer's local configuration (one stderr note per directory reached through a link). Nothing depends on one company's layout: any link, any discovery root, any OS, git or not. In-repo --skill files stay scoped and must live inside the checkout; --force-skill is the explicit override
  • src/plugins/installed.tshost-agnostic discovery of installed plugins from their manifests, in BOTH runtimes: Copilot CLI (~/.copilot/installed-plugins/<marketplace>/<plugin>/) and Claude Code (~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/, whose authoritative installPath is read from installed_plugins.json because several versions can sit side by side). Skills are namespaced <plugin>/<skill>; declared paths and symlinks are constrained to the plugin root. Also builds the MCP capability inventory (capabilities.json) from trusted repo config, user config, and plugin manifests
  • src/providers/identity.ts — canonical checkout/PR identity: canonicalPrAuthority normalizes legacy <org>.visualstudio.com, encoded HTTPS paths, and ssh.dev.azure.com:v3/<org>/<project>/<repo> onto one authority, including the ADO project so a same-name repo in another project can't supply manifests or rules
  • src/util/git.tsgitTopLevel(); the pipeline resolves the checkout root once so a run from a subdirectory still finds repo config and rules
  • src/plugins/companions.ts — detects installed companion plugins (pr-review-toolkit, code-review); copilot via copilot plugin list, claude via ~/.claude/plugins/installed_plugins.json. Detection failure is unknown, never "not installed"; companionReviewerNames() is the single source of the 7 planned dispatch names (6 toolkit agents + 1 code-review slash command), reconciled against delivered outputs in companions.json

Read the full file on GitHub · 101 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. today Changed · +1 lines · +659 tokens per session d97666e1a4ea
  2. 5d ago First seen · 100 lines · 5,233 tokens per session scan A 66507aa2e906

Subscribe to this mod's changes

pr-review AGENTS.md is an instructions file published in the GitHub repository guimatheus92/pr-review (2 stars, last pushed today), licensed MIT. It adds 5,892 tokens to every session, about $0.0295 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-31.

Related

Other instructions, from other repositories

specweave CLAUDE.md

Claude Code instructions for anton-abyzov/specweave, covering lsp (code intelligence), getting started, auto-detection, workflow orchestration and 1. plan mode default (mandatory).

anton-abyzov/specweave · 2,475 tokens

mcp-server-azure-devops AGENTS.md

Instructions for Tiberriver256/mcp-server-azure-devops: /home/tiberriver256/repos/mcp-server-azure-devops/docs/important-knowledge/azure-devops-rest-api-research.md Researching Azure DevOps REST APIs, selecting api-version, or handling Azure DevOps Server (on-prem) endpoints.

Tiberriver256/mcp-server-azure-devops · 178 tokens

agent-smith CLAUDE.md

Claude Code instructions for holgerleichsenring/agent-smith, covering agent-smith — ai agent instructions, context files (read in this order), phase directory structure, experiential memory (remember / recall) and minting a phase id.

holgerleichsenring/agent-smith · 2,302 tokens

teamxray copilot-instructions.md

Copilot instructions for AndreaGriffiths11/teamxray, covering github copilot instructions for mcp team x-ray extension, response style, build, test, and lint commands, validating extension changes and architecture.

AndreaGriffiths11/teamxray · 1,416 tokens

teamxray AGENTS.md

AGENTS.md instructions for AndreaGriffiths11/teamxray, covering agents.md, purpose, tagline, tech stack and architecture.

AndreaGriffiths11/teamxray · 1,656 tokens

claude-plugins CLAUDE.md

Claude Code instructions for AleksandarBisevac/claude-plugins, covering working on this repo, hard rules, adding a .py under hooks/ or scripts/, which skill covers what and the front end is not ordinary files.

AleksandarBisevac/claude-plugins · 5,685 tokens