code-tour

code-tour is a command for Claude Code from sairam0424/MindForge. It costs 34 tokens per session (930 once invoked), scanned A, original, MIT.

A guided tour of a codebase with an annotated order for reading its files. It explains how requests, data, events, and core use cases move through the project.

In plain words
What is it for?
Use it to create a shallow or detailed onboarding guide for a folder or whole codebase, optionally saved as a Markdown file.
Why use it?
It reduces the time needed to understand an unfamiliar project and shows which files matter first.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

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/sairam0424/mindforge/code-tour
Clone the repo
git clone --depth 1 https://github.com/sairam0424/MindForge

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 code-tour

README.md
[![agentmods](https://agentmods.dev/badge/commands/sairam0424/mindforge/code-tour.svg)](https://agentmods.dev/commands/sairam0424/mindforge/code-tour)
Your own site
<a href="https://agentmods.dev/commands/sairam0424/mindforge/code-tour"><img src="https://agentmods.dev/badge/commands/sairam0424/mindforge/code-tour.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 930 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.00034 $0.00930
Opus 5 $0.00017 $0.00465
Sonnet 5 $0.00007 $0.00186
Haiku 4.5 $0.00003 $0.00093

Measured 2d ago against content hash 3d386f6137eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

code-tour 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.

.claude/commands/mindforge/code-tour.md · 86 lines

How it starts

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

<execution_context> @.mindforge/skills/code-tour/SKILL.md @.mindforge/skills/codebase-onboarding/SKILL.md </execution_context>

  1. Trace hot paths: Starting from entry points, trace the most important execution paths:

    • The "happy path" for the core use case
    • Request lifecycle (middleware → handler → service → repository → response)
    • Data flow from input to persistence
    • Event/message processing pipeline (if event-driven)
    • Mark each file touched with its role in the path
  2. Build progressive reading order: Organize files into a numbered tour sequence:

    • Level 1: Entry points and configuration (understand how it starts)
    • Level 2: Core domain models and types (understand what it models)
    • Level 3: Service layer and business logic (understand what it does)
    • Level 4: Infrastructure and adapters (understand how it connects)
    • Level 5: Tests and edge cases (understand how it's verified)
    • Each level builds on knowledge from the previous level
  3. Annotate each stop: For every file in the tour, provide:

    • Stop number and title (e.g., "Stop 3: User Authentication Service")
    • Why this file matters (1-2 sentences on its role in the system)
    • Key sections to focus on (specific line ranges or function names)
    • Patterns to notice (design patterns, conventions, architectural decisions)
    • Connections (what calls this, what this calls — upstream/downstream)
  4. Add understanding checkpoints: After every 3-5 stops, insert a checkpoint:

    • Summary of what the reader should now understand
    • Questions to test comprehension ("Can you explain why X uses Y?")
    • Mental model diagram (ASCII box-and-arrow showing relationships learned so far)
    • Common misconceptions to avoid at this stage
  5. Document architecture decisions in context: At relevant tour stops, explain:

    • Why this approach was chosen over alternatives
    • Historical context if visible from git blame or comments
    • Trade-offs accepted and their implications
    • When this decision should be revisited
  6. Handle depth modes:

    • --depth shallow: Entry points + core domain + one hot path (10-15 stops)
    • --depth deep: Full system trace including infrastructure, error handling, and edge cases (25-40 stops)
    • Default: moderate depth covering all layers with representative examples (15-25 stops)
  7. Cross-reference with tests: For each major component in the tour:

    • Point to the relevant test file
    • Highlight which behaviors are tested vs untested
    • Note any test patterns that reveal intended usage
  8. Write TOUR.md: Output the complete tour document:

    • Table of contents with all stops
    • Prerequisites (tools, environment, background knowledge)
    • Estimated reading time per section
    • Numbered stops with full annotations
    • Checkpoints between sections
    • "Where to go next" section for deeper exploration
    • Glossary of project-specific terms
  9. Generate companion commands: Produce helper commands:

    • Script to open all tour files in editor in order
    • Grep patterns to find related code not in the tour
    • Links to relevant external documentation
    • Suggested follow-up tours for specific subsystems

Read the full file on GitHub · 86 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. 2d ago First seen · 86 lines · 34 tokens per session scan A 3d386f6137eb

Subscribe to this mod's changes

code-tour is a command published in the GitHub repository sairam0424/MindForge (0 stars, last pushed 2d ago), licensed MIT. It adds 34 tokens to every session and 930 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-03.