Tldr Router

作者 parcadeid07ff4b06b62无许可证3.9K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库8个月前更新

Maps questions to the optimal tldr command. Use this to pick the right layer

AI 生成的概览

将代码问题映射到合适的 tldr 分析命令,如 tree、context、cfg、dfg 或 slice。

功能
该技能是一份路由指南,把开发者关于代码库的问题对应到合适的 tldr 命令。它提供问题到命令的映射、决策树以及意图关键词表,覆盖导航、架构、复杂度、数据流、影响分析和调试。它还说明 tldr-read-enforcer 与 tldr-context-inject 钩子可自动识别意图并路由,并列出手动覆盖命令。
适用场景
当你需要为关于陌生代码库的问题选择正确的 tldr 分析层时使用。适用于初步了解代码、调用关系探索、复杂度检查、数据流追踪、影响分析和调试排查。
运行要求
需要安装并可使用 tldr 命令行工具;该技能本身不附带脚本,仅提供说明。文中提到的 tldr-read-enforcer 与 tldr-context-inject 钩子为可选的自动路由方式。

TLDR Smart Router

Maps questions to the optimal tldr command. Use this to pick the right layer.

Question → Command Mapping

"What files/functions exist?"

bash
tldr tree . --ext .py          # File overviewtldr structure src/ --lang python  # Function/class overview

Use: Starting exploration, orientation

"What does X call / who calls X?"

bash
tldr context <function> --project . --depth 2tldr calls src/

Use: Understanding architecture, finding entry points

"How complex is X?"

bash
tldr cfg <file> <function>

Use: Identifying refactoring candidates, understanding difficulty

"Where does variable Y come from?"

bash
tldr dfg <file> <function>

Use: Debugging, understanding data flow

"What affects line Z?"

bash
tldr slice <file> <function> <line>

Use: Impact analysis, safe refactoring

"Search for pattern P"

bash
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

IntentKeywordsLayer
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:

  1. Detect intent from your messages
  2. Route to appropriate layers
  3. 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:

bash
# Force specific analysistldr cfg path/to/file.py function_nametldr dfg path/to/file.py function_nametldr slice path/to/file.py function_name 42

来源与署名

来源:parcadei/continuous-claude-v3位于.claude/skills/tldr-router提交d07ff4b

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架