grimoire: Instructions file for Codex

AGENTS.md

grimoire AGENTS.md is an instructions file for Codex, OpenCode from grimoire-rs/grimoire. It costs 5,508 tokens per session, scanned C, original, Apache-2.0.

Project instructions for Grimoire, a command-line package manager for AI-agent configuration such as skills, rules, and prompts. It distributes these packages through OCI registries, which are standard systems for storing and delivering packaged software artifacts.

In plain words
What is it for?
Use them when developing, testing, publishing, or maintaining Grimoire’s CLI, catalogue, OCI registry pipeline, MCP server, or terminal interface.
Why use it?
They explain the project’s structure and protect its command-line, catalogue, schema, and registry interfaces from breaking changes.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/grimoire-rs/grimoire/agents-md"><img src="https://agentmods.dev/badge/instructions/grimoire-rs/grimoire/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,508 This file is loaded in full into every session.
When invoked 5,508 The same file — it is already loaded in full.
Security scan C 1 finding. 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.05508 $0.05508
Opus 5.5 $0.02203 $0.02203
Sonnet 5.5 $0.01102 $0.01102
Haiku 4.5 $0.00551 $0.00551

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

Security

Grade C, and why

grimoire AGENTS.md scanned grade C with 1 finding 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 yesterday.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf directory # NOT: rm -r directory
AGENTS.md · 281 lines

How it starts

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

AGENTS.md

Single project-context file for every AI agent working in this repo — Claude Code, Codex CLI, and any other AGENTS.md-aware tool.

Edit this file, never CLAUDE.md. CLAUDE.md is a one-line pointer that imports this one, so a second copy would only drift. The same goes for anything it links: fix the source file, not a restatement of it.

Lines beginning @ are Claude Code file imports and are expanded into context automatically; other agents should open those paths directly.

What is Grimoire

Grimoire is a package manager for AI-agent config — a CLI to install, maintain, and publish AI-agent configuration (skills, rules, prompts) distributed through standard OCI registries. The binary is named grim; the Rust crate/package is grimoire. Shipping: full CLI (26 subcommands), OCI registry pipeline, catalog publishing, MCP server, TUI, experimental hooks and settings. A cargo workspace (see Architecture), subsystem modules under src/, no stable library API — the binary is the only consumer.

Status: stabilizing — preparing 1.0.0. Released surfaces (CLI, JSON output, schemas, layouts, OCI pipeline, catalog publishing) are frozen contracts: breaking changes are prohibited — evolution is additive-only (Principle 9). Treat docs as contracts, flag drift when you find it.

Project Identity

Product vision, target users, positioning, related repos, comparable tools and research keywords → product-context.md. Consult when reasoning about project direction, scope trade-offs, ADR motivation, or research framing. Canonical — keep current (update protocol at the bottom of that file).

Rule Catalog

Before planning, research, or an architectural decision, scan "By concern" in the catalog below. Path-glob rules fire only when a matching file is already open; the catalog covers everything before that.

@.claude/rules.md

Build & Development Commands

Task runner: task (Taskfile v3) is the primary runner. Always check task --list before inventing ad-hoc commands. Taskfiles are tree-structured: root (taskfile.yml), subsystem dirs (test/, .claude/), taskfiles/*.taskfile.yml for cross-cutting.

Read the full file on GitHub · 281 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. yesterday Changed · +325 tokens per session 7ea4c4220d30
  2. 3d ago Changed · +9 tokens per session 6701f90cdb68
  3. 4d ago Changed · +12 tokens per session ea3b072a4578
  4. 5d ago Changed 322f8a1b8da7
  5. 13d ago Changed · +29 tokens per session d554fa4d2e0a
  6. 17d ago Changed · +207 tokens per session 2823649111f9
  7. 18d ago Changed · +2 tokens per session 49e8b5e66ce5
  8. 1mo ago Changed · +396 tokens per session 056865290cac
  9. 1mo ago Changed · +2 lines · +352 tokens per session 1578c1570261
  10. 1mo ago First seen · 279 lines · 4,176 tokens per session scan C ce3c0f4e8af6

Subscribe to this mod's changes

grimoire AGENTS.md is an instructions file published in the GitHub repository grimoire-rs/grimoire (15 stars, last pushed 2d ago), licensed Apache-2.0. It adds 5,508 tokens to every session, about $0.0220 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

grimoire AGENTS.md compared with instructions from other repositories

grimoire AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
grimoire AGENTS.mdgrimoire-rs/grimoireInstructions file152d agoApache-2.0C5,508Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot