tldr-router
npx machina-cli add skill parcadei/Continuous-Claude-v3/tldr-router --openclawTLDR Smart Router
Maps questions to the optimal tldr command. Use this to pick the right layer.
Question → Command Mapping
"What files/functions exist?"
tldr tree . --ext .py # File overview
tldr structure src/ --lang python # Function/class overview
Use: Starting exploration, orientation
"What does X call / who calls X?"
tldr context <function> --project . --depth 2
tldr calls src/
Use: Understanding architecture, finding entry points
"How complex is X?"
tldr cfg <file> <function>
Use: Identifying refactoring candidates, understanding difficulty
"Where does variable Y come from?"
tldr dfg <file> <function>
Use: Debugging, understanding data flow
"What affects line Z?"
tldr slice <file> <function> <line>
Use: Impact analysis, safe refactoring
"Search for pattern P"
tldr search "pattern" src/
Use: Finding code, structural search
Decision Tree
START
│
├─► "What exists?" ──► tree / structure
│
├─► "How does X connect?" ──► context / calls
│
├─► "Why is X complex?" ──► cfg
│
├─► "Where does Y flow?" ──► dfg
│
├─► "What depends on Z?" ──► slice
│
└─► "Find something" ──► search
Intent Detection Keywords
| Intent | Keywords | Layer |
|---|---|---|
| Navigation | "what", "where", "find", "exists" | tree, structure, search |
| Architecture | "calls", "uses", "connects", "depends" | context, calls |
| Complexity | "complex", "refactor", "branches", "paths" | cfg |
| Data Flow | "variable", "value", "assigned", "comes from" | dfg |
| Impact | "affects", "changes", "slice", "dependencies" | slice/pdg |
| Debug | "bug", "error", "investigate", "broken" | cfg + dfg + context |
Automatic Hook Integration
The tldr-read-enforcer and tldr-context-inject hooks automatically:
- Detect intent from your messages
- Route to appropriate layers
- Inject context into tool calls
You don't need to manually run these commands - the hooks do it for you.
Manual Override
If you need a specific layer the hooks didn't provide:
# Force specific analysis
tldr cfg path/to/file.py function_name
tldr dfg path/to/file.py function_name
tldr slice path/to/file.py function_name 42
Source
git clone https://github.com/parcadei/Continuous-Claude-v3/blob/main/.claude/skills/tldr-router/SKILL.mdView on GitHub Overview
tldr-router analyzes your natural-language questions and directs them to the most suitable tldr command (tree, structure, context, calls, cfg, dfg, slice, search). This standardizes codebase exploration and speeds up obtaining targeted insights. It relies on a decision tree, intent keywords, and automatic hooks to route and contextualize tool calls.
How This Skill Works
The router uses Intent Detection Keywords and a Decision Tree to map questions to the appropriate tldr layer (e.g., 'What exists?' maps to tree/structure; 'How complex?' maps to cfg; 'Where does variable come from?' maps to dfg). Automated hooks detect intent, route to the selected command, and inject necessary context; manual override is available for forcing a specific layer.
When to Use It
- What files or functions exist in the project?
- How does X connect or calls other components?
- How complex is X or where might refactors help?
- Where does a variable or value come from within a function?
- Find occurrences of a code pattern across the codebase.
Quick Start
- Step 1: Ask a question like 'What files exist?'
- Step 2: The router analyzes intent and selects the appropriate tldr command (e.g., tree or structure).
- Step 3: The mapped tldr command runs (via hooks) and returns results.
Best Practices
- Frame questions to target a specific intent (existence, architecture, complexity, data flow, or impact).
- Use the decision tree to pick the right layer before running commands.
- Rely on automatic hooks for routing; use manual override only when necessary.
- Provide precise inputs for slice/dfg (file, function, line) to improve accuracy.
- For large codebases, start with 'What exists?' and then use 'Search' for patterns to quickly locate areas of interest.
Example Use Cases
- tldr tree . --ext .py
- tldr structure src/ --lang python
- tldr context <function> --project . --depth 2
- tldr calls src/
- tldr dfg <file> <function>