skills/mine-how/SKILL.md
Use when the user says: "how does X work", "walk me through", "explain this subsystem", "explain how", "trace the flow". Complexity-adaptive subsystem explanation — builds mental models conversationally, not documentation artifacts.
npx skillsauth add NodeJSmith/Claudefiles mine-howInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Interactive subsystem explanation grounded in actual code. Reads the real files, traces the runtime flow, and explains as a narrative walkthrough with file:line references. Every explanation is accuracy-reviewed before presenting.
| Skill | What it produces |
|-------|-----------------|
| /mine-how | Conversational walkthrough — builds a mental model |
| /mine-document | Durable write-up — same investigation, written to a file that survives code churn |
| architect agent | Documentation artifacts — Mermaid diagrams, architecture overviews |
| /mine-research | Investigation brief — evaluates feasibility of a proposed change |
$ARGUMENTS — the question to answer. Can be:
/mine-how "how does mine-orchestrate handle task failures?"/mine-how "walk me through what happens when a webhook arrives"/mine-how "how does the rate limiter work?"/mine-how src/services/auth.pyIf $ARGUMENTS is empty:
AskUserQuestion:
question: "What would you like me to explain?"
header: "Question"
multiSelect: false
options:
- label: "I'll type my question"
description: "Ask about any subsystem, flow, or mechanism in this codebase"
- label: "What's the architecture?"
description: "High-level overview of how this project is structured"
Assess whether the question is simple or complex:
When uncertain, default to complex — parallel explorers are cheap and produce better results than a single agent guessing at cross-module flows.
Dispatch one agent:
Agent(subagent_type: "general-purpose", model: "sonnet")
Prompt:
Answer this question about the codebase by reading the actual code:
Question: <the user's question>
Instructions:
1. Find the relevant files using Grep and Glob
2. Read each file that contributes to the answer
3. Trace the runtime flow — what calls what, what data flows where
4. Write a narrative explanation to <dir>/explanation.md
Format rules:
- Write as a walkthrough, not a bullet list — guide the reader through the flow
- Reference every claim with file:line (e.g., "the handler at src/api/routes.py:45 dispatches to...")
- Explain WHY the code is shaped this way, not just WHAT it does
- If something is unclear or seems wrong in the code, say so — don't paper over it
- Keep it at senior-engineer depth — assume the reader knows the language but not this codebase
First, decompose the question into 2-4 investigation angles. Each angle should cover a distinct aspect of the answer. Examples:
Dispatch 2-4 parallel explorer agents:
Agent(subagent_type: "Explore", model: "haiku") # for each angle
Each explorer prompt:
Investigate one aspect of a subsystem for an explanation being assembled.
Question: <the user's question>
Your angle: <this explorer's specific angle>
Instructions:
1. Find files relevant to your angle using Grep and Glob
2. Read each file and trace the flow specific to your angle
3. Write your findings to <dir>/explorer-N.md
Include:
- File paths and line numbers for every claim
- The sequence of calls or data flow you traced
- Anything surprising, unclear, or potentially wrong in the code
Stay focused on your angle — other explorers are covering other aspects.
After all explorers complete, dispatch a synthesis agent:
Agent(subagent_type: "general-purpose", model: "sonnet")
Synthesis prompt:
Synthesize explorer findings into a single narrative explanation.
Question: <the user's question>
Explorer findings (read each file):
<list of explorer-N.md paths>
Instructions:
1. Read all explorer findings
2. If explorers conflict on the same code path, read the code directly to resolve
3. Weave findings into a single narrative walkthrough — not a section-per-explorer dump
4. Write the explanation to <dir>/explanation.md
Format rules:
- Write as a walkthrough, not a bullet list
- Reference every claim with file:line
- Explain WHY the code is shaped this way, not just WHAT it does
- Where explorers found surprising or unclear code, call it out
- Keep it at senior-engineer depth
Dispatch a review agent:
Agent(subagent_type: "general-purpose", model: "sonnet")
Review prompt:
Review this explanation of a codebase subsystem for accuracy.
Original question: <the user's question>
Explanation: <dir>/explanation.md (read this file)
Instructions:
1. Read the explanation
2. For every file:line reference, read that file and verify the claim
3. Check for:
- Functions or classes that don't exist or are named differently
- Flow descriptions that skip steps or get the order wrong
- Claims about behavior that the code doesn't support
- Missing important aspects the explanation should have covered
4. Write your review to <dir>/review.md
Output format:
- If accurate: write "ACCURATE" on the first line, then optionally note any minor additions that would strengthen the explanation
- If corrections needed: write "CORRECTIONS" on the first line, then write a corrected version of the full explanation incorporating your fixes. Annotate each correction with [CORRECTED: reason].
Run get-skill-tmpdir mine-how before Phase 2 to establish <dir>.
After the review completes, read <dir>/review.md:
<dir>/explanation.md to the user[CORRECTED: ...] annotations — the user sees the clean version onlyPresent the explanation as conversational text in the main context. Do not write files, create documents, or produce artifacts.
development
Use when the user says: "document how X works", "write up how this works", "durable explanation", "explain this for the docs", "document this subsystem". Writes a durable, architectural-altitude explanation that survives code churn.
development
Use when picking up a fresh session after /clear, a stop, or an unanswered AskUserQuestion. Reconstructs the prior session's intent from its transcript tail and surfaces any unresolved decision; user-invoked only — for a hand-written end-of-day handoff use /mine-good-morning instead.
development
Use when the user says: "what did we discuss", "continue where we left off", "remember when", "as I mentioned", "you suggested", "we decided", "search my conversations", "find the conversation where", "what did we work on", or uses implicit signals like past-tense references, possessives without context, or assumptive questions. Direct search over past Claude Code sessions via cass.
tools
Use when the user says: "what context do I have", "relevant history for this task", "what have we done related to this". Also usable proactively when starting work that likely has prior history. Assembles a structured context brief from past session history via cass, scoped to the current task and workspace.