cgp: Instructions file for Codex

AGENTS.md

cgp AGENTS.md is an instructions file for Codex, OpenCode from contextgeneric/cgp. It costs 6,072 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for CGP, a family of Rust libraries developed across related repositories. They explain the current pre-release version, the difference from the older crates.io release, which crates are published, and where sibling-project information lives.

In plain words
What is it for?
Use them before changing CGP crates, publishing the workspace, checking release versions, or coordinating work with sibling projects.
Why use it?
They prevent agents from using incompatible documentation or changing versions unnecessarily. They also clarify which packages are real release targets and which are test-only.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/contextgeneric/cgp/agents-md"><img src="https://agentmods.dev/badge/instructions/contextgeneric/cgp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6,072 This file is loaded in full into every session.
When invoked 6,072 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.06072 $0.06072
Opus 5.5 $0.02429 $0.02429
Sonnet 5.5 $0.01214 $0.01214
Haiku 4.5 $0.00607 $0.00607

Measured today against content hash 28713db76cb0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cgp 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 · 343 lines

How it starts

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

AGENTS.md

This file provides guidance to LLM agents when working with code in this repository.

Project status

This working tree is the upcoming v0.8.0 release. Its crates may carry a pre-release version such as 0.8.0-alpha in their Cargo.toml, published to crates.io as a test run of the release process; that suffix is not a version anyone documents or tracks. Every document, comment, and README describes this tree as v0.8.0, as though it had already been published, per the knowledge base's rule on versions: never name a pre-release, describe how one behaves, or compare one with the source, unless the user explicitly asks. The same holds for every sibling crate, cargo-cgp v0.1.0 included.

The previous official release, v0.7.0, is not compatible with this tree. v0.7.0 carries legacy features and syntax that v0.8.0 has removed or changed, so code or documentation written against v0.7.0 will not compile here. Treat v0.7.0 as a separate, older line and do not reconcile this tree's syntax against it.

Only the library crates are published. The five crates under crates/tests/ are marked publish = false, so cargo publish --workspace skips them and publishes just the real CGP crates.

The sibling projects

cgp is one repository in a family that is developed together, so a task here routinely reads — and often updates — another one. sibling-projects.md is the authoritative list: where each project lives, which revision of it to read, and the rules for finding a sibling locally versus linking to it. Three of them matter constantly.

This repository's documentation lives in cgp-knowledge-base. There is no docs/ directory here. The construct reference, the concepts, the guides, the error catalog, and the macro-implementation notes are all in that repository's cgp/ directory, and the worked examples sit at its top level. It is a consolidated base, with cargo-cgp's documentation as the neighbouring section, so an error class here and the tool's handling of it are one directory apart. Treat the knowledge base as part of this repository's surface: a change to a construct's behavior carries its documentation change, and when the checkout is missing, say plainly what needs updating there.

Read the full file on GitHub · 343 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 · -2 lines · -39 tokens per session 28713db76cb0
  2. 1mo ago Changed · +4 lines · +75 tokens per session f9e2f90cd9f3
  3. 1mo ago Changed · +3 lines · +70 tokens per session db648874adda
  4. 1mo ago Changed · +2 lines · +56 tokens per session 0d71d5884c43
  5. 1mo ago Changed · +1 lines · -84 tokens per session e76d508653be
  6. 2mo ago First seen · 335 lines · 5,994 tokens per session scan A fe648963752f

Subscribe to this mod's changes

cgp AGENTS.md is an instructions file published in the GitHub repository contextgeneric/cgp (251 stars, last pushed today), licensed Apache-2.0. It adds 6,072 tokens to every session, about $0.0243 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

cgp AGENTS.md compared with instructions from other repositories

cgp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cgp AGENTS.mdcontextgeneric/cgpInstructions file251todayApache-2.0A6,072Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file275k2d agoMITA4,313Codex, OpenCode