grimoire AGENTS.md

grimoire AGENTS.md is an instructions file for Codex, OpenCode from grimoire-rs/grimoire. It costs 4,136 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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/grimoire-rs/grimoire/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,136 This file is loaded in full into every session.
When invoked 4,136 The same file — it is already loaded in full.
Security scan C 1 finding. 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 $0.04136 $0.04136
Opus 5 $0.02068 $0.02068
Sonnet 5 $0.00827 $0.00827
Haiku 4.5 $0.00414 $0.00414

Measured 3d ago against content hash f778b0a5625b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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.

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 · 279 lines

How it starts

The opening of the file, as written. The whole thing — 279 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 (20 subcommands), OCI registry pipeline, catalog publishing, MCP server, TUI. One binary crate, 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 · 279 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. 3d ago First seen · 279 lines · 4,136 tokens per session scan C f778b0a5625b

Subscribe to this mod's changes

grimoire AGENTS.md is an instructions file published in the GitHub repository grimoire-rs/grimoire (8 stars, last pushed 3d ago), licensed Apache-2.0. It adds 4,136 tokens to every session, about $0.0207 per session on Opus 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.