spellbook AGENTS.md

spellbook AGENTS.md is an instructions file for Codex, OpenCode from axiomantic/spellbook. It costs 7,589 tokens per session, scanned A, original, MIT.

A set of instructions for developing Spellbook, including dependency installation, test commands, linting, and documentation generation. It distinguishes quick tests from slower integration and external-service tests.

In plain words
What is it for?
Use it when installing the project, running targeted or complete test suites, checking Python code with Ruff, generating documentation, or reviewing release status.
Why use it?
It tells an agent which checks to run and includes a release check for newer GitHub pre-releases before work begins.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/axiomantic/spellbook/agents-md.svg)](https://agentmods.dev/instructions/axiomantic/spellbook/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/axiomantic/spellbook/agents-md"><img src="https://agentmods.dev/badge/instructions/axiomantic/spellbook/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 7,589 This file is loaded in full into every session.
When invoked 7,589 The same file — it is already loaded in full.
Security scan A 2 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.07589 $0.07589
Opus 5 $0.03794 $0.03794
Sonnet 5 $0.01518 $0.01518
Haiku 4.5 $0.00759 $0.00759

Measured 3d ago against content hash e6238b7fccfa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spellbook AGENTS.md scanned grade A with 2 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.

Makes network callslowCapability

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

- **Root** `install.py` (the curl-pipe target, documented entry) — handles fresh installs and upgrades via `python3 install.py`.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

# This test is now allowed to use subprocess.run/Popen
AGENTS.md · 545 lines

How it starts

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

Spellbook Development

Quick Start

# Install dependencies
uv pip install -e ".[dev,test]"

# Run tests (targeted)
uv run pytest tests/test_specific_file.py -x

# Run fast tests (default - skips docker, integration, slow, external)
uv run pytest tests/ -x

# Run ALL tests including slow/integration (as CI does)
uv run pytest tests/ -x --override-ini="addopts=" -m "not docker"

# Run linting
uv run ruff check .

# Generate documentation (pre-commit only checks freshness; run this yourself)
uv run scripts/generate_docs.py

Session Start: Pre-release Check

On session start in this project, check if there's a GitHub pre-release newer than the latest full release:

gh release list --limit 5 --repo axiomantic/spellbook

If a pre-release exists that is newer than the last actual release, ask: "There's a pre-release (vX.Y.Z) ready. Want to promote it to a full release?"

Key Conventions

  • AGENTS.md (this file) is for working on the spellbook repo itself. Only update it when changing the development workflow for this specific project (build commands, test conventions, architecture notes). It is NOT installed anywhere.
  • rules/*.md are the global user-facing rule modules that the spellbook installer ships. Directory-capable platforms receive one symlink per selected module in the platform's rules directory (~/.claude/rules/ for Claude Code); flat platforms receive a generated concatenation at their real instruction path. Each module carries YAML frontmatter (id, class, default, benefit) and holds global directives, instructions, and behavioral rules that apply to ALL projects. This is where cross-project instructions belong.
    • Editing an existing rules/*.md file takes effect immediately on directory-capable platforms — the installed file is a symlink to the source, so no reinstall step is needed.
    • Adding a NEW file under rules/ does need a step: run uv run install.py to create its symlink (or regenerate the flat-platform concatenation) before the new module reaches any installed platform. MANIFEST.md does not track rules/*.md — it only registers skills, commands, and agents — so there is no manifest entry to add for a new rule module, just the install step.
  • Skills go in skills/<name>/SKILL.md with YAML frontmatter
  • Commands go in commands/<name>.md with YAML frontmatter
  • Hooks go in hooks/ and must be registered in installer/components/hooks.py
  • MCP tools are defined in spellbook/mcp/server.py and spellbook/mcp/tools/ modules

Read the full file on GitHub · 545 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 · 545 lines · 7,589 tokens per session scan A e6238b7fccfa

Subscribe to this mod's changes

spellbook AGENTS.md is an instructions file published in the GitHub repository axiomantic/spellbook (10 stars, last pushed yesterday), licensed MIT. It adds 7,589 tokens to every session, about $0.0379 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

awesome-cursorrules-zh copilot-instructions.md

Copilot instructions for holtwood/awesome-cursorrules-zh, covering github copilot instructions, 项目概述, 技术栈, 代码规范 and 提交格式.

holtwood/awesome-cursorrules-zh · 241 tokens

awesome-skills CLAUDE.md

Claude Code instructions for johnqtcg/awesome-skills, covering claude.md, what this repo is, skill structure convention, running regression tests and or with coverage.

johnqtcg/awesome-skills · 1,028 tokens

nextjs-skills CLAUDE.md

Instructions for mohamed-hossam1/nextjs-skills: All contribution rules — style, naming, file layout, verification — live in AGENTS.md. Read that first.

mohamed-hossam1/nextjs-skills · 69 tokens

claude-plugins CLAUDE.md

Claude Code instructions for aiocean/claude-plugins, covering claude.md, what this is, plugin structure, marketplace registry and plugin categories.

aiocean/claude-plugins · 1,701 tokens

cursorrules-pro copilot-instructions.md

Copilot instructions for Wittlesus/cursorrules-pro, covering github copilot instructions — backend api, project context, code generation rules, architecture layers and consistent response format.

Wittlesus/cursorrules-pro · 1,320 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens