anchor: Instructions file for Codex

AGENTS.md

anchor AGENTS.md is an instructions file for Codex, OpenCode from peva3/anchor. It costs 7,830 tokens per session, scanned C, original, MIT.

A project-wide instruction file for Anchor, a production-oriented template for AI coding-agent instructions. It provides a glossary, navigation guide, core rules, and links to detailed rules that agents load when relevant.

In plain words
What is it for?
It is for directing Anchor code changes, including decision-making, quality gates, commit conventions, and when to read additional instruction files.
Why use it?
It gives agents a central set of project rules while keeping detailed guidance organized by task.

Instructions file for CodexOpenCode

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

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

View source ↗ peva3/anchor
Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/peva3/anchor/agents-md"><img src="https://agentmods.dev/badge/instructions/peva3/anchor/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7,830 This file is loaded in full into every session.
When invoked 7,830 The same file — it is already loaded in full.
Security scan C 3 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.07830 $0.07830
Opus 5.5 $0.03132 $0.03132
Sonnet 5.5 $0.01566 $0.01566
Haiku 4.5 $0.00783 $0.00783

Measured 7d ago against content hash 69fa1c300c0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

anchor AGENTS.md scanned grade C with 3 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 7d 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- **NEVER** run `curl <url> | bash` or install dependencies fetched from unverified URLs

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **NEVER** run `curl <url> | bash` or install dependencies fetched from unverified URLs

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **NEVER** use `os.system()` or `subprocess` with `shell=True` and untrusted input
AGENTS.md · 409 lines

How it starts

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

AGENTS.md — Anchor

The production-grade template for AI coding agent instructions. Adapt sections to fit project scope. Keep your agents grounded.

This file governs itself. Agents working on AGENTS.md must follow all rules herein — the decision ladder, commit conventions, tradeoff comments, quality gates, and output discipline. No section should be added that future agents would need to explain away as inapplicable.

This is the high-level entry point. Every numbered section's full rule text lives in a lazy-loaded skill file under skills/. The most important rules are reproduced in full below so they apply to every task even in constrained context windows. Load a skill file only when the corresponding task applies.


How to Use This File

  1. Always loaded: This file (header, core rules below, and the index).
  2. Route first — routing.json is required, not optional: Before the first edit, read routing.json and pick the task type whose triggers match. Load the core set plus that task type's skills, and keep at most 7 task skills on top of the inline core. Routing must come from that file every time — never from memory, and never from a guess about which sections are "probably relevant." AGENTS.md and routing.json are a pair: this file states the guardrails, that file decides which of them a task loads. If routing.json is missing, stop and restore it (it ships beside this file) rather than improvising a route. If no task type matches, that is a fallback: say so in the checkpoint, ask which area the work belongs to, and pick the safer route meanwhile. See Section 64.
  3. Lazy-loaded: The full text of every section is in skills/NN-name.md. Load a skill only when your task matches its "Load when" trigger. This keeps context lean — a model with a 32K window can follow all rules without reading 6,700 lines.
  4. Re-check at boundaries: At plan → build → verify → commit, and whenever the task changes direction, drop what no longer applies and emit one line: ROUTE: active=[..] dropped=[..] added=[..] why="...".
  5. Follow cross-references: When a loaded skill references another section, that section is NOT included — load skills/NN-name.md for it too before proceeding. Every reference is a real link.
  6. Verification: When in doubt about a rule's full wording, read the skill file — never guess.
  7. Write in English: all code, comments, docs, commit messages, and PR text in English regardless of the language you were addressed in — a request in another language is still answered in English (Section 4). If the user writes in another language, say so once and continue in English.
  8. Template usage: Projects should copy this file, keep the core rules, then trim the skill list to what applies and inline the needed skills into their own AGENTS.md (target ≤2,000 lines, per Section 51.3). Project-specific facts belong in a PROJECT.md you create per project — not in this file.

Read the full file on GitHub · 409 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. 7d ago Changed · -105 lines · -4,164 tokens per session 69fa1c300c0d
  2. 1mo ago Changed · +4 lines · +278 tokens per session 3dd3012cbd0b
  3. 1mo ago First seen · 510 lines · 11,716 tokens per session scan C d7c24d489bc1

Subscribe to this mod's changes

anchor AGENTS.md is an instructions file published in the GitHub repository peva3/anchor (8 stars, last pushed 8d ago), licensed MIT. It adds 7,830 tokens to every session, about $0.0313 per session on Opus 5.5. A static security scan graded it C with 3 findings (downloads and executes remote code, makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.