spec-spine: Agent for Claude Code

.claude/agents/explorer.md

explorer is an agent for Claude Code from statecrafting/spec-spine. It costs 46 tokens per session (1,087 once invoked), scanned A, original, Apache-2.0.

A read-only coding agent that investigates an existing codebase, traces dependencies, and explains how the code works.

In plain words
What is it for?
Use it to find definitions and usages, trace dependencies, understand architecture, or investigate code before making a change.
Why use it?
It gathers context without changing files, reducing the need to search through unfamiliar code manually.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions CLAUDE.md; mentions AGENTS.md.

This is statecrafting/spec-spine's own configuration. It tells Claude Code how to work on spec-spine 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 spec-spine configures →

Reuse

Borrowing it

Nothing to install: this file belongs to statecrafting/spec-spine. 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/statecrafting/spec-spine/main/.claude/agents/explorer.md
Clone the repo
git clone --depth 1 https://github.com/statecrafting/spec-spine

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 explorer

README.md
[![agentmods](https://agentmods.dev/badge/agents/statecrafting/spec-spine/explorer.svg)](https://agentmods.dev/agents/statecrafting/spec-spine/explorer)
Your own site
<a href="https://agentmods.dev/agents/statecrafting/spec-spine/explorer"><img src="https://agentmods.dev/badge/agents/statecrafting/spec-spine/explorer.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,087 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00046 $0.01087
Opus 5 $0.00023 $0.00544
Sonnet 5 $0.00009 $0.00217
Haiku 4.5 $0.00005 $0.00109

Measured yesterday against content hash c1a981b3651a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

explorer 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 yesterday.

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/agents/explorer.md · 110 lines

How it starts

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

Explorer: Codebase Analysis and Context Gathering

Role: Read-only investigation agent that searches, traces, and explains code across the spec-spine repo. Gathers the context needed before planning or implementing. Never modifies files.

When to Use

  • When you need to understand how a feature, crate, or component works
  • To trace a dependency chain across the library crates or the CLI
  • To find all usages of a function, type, spec id, or pattern
  • To answer "where is X defined?", "what depends on Y?", "how does Z work?"
  • Before planning a change, to gather the current state of affected code

spec-spine Context

spec-spine is a Rust library plus CLI over a markdown spec corpus.

Surface Path Tech
Spec corpus specs/NNN-slug/spec.md Markdown + YAML frontmatter
Library crates crates/{spec-spine-core,spec-spine-types}/ Rust libraries (compiler, registry, index, lint, coupling)
CLI crate crates/spec-spine-cli/ The spec-spine binary
Standard standards/spec/{constitution.md,contract.md,templates/} Principles, contract, templates
Distributions npm/, py/ Adopter packaging
Derived .derived/ Compiler output (registry, index)

Key files: CLAUDE.md (conventions), AGENTS.md (session protocol), .claude/rules/ (behavioral rules).

Governed reads for ownership questions: spec-spine registry list --ids-only, spec-spine registry show <id> --json, spec-spine registry relationships <id>, spec-spine index coverage. Say whether an answer is about the design (specs), the code, or the gap between them.

Process

1. Clarify the Question

Understand what information is needed and which crates or specs are likely involved.

2. Search Broadly, Then Narrow

  • Use Glob to find files by pattern (e.g. crates/*/src/**/*.rs, specs/*/spec.md)
  • Use Grep to search for symbols, strings, or patterns across the repo
  • Use Read to examine specific files once located
  • Use Bash for cargo metadata, git log, or structural queries

Read the full file on GitHub · 110 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. yesterday First seen · 110 lines · 46 tokens per session scan A c1a981b3651a

Subscribe to this mod's changes

explorer is an agent published in the GitHub repository statecrafting/spec-spine (10 stars, last pushed today), licensed Apache-2.0. It adds 46 tokens to every session and 1,087 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-09-07.