rp1: Instructions file for Codex

AGENTS.md

rp1 AGENTS.md is an instructions file for Codex, OpenCode from rp1-run/rp1. It costs 3,401 tokens per session, scanned A, original, Apache-2.0.

Authoring instructions for rp1, a system for creating agents and skills with defined names, project context, and limits on subagents.

In plain words
What is it for?
They guide the creation and use of rp1 agents, skills, context files, and Codex task shorthand.
Why use it?
They prevent authors from using incorrect namespaces, missing required project context, or asking subagents to perform unsupported actions.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions subagents; names the SlashCommand tool; mentions Claude Code.

This is rp1-run/rp1's own configuration. It tells Codex and OpenCode how to work on rp1 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 rp1 configures →

Reuse

Borrowing it

Nothing to install: this file belongs to rp1-run/rp1. 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/rp1-run/rp1/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/rp1-run/rp1

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/rp1-run/rp1/agents-md.svg)](https://agentmods.dev/instructions/rp1-run/rp1/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/rp1-run/rp1/agents-md"><img src="https://agentmods.dev/badge/instructions/rp1-run/rp1/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,401 This file is loaded in full into every session.
When invoked 3,401 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.03401 $0.03401
Opus 5 $0.01700 $0.01700
Sonnet 5 $0.00680 $0.00680
Haiku 4.5 $0.00340 $0.00340

Measured 6d ago against content hash c93cf3832cdd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

rp1 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 6d 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 · 316 lines

How it starts

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

rp1 Agent Authoring Guide

This file is intentionally narrow. Use it for agent and skill authoring rules that are specific to rp1.

  1. Read .rp1/context/index.md first.
  2. Then load only the KB files needed for the task.

Project understanding belongs in .rp1/context/. This file covers runtime and authoring constraints.

Core Rules

Namespace prefixes

Use these prefixes exactly:

  • Skills: /rp1-base:skill-name, /rp1-dev:skill-name, /rp1-utils:skill-name
  • Agent references: subagent_type: rp1-base:agent-name for Claude Code, subagent_type: @rp1-dev/agent-name for OpenCode

Subagent limitations

Subagents generally cannot spawn other agents. If an agent is designed to run as a subagent:

  • Do not use SlashCommand to call other commands.
  • Do not invoke other skills for KB context; read KB files directly using the resolved {KB_ROOT} path (index.md first, then task-relevant files).
  • Inline only the prompt text or KB guidance the subagent actually needs.

Codex task shorthand

For Codex agents, interpret any instruction in the form Task: <sub-agent-name> as:

  • spawn <sub-agent-name>

Treat this as an execution directive, not as descriptive text.

Codex subagent waiting

When Codex agents spawn subagents in this repo:

  • Do not assume a subagent failed just because it does not answer quickly.
  • Use longer wait windows for artifact-producing or workflow-heavy subagents.
  • Prefer waiting for the spawned subagent to complete before declaring it stalled or rerouting around it, unless the user explicitly wants parallel speculative work.
  • Check for expected side effects such as artifact files before concluding the subagent is stuck.
  • If the subagent is on the critical path, babysit it with patient polling instead of replacing it after a short timeout.

Cross-plugin dependency rule

  • Dev agents may depend on base.
  • Base agents must not call dev commands.
  • If a dev workflow depends on an rp1-base skill (such as rp1-base:artifact-templates) and it is unavailable, tell the user to install rp1-base.

Read the full file on GitHub · 316 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. 6d ago First seen · 316 lines · 3,401 tokens per session scan A c93cf3832cdd

Subscribe to this mod's changes

rp1 AGENTS.md is an instructions file published in the GitHub repository rp1-run/rp1 (38 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 3,401 tokens to every session, about $0.0170 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

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,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

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 · 6,785 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 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,469 tokens