Grimoire AGENTS.md

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

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/sandsaber/grimoire/agents-md
Clone the repo
git clone --depth 1 https://github.com/sandsaber/Grimoire

Made for: Codex, OpenCode.

Per session 4,189 This file is loaded in full into every session.
When invoked 4,189 The same file — it is already loaded in full.
Security scan E 3 findings. 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.04189 $0.04189
Opus 5 $0.02094 $0.02094
Sonnet 5 $0.00838 $0.00838
Haiku 4.5 $0.00419 $0.00419

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

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

How it starts

The opening of the file, as written. The whole thing — 317 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, 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.

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 ACP adapter and 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/acp/ - Shared ACP transport and normalization helpers.

Read the full file on GitHub · 317 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 · 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 (31 stars, last pushed 3d ago), licensed MIT. It adds 4,189 tokens to every session, about $0.0209 per session on Opus 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.