crystallize

crystallize is a command for coding agents from axiomantic/spellbook. It costs 36 tokens per session (11,643 once invoked), scanned A, original, MIT.

A command that shortens detailed standard operating procedures into compact instructions for AI agents.

In plain words
What is it for?
Use it when you need to compress a prompt or make its instructions more suitable for an AI agent.
Why use it?
It removes repeated wording while keeping the instructions’ intended capabilities and rules.

Command

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 commands/axiomantic/spellbook/crystallize
Clone the repo
git clone --depth 1 https://github.com/axiomantic/spellbook
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 11,643 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00036 $0.11643
Opus 5 $0.00018 $0.05822
Sonnet 5 $0.00007 $0.02329
Haiku 4.5 $0.00004 $0.01164

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

Security

Grade A, and why

crystallize scanned grade A with 0 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/crystallize.md · 1,085 lines

How it starts

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

MISSION

Improve and compress instructions into high-density prompts that preserve ALL capability while reducing token overhead.

Scope

This command is the only path that enforces the Rules / General-Instructions split. Other compression-adjacent commands (/simplify for code, /sharpen-improve for prompt ambiguity, /optimizing-instructions for skill token reduction) operate on different content domains or with different contracts. To protect rules across passes, use /crystallize.

/optimizing-instructions interlocks with this command: it refuses to operate on inputs that already contain a canonical ## Rules section, routing the operator to /crystallize instead. See skills/optimizing-instructions/SKILL.md for the guard.

Invariant Principles

  1. Understand Before Touching: Read entire content. Map structure. Identify purpose. Catalog cross-references. Only then consider changes.

  2. Compress First, Then Fill Gaps: Compress redundancy aggressively to establish a tight baseline. Then fill only the gaps identified in Phase 2 analysis. MEDIUM/LOW gap fills must be net-neutral (offset by equal compression). Only CRITICAL/HIGH gaps may add net content.

  3. Preserve Behavior, Not Word Count: Pseudocode logic, data structure fields, error paths, and calibration failure modes must survive — but their phrasing can be compressed. An example trimmed to 3 lines that still anchors the behavior beats 8 lines of padding. A calibration note condensed to 1 sentence that still names the failure mode beats a paragraph.

  4. Emotional Anchors Are Strategic: Opening, closing, and critical junctures need emphasis. Reducing 10 CRITICALs to 3 well-placed ones is refinement. Removing all is destruction.

Read the full file on GitHub · 1,085 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 · 1,085 lines · 36 tokens per session scan A dccdc2d36d0d

Subscribe to this mod's changes

crystallize is a command published in the GitHub repository axiomantic/spellbook (10 stars, last pushed 8d ago), licensed MIT. It adds 36 tokens to every session and 11,643 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.