Loading...
Loading...
Meta-skill for internal codebase exploration at varying depths (quick/deep/architecture)
npx skill4agent add parcadei/continuous-claude-v3 explore/explore <depth> [options]/explorequestion: "How would you like to explore?"
header: "Explore"
options:
- label: "Help me choose (Recommended)"
description: "I'll ask questions to pick the right exploration depth"
- label: "Quick - fast overview"
description: "Chain: tldr tree → tldr structure (~1 min)"
- label: "Deep - comprehensive analysis"
description: "Chain: onboard → tldr → research → document (~5 min)"
- label: "Architecture - layers & dependencies"
description: "Chain: tldr arch → call graph → layer mapping (~3 min)"question: "I want to understand how deep you want to explore. Did you mean..."
header: "Clarify"
options:
- label: "Help me choose"
description: "Not sure - guide me through questions"
- label: "Quick - fast overview"
description: "Just want to see what's here"
- label: "Deep - comprehensive analysis"
description: "Need thorough understanding"
- label: "Neither - let me explain differently"
description: "I'll describe what I need"question: "What are you trying to understand?"
header: "Goal"
options:
- label: "Get oriented in the codebase"
description: "Quick overview of structure"
- label: "Understand how something works"
description: "Deep dive into specific area"
- label: "Map the architecture"
description: "Layers, dependencies, patterns"
- label: "Find where something is"
description: "Locate specific code/functionality"question: "What area should I focus on?"
header: "Focus"
options:
- label: "Entire codebase"
description: "Explore everything"
- label: "Specific directory or module"
description: "I'll specify the path"
- label: "Specific concept/feature"
description: "e.g., 'authentication', 'API routes'"question: "What should I produce?"
header: "Output"
options:
- label: "Just tell me what you find"
description: "Interactive summary in chat"
- label: "Create a documentation file"
description: "Write to thoughts/shared/docs/"
- label: "Create handoff for implementation"
description: "Prepare context for coding agent"question: "Where should I start the analysis?"
header: "Entry point"
options:
- label: "Auto-detect (main, cli, app)"
description: "Find common entry points"
- label: "Specific function/file"
description: "I'll specify the entry point"Based on your answers, I'll run:
**Depth:** deep
**Focus:** "authentication"
**Output:** handoff
**Path:** src/
Proceed? [Yes / Adjust settings]| Depth | Time | What it does |
|---|---|---|
| ~1 min | tldr-explorer only - fast structure overview |
| ~5 min | onboard + tldr-explorer + research-codebase + write doc |
| ~3 min | tldr arch + call graph + layer mapping + circular dep detection |
| Option | Description | Example |
|---|---|---|
| Focus on specific area | |
| Create handoff for next agent | |
| Create documentation file | |
| Start from specific entry point | |
# Quick structure overview
/explore quick
# Deep exploration focused on auth
/explore deep --focus "auth" --output doc
# Architecture analysis from specific entry
/explore architecture --entry "cli" --output handoff
# Quick focused exploration
/explore quick --focus "hooks"tldr treetldr structure--focustldr search# 1. File tree
tldr tree ${PATH:-src/} --ext .py
# 2. Code structure
tldr structure ${PATH:-src/} --lang python
# 3. Focused search (if --focus provided)
tldr search "${FOCUS}" ${PATH:-src/}.claude/cache/tldr/# 1. Onboard check
if [ ! -f .claude/cache/tldr/arch.json ]; then
# Spawn onboard agent
fi
# 2. Structure analysis
tldr structure src/ --lang python
tldr calls src/
# 3. Research patterns (via scout agent)
Task: research-codebase → "Document existing patterns in ${FOCUS:-codebase}"
# 4. Write output
→ thoughts/shared/research/YYYY-MM-DD-explore-{focus}.md
→ OR thoughts/shared/handoffs/{session}/explore-{focus}.yamltldr archtldr calls# 1. Architecture detection
tldr arch ${PATH:-src/}
# Returns: entry_layer, middle_layer, leaf_layer, circular_deps
# 2. Call graph
tldr calls ${PATH:-src/}
# Returns: edges, nodes
# 3. Impact analysis from entry point (if --entry provided)
tldr impact ${ENTRY} ${PATH:-src/} --depth 3layers:
entry: [routes.py, cli.py, main.py] # Controllers/handlers
middle: [services.py, auth.py] # Business logic
leaf: [utils.py, helpers.py] # Utilities
call_graph:
total_edges: 142
hot_paths: [process_request → validate → authorize]
circular_deps:
- [module_a, module_b] # A imports B, B imports A
boundaries:
- name: API layer
files: [src/api/*]
calls_to: [src/services/*]thoughts/shared/research/YYYY-MM-DD-explore-{focus}.md---
date: {ISO timestamp}
type: exploration
depth: {quick|deep|architecture}
focus: {focus area or "full"}
commit: {git hash}
---
# Codebase Exploration: {focus}
## Summary
{High-level findings}
## Structure
{File tree / codemaps}
## Architecture
{Layer analysis - for architecture depth}
## Key Components
{Important files and their roles}
## Patterns Found
{Existing patterns - for deep depth}
## References
- `path/to/file.py:line` - Descriptionthoughts/shared/handoffs/{session}/explore-{focus}.yaml---
type: exploration
ts: {ISO timestamp}
depth: {quick|deep|architecture}
focus: {focus area}
commit: {git hash}
---
summary: {One-line summary of findings}
structure:
entry_points: [{main.py}, {cli.py}]
key_modules: [{auth.py}, {routes.py}]
test_coverage: [{tests/}]
architecture:
layers:
entry: [{files}]
middle: [{files}]
leaf: [{files}]
circular_deps: [{pairs}]
findings:
- {key finding with file:line}
next_steps:
- {Recommended action based on exploration}
refs:
- path: {file.py}
role: {what it does}/build brownfield# Step 1: Explore to understand
/explore architecture --output handoff
# Step 2: Build with context from exploration
/build brownfield --from-handoff thoughts/shared/handoffs/session/explore-full.yaml/explore <depth> [options]depth = args[0] # quick | deep | architecture
focus = extract_option(args, "--focus")
output = extract_option(args, "--output") # handoff | doc
entry = extract_option(args, "--entry")# Just tldr commands, no agents
tldr tree ${src_dir} --ext .py
tldr structure ${src_dir} --lang python
if [ -n "$focus" ]; then
tldr search "$focus" ${src_dir}
fi# 1. Check/run onboard
if [ ! -f .claude/cache/tldr/meta.json ]; then
# Spawn onboard agent via Task tool
fi
# 2. Structure
tldr structure src/ --lang python
# 3. Research (spawn scout agent)
# Task tool with subagent_type: "scout"
# Prompt: "Research patterns in ${focus:-codebase}"
# 4. Write output
# → doc or handoff based on --output# 1. Arch detection
arch_output=$(tldr arch ${src_dir})
# 2. Call graph
calls_output=$(tldr calls ${src_dir})
# 3. Impact from entry (if provided)
if [ -n "$entry" ]; then
impact_output=$(tldr impact $entry ${src_dir} --depth 3)
fi
# 4. Synthesize and write outputthoughts/shared/research/| Skill | When to Use |
|---|---|
| tldr-explorer | Direct tldr commands (used internally by explore) |
| tldr-code | Specific analysis commands (cfg, dfg, slice) |
| onboard | First-time project setup (used by deep depth) |
| research-codebase | Pattern documentation (used by deep depth) |
| create_handoff | Handoff format (used by --output handoff) |
# Check if installed
which tldr
# Install if missing
uv tool install llm-tldr
# or: pip install llm-tldr# Check language, adjust --lang
tldr structure src/ --lang typescript # or go, rust# May need to specify src directory
tldr arch ./ # Current directory
tldr arch src/ # Explicit src