Grimoire: Instructions file for Codex

AGENTS.md

Grimoire AGENTS.md is an instructions file for Codex, OpenCode from sandsaber/Grimoire. It costs 6,469 tokens per session, scanned E, original, MIT.

A set of project instructions for coding agents working on Grimoire, a private Obsidian plugin that embeds command-line AI assistants in a notes workspace.

In plain words
What is it for?
Use it when agents need guidance while changing Grimoire, especially its provider adapters, instruction files, architecture, or user-facing text.
Why use it?
It gives agents shared rules for project structure, provider integrations, documentation, and where different instructions belong.

Instructions file for CodexOpenCode

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

This is sandsaber/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 sandsaber/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/sandsaber/Grimoire/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/sandsaber/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/sandsaber/grimoire/agents-md/github.svg)](https://agentmods.dev/instructions/sandsaber/grimoire/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/sandsaber/grimoire/agents-md"><img src="https://agentmods.dev/badge/instructions/sandsaber/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/sandsaber/grimoire/agents-md"><img src="https://agentmods.dev/badge/instructions/sandsaber/grimoire/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6,469 This file is loaded in full into every session.
When invoked 6,469 The same file — it is already loaded in full.
Security scan E 3 findings. A grade says what 26 rules found in the file — not that it is safe. ✓ AI security review Sonnet 5 · 7 Sept 2026 📄 Read the review
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.06469 $0.06469
Opus 5.5 $0.02588 $0.02588
Sonnet 5.5 $0.01294 $0.01294
Haiku 4.5 $0.00647 $0.00647

Measured 1mo ago against content hash a5547b7f6f2e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade E, and why

Grimoire AGENTS.md scanned grade E 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 1mo 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- rtk-instructions v2 -->

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.

curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh

Makes network callslowCapability

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

curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh
AGENTS.md · 401 lines

How it starts

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

Agent Instructions

Grimoire is a private, pre-release Obsidian plugin that embeds agentic CLI assistants in a vault-native workspace. It is not a standalone CLI. The plugin shell must stay provider-neutral while provider adapters wrap external tools such as Claude Code, Codex, OpenCode, Qwen Code, Devin, and Antigravity CLI.

Repository documentation and user-facing product copy should be in English unless the task explicitly targets localized UI text.

Instruction Layout

  • AGENTS.md is the canonical shared instruction file for coding agents.
  • CLAUDE.md files exist so Claude Code can load the same instructions. They should import the nearest AGENTS.md and contain only Claude-specific additions.
  • Keep root instructions durable. Put path-specific details in nested AGENTS.md files next to the code they govern.
  • If a design handoff directory is named by the user, treat it as the source of truth for that task. Keep temporary handoff/debug artifacts untracked unless the user explicitly asks to commit them. docs/design/ is the exception and is checked in: Grimoire Nordic.html is the drawing the design system describes, every surface doc links to it, and it is meant to be edited as the design moves — not a scratch artifact to be cleaned up.

Provider Directories

  • src/providers/claude/ - Claude Code SDK adapter and Claude-compatible vault files.
  • src/providers/codex/ - Codex app-server adapter and Codex-owned workspace services.
  • src/providers/antigravity/ - Antigravity CLI print-mode adapter and Google's official Gemini CLI replacement.
  • src/providers/gemini/ - Legacy Gemini CLI ACP adapter and Google-owned runtime, history, settings, and UI behavior.
  • src/providers/grok/ - Grok Build ACP adapter and xAI-owned runtime, history, settings, and UI behavior.
  • src/providers/opencode/ - OpenCode V1 ACP and V2 native API adapters, plus launch/workspace artifacts.
  • src/providers/mimocode/ - MiMoCode ACP adapter and launch/workspace artifacts.
  • src/providers/kimicode/ - Kimi Code ACP adapter and launch/workspace artifacts.
  • src/providers/qwen/ - Qwen Code ACP adapter and Qwen-owned runtime, history, settings, and UI behavior.
  • src/providers/devin/ - Devin CLI (Cognition) ACP adapter and Devin-owned runtime, settings, and UI behavior.
  • src/providers/reasonix/ - Reasonix ACP adapter and Reasonix-owned runtime, settings, and UI behavior.
  • src/providers/commandcode/ - Command Code headless NDJSON adapter and CLI-owned sessions, model discovery, settings, and UI behavior.
  • src/providers/acp/ - Shared ACP transport and normalization helpers.
  • src/providers/shared/ - Provider-neutral helpers that need the plugin type, and so cannot live in src/core/. A helper belongs here only when at least two providers use it and its implementation is genuinely the same question asked twice.

Read the full file on GitHub · 401 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. 1mo ago Changed · +20 tokens per session a5547b7f6f2e
  2. 1mo ago Changed · +1 lines · +100 tokens per session 78dda2e7074b
  3. 1mo ago Changed · +7 lines · +113 tokens per session 95b2eb11c80a
  4. 1mo ago Changed · +2 lines · +94 tokens per session 119bc8cb2b9b
  5. 1mo ago Changed · +2 lines · +86 tokens per session 9d311315ae53
  6. 1mo ago Changed · +2 lines · +73 tokens per session 3c7967249cc3
  7. 1mo ago Changed · +31 lines · +647 tokens per session 57bfed96bf84
  8. 1mo ago Changed · +38 lines · +1,119 tokens per session eeb242e04b05
  9. 1mo ago Changed · +1 lines · +28 tokens per session 09cf8daf9b15
  10. 1mo ago First seen · 317 lines · 4,189 tokens per session scan E a3fcdedcd2e9

Subscribe to this mod's changes

Grimoire AGENTS.md is an instructions file published in the GitHub repository sandsaber/Grimoire (42 stars, last pushed 2d ago), licensed MIT. It adds 6,469 tokens to every session, about $0.0259 per session on Opus 5.5. A static security scan graded it E with 3 findings (hidden instructions, downloads and executes remote code, makes network calls). 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