explore

A command that examines a request and the relevant codebase before implementation planning. It can use a document, GitHub issue, plain-language description, or no input.

In plain words
What is it for?
Use it to clarify scope, define acceptance criteria, find integration points, and identify files or components likely to change.
Why use it?
It reduces the risk of planning against misunderstood requirements or the wrong parts of the code. It records requirements, affected areas, risks, and architecture notes for later work.

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/stefan-jansen/claude-code-toolkit/explore
Clone the repo
git clone --depth 1 https://github.com/stefan-jansen/claude-code-toolkit
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 484 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.00007 $0.00484
Opus 5 $0.00003 $0.00242
Sonnet 5 $0.00001 $0.00097
Haiku 4.5 $0.00001 $0.00048

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

Security

Grade A, and why

explore 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 2d 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.

plugins/workflow/commands/explore.md · 61 lines

What it actually says

Requirements Exploration

Analyze requirements and codebase context. First step in "Explore → Plan → Code → Commit" workflow.

Input: $ARGUMENTS

Sources

  • @file.md - Read and analyze document
  • #123 - Fetch GitHub issue
  • "description" - Natural language requirement
  • (empty) - General codebase exploration

Process

  1. Create Work Unit

    • Generate ID: YYYY-MM-DD_NN_topic
    • Create .claude/work/{id}/ with: metadata.json, requirements.md, exploration.md
    • Set as ACTIVE_WORK
  2. Analyze Source

    • Documents: Extract requirements, identify gaps, assess complexity
    • Issues: Fetch details, understand context, map technical needs
    • Description: Clarify scope, define success criteria, identify constraints
  3. Explore Codebase

    • Understand architecture and patterns
    • Identify integration points
    • Map affected components
    • Use Serena for semantic analysis when available
  4. Generate Output

    • requirements.md: Functional/non-functional requirements, acceptance criteria, risks
    • exploration.md: Architecture analysis, implementation approach, key files
  5. Smart Planning

    • Simple requirements → Generate complete plan + state.json → Ready for /next
    • Complex requirements → Generate outline → Recommend /plan

Work Unit Structure

.claude/work/YYYY-MM-DD_NN_topic/
├── metadata.json      # Status, created_at, requirement_type
├── requirements.md    # Captured requirements
├── exploration.md     # Analysis findings
└── state.json        # Tasks (if plan auto-generated)

Next Steps

  • Clear plan generated: "Run /next to implement"
  • Needs refinement: "Run /plan for detailed breakdown"
  • Has ambiguities: List clarifying questions first
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. 2d ago First seen · 61 lines · 7 tokens per session scan A 187109ff71af

Subscribe to this mod's changes

explore is a command published in the GitHub repository stefan-jansen/claude-code-toolkit (85 stars, last pushed 1mo ago), licensed MIT. It adds 7 tokens to every session and 484 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.