init-graph

init-graph is a command for Claude Code from tobiasosborne/alethfeld. It costs 6 tokens per session (522 once invoked), scanned A, original, MIT.

A command that creates a semantic proof graph for a mathematical or scientific theorem. The graph records the theorem statement and proof-project settings in an EDN file, a structured data format.

In plain words
What is it for?
Use it to start formal mathematics, physics, or algebraic-derivation projects by providing an output file and theorem statement, with optional proof settings.
Why use it?
It gives a new proof project a defined starting file, mode, identifier, and context limit instead of requiring that structure to be created by hand.

Command for Claude Code

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/tobiasosborne/alethfeld/init-graph
Clone the repo
git clone --depth 1 https://github.com/tobiasosborne/alethfeld

Made for: Claude Code.

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 init-graph

README.md
[![agentmods](https://agentmods.dev/badge/commands/tobiasosborne/alethfeld/init-graph.svg)](https://agentmods.dev/commands/tobiasosborne/alethfeld/init-graph)
Your own site
<a href="https://agentmods.dev/commands/tobiasosborne/alethfeld/init-graph"><img src="https://agentmods.dev/badge/commands/tobiasosborne/alethfeld/init-graph.svg" alt="Measured on agentmods" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 522 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.1 $0.00006 $0.00522
Opus 5 $0.00003 $0.00261
Sonnet 5 $0.00001 $0.00104
Haiku 4.5 $0.00001 $0.00052

Measured 5d ago against content hash 1159c8ef924e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

init-graph 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 5d 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.

.claude/commands/init-graph.md · 74 lines

What it actually says

Initialize Proof Graph

Create a new semantic proof graph for a theorem.

When to Use

Use this command when starting a new proof project.

Invocation

./cli/scripts/alethfeld init <output.edn> --theorem "Theorem statement"

Required Arguments

  • <output.edn> - Path for the new graph file
  • --theorem STMT or -t STMT - Theorem statement in LaTeX

Optional Options

  • --mode MODE or -m MODE - Proof mode (default: strict-mathematics)
    • strict-mathematics - Full rigor required
    • formal-physics - Standard physics conventions
    • algebraic-derivation - Algebraic manipulations
  • --graph-id ID or -g ID - Custom graph ID (auto-generated if omitted)
  • --max-tokens N or -T N - Context budget limit (default: 100000)

Examples

Basic initialization:

./scripts/alethfeld init proof.edn -t 'For all $n \geq 1$, $\sum_{k=1}^n k = \frac{n(n+1)}{2}$'

With custom mode:

./scripts/alethfeld init quantum-proof.edn -t 'Quantum channel composition' -m formal-physics

Output Format

The command creates an EDN file with:

{:graph-id "uuid-prefix"
 :version 1
 :theorem {:id :theorem
           :statement "..."
           :content-hash "..."}
 :nodes {}
 :symbols {}
 :external-refs {}
 :lemmas {}
 :obligations []
 :archived-nodes {}
 :metadata {:created-at "..."
            :last-modified "..."
            :proof-mode :strict-mathematics
            :iteration-counts {:verification {} :expansion {} :strategy 0}
            :context-budget {:max-tokens 100000 :current-estimate 0}}}

Next Steps After Init

  1. Add assumptions: add-node with :type :assumption
  2. Add definitions: add-node with :type :definition
  3. Begin proof: add-node with :type :claim
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. 5d ago First seen · 74 lines · 6 tokens per session scan A 1159c8ef924e

Subscribe to this mod's changes

init-graph is a command published in the GitHub repository tobiasosborne/alethfeld (144 stars, last pushed 3mo ago), licensed MIT. It adds 6 tokens to every session and 522 once invoked, about $0.0000 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-30.