pr-agent: Instructions file for Codex

AGENTS.md

pr-agent AGENTS.md is an instructions file for Codex, OpenCode from The-PR-Agent/pr-agent. It costs 3,303 tokens per session, scanned A, original, MIT.

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

Written for Codex and OpenCode: the file is AGENTS.md.

This is The-PR-Agent/pr-agent's own configuration. It tells Codex and OpenCode how to work on pr-agent itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything pr-agent configures →

About the project

PR-Agent is an open-source AI agent that reviews pull requests and helps with code review. Developers use it to automate review work in software repositories.

The-PR-Agent/pr-agent · 13,674 stars · on GitHub · pr-agent.ai

Reuse

Borrowing it

Nothing to install: this file belongs to The-PR-Agent/pr-agent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/The-PR-Agent/pr-agent/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/The-PR-Agent/pr-agent

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/the-pr-agent/pr-agent/agents-md/github.svg)](https://agentmods.dev/instructions/the-pr-agent/pr-agent/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/the-pr-agent/pr-agent/agents-md"><img src="https://agentmods.dev/badge/instructions/the-pr-agent/pr-agent/agents-md/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-agent AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/the-pr-agent/pr-agent/agents-md"><img src="https://agentmods.dev/badge/instructions/the-pr-agent/pr-agent/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,303 This file is loaded in full into every session.
When invoked 3,303 The same file — it is already loaded in full.
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.03303 $0.03303
Opus 5.5 $0.01321 $0.01321
Sonnet 5.5 $0.00661 $0.00661
Haiku 4.5 $0.00330 $0.00330

Measured today against content hash aaf97fb963a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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 · 128 lines

How it starts

The opening of the file, as written. The whole thing — 128 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_output_models.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 Docusaurus site (docs/docusaurus.config.js and docs/sidebars.js plus content under docs/docs/); theme overrides live in docs/src/ and static assets in docs/static/.
  • .github/workflows/ defines CI pipelines for unit tests, coverage, docs deployment, pre-commit, and PR-agent self-review.
  • docker/ provides build targets for services (github_app, gitlab_webhook, etc.) and the test stage used in CI; the root Dockerfile.github_action_dockerhub only wraps the published github_action image for action.yaml.

Read the full file on GitHub · 128 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 · -12 tokens per session aaf97fb963a9
  2. 3d ago Changed · -34 tokens per session 965be85202ca
  3. 5d ago Changed · +7 lines · +191 tokens per session 0d116cdd73bf
  4. 10d ago Changed · +5 lines · +443 tokens per session 81eaa12fcb06
  5. 17d ago Changed · -4 tokens per session e8264cd8c055
  6. 29d ago Changed d584dd2d0161
  7. 1mo ago Changed · +140 tokens per session 6bde210ebfe0
  8. 1mo ago Changed · +25 tokens per session 560f2bd8d485
  9. 1mo ago Changed · -3 tokens per session 6689845a23cf
  10. 1mo ago First seen · 116 lines · 2,557 tokens per session scan A a5eeed0fb2fd

Subscribe to this mod's changes

pr-agent AGENTS.md is an instructions file published in the GitHub repository The-PR-Agent/pr-agent (13,674 stars, last pushed today), licensed MIT. It adds 3,303 tokens to every session, about $0.0132 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-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens