pr-agent AGENTS.md

A set of repository instructions for coding agents working on PR-Agent, a tool that helps review pull requests. It covers project structure, coding rules, testing, configuration, and request flow.

In plain words
What is it for?
Use it when contributing to PR-Agent. It helps with installing dependencies, running tests, locating modules, changing configuration, and following the project's review and development conventions.
Why use it?
It gives agents the project rules they need before changing code, reducing mistakes such as using the wrong Python setup, hard-coding settings, or committing secrets.

Instructions file for CodexOpenCode

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/the-pr-agent/pr-agent/agents-md
Clone the repo
git clone --depth 1 https://github.com/The-PR-Agent/pr-agent

Made for: Codex, OpenCode.

Per session 2,536 This file is loaded in full into every session.
When invoked 2,536 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 $0.02536 $0.02536
Opus 5 $0.01268 $0.01268
Sonnet 5 $0.00507 $0.00507
Haiku 4.5 $0.00254 $0.00254

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

Security

Grade A, and why

pr-agent 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 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.

AGENTS.md · 116 lines

How it starts

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

Repository Guidelines

This file is the shared source of repository guidance for coding agents. Tool-specific instruction files should import it instead of repeating repository-wide rules.

Dos and Don’ts

  • Do match the interpreter requirement declared in pyproject.toml (Python ≥ 3.12) and install dependencies with uv sync (runtime + dev, from uv.lock) before running tools.
  • Do run tests with PYTHONPATH=. set to keep imports functional (for example PYTHONPATH=. uv run pytest tests/unittest/test_fix_json_escape_char.py -q).
  • Do adjust configuration through .pr_agent.toml or files under pr_agent/settings/ instead of hard-coding values.
  • Don’t commit secrets or access tokens; rely on environment variables as shown in the health and e2e tests.
  • Don’t reformat or reorder files globally; match existing 120-character lines, import ordering, and docstring style.
  • Don’t delete or rename configuration, prompt, or workflow files without maintainer approval.

Project Structure and Module Organization

PR-Agent automates AI-assisted reviews for pull requests across multiple git providers.

  • pr_agent/agent/ orchestrates commands (review, describe, improve, etc.) via pr_agent/agent/pr_agent.py.
  • pr_agent/tools/ implements individual capabilities such as reviewers, code suggestions, docs updates, and label generation.
  • pr_agent/algo/ contains shared algorithms, model handlers, prompt/token handling, types, and utilities.
  • pr_agent/git_providers/ handles integrations with GitHub, GitLab, Bitbucket (cloud and server), Azure DevOps, Gitea, Gerrit, CodeCommit, local checkouts, and plain diffs; pr_agent/identity_providers/ handles identity and pr_agent/secret_providers/ handles secrets.
  • pr_agent/settings/ stores Dynaconf defaults (prompts, configuration templates, ignore lists) respected at runtime; .pr_agent.toml overrides repository-level behavior.
  • pr_agent/servers/ contains webhook and service entrypoints.
  • tests/unittest/, tests/e2e_tests/, and tests/health_test/ contain pytest-based unit, end-to-end, and smoke checks.
  • docs/ holds the MkDocs site (docs/mkdocs.yml plus content under docs/docs/); overrides live in docs/overrides/.
  • .github/workflows/ defines CI pipelines for unit tests, coverage, docs deployment, pre-commit, and PR-agent self-review.
  • docker/ and the root Dockerfiles provide build targets for services (github_app, gitlab_webhook, etc.) and the test stage used in CI.

Read the full file on GitHub · 116 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. 2d ago Changed · -16 tokens per session a776b5784eb2
  2. 3d ago First seen · 116 lines · 2,552 tokens per session scan A e8ee2caeeaf2

Subscribe to this mod's changes

pr-agent AGENTS.md is an instructions file published in the GitHub repository The-PR-Agent/pr-agent (12,802 stars, last pushed yesterday), licensed MIT. It adds 2,536 tokens to every session, about $0.0127 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 instructions, from other repositories

courier CLAUDE.md

Instructions for yegor256/courier: Write one sentence per line. Keep each sentence short and concise. Separate clauses with periods rather than semicolons, colons, or em dashes. Name action, target, and condition. Write rules as direct orders, not opinions or suggestions. Strip emotions and rhetorical flourish. Forbid…

yegor256/courier · 101 tokens

bb AGENTS.md

AGENTS.md instructions for get-bb/bb, covering codebase guidelines, simplicity first, code comments, types and contracts and server and daemon.

get-bb/bb · 2,169 tokens

AstrBot copilot-instructions.md

Copilot instructions for AstrBotDevs/AstrBot, covering astrbot development instructions, working effectively, bootstrap and install dependencies, running the application and dashboard build (vue.js/node.js).

AstrBotDevs/AstrBot · 736 tokens

ai AGENTS.md

AGENTS.md instructions for vercel/ai, covering agents.md, project overview, repository structure, key directories and core package dependencies.

vercel/ai · 2,900 tokens

GPT-RAG config-python.instructions.md

Instructions for Azure/GPT-RAG, a project described as: Sharing the learning along the way we been gathering to enable Azure OpenAI at enterprise scale in a secure manner. GPT-RAG core is a Retrieval-Augmented Generation pattern running in Azure, using Azure Cognitive Search for retrieval and Azure OpenAI large…

Azure/GPT-RAG · 180 tokens

hatch3r CLAUDE.md

Instructions for hatch3r/hatch3r, covering hatch3r — development instructions, architecture, development commands, two-axis pillar framework (2.0.0) and orchestrator self-discipline (bypass protection).

hatch3r/hatch3r · 5,121 tokens