[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6NWNCGR7KNRRAW237XJ2MH3":3,"skill-same:01M6NWNCGR7KNRRAW237XJ2MH3":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":14,"repositoryHtmlUrl":58,"repositoryHomepageUrl":6,"ownerHtmlUrl":59,"ownerBlogUrl":60,"ownerDescription":61,"updatedAt":62,"install":63,"resources":76},"01M6NWNCGR7KNRRAW237XJ2MH3","tldr-code",null,"Token-efficient code analysis via 5-layer stack (AST, Call Graph, CFG, DFG, PDG). 95% token savings.","rubicanjr\u002FFinCognis","rubicanjr","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F234912519?v=4","01M6NT156NND8J474G34SB3923","Rubi","01M6NT15B70RWXE1N3YV0BZY8A",0,"MIT","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Ftldr-code\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"tldr","tldr code","code","ast","how complex","what calls","data flow","imports","code analysis","complexity","call graph","search","architecture","analyze","stack","explore","Bash","how","analysis","CFG","2026-11-10 10:12:30",false,"---\nname: tldr-code\ndescription: Token-efficient code analysis via 5-layer stack (AST, Call Graph, CFG, DFG, PDG). 95% token savings.\nallowed-tools: [Bash]\nkeywords: [debug, refactor, understand, complexity, \"call graph\", \"data flow\", \"what calls\", \"how complex\", search, explore, analyze, dead code, architecture, imports]\n---\n\n# TLDR-Code: Complete Reference\n\nToken-efficient code analysis. **95% savings** vs raw file reads.\n\n## Quick Reference\n\n| Task | Command |\n|------|---------|\n| File tree | `tldr tree src\u002F` |\n| Code structure | `tldr structure . --lang python` |\n| Search code | `tldr search \"pattern\" .` |\n| Call graph | `tldr calls src\u002F` |\n| Who calls X? | `tldr impact func_name .` |\n| Control flow | `tldr cfg file.py func` |\n| Data flow | `tldr dfg file.py func` |\n| Program slice | `tldr slice file.py func 42` |\n| Dead code | `tldr dead src\u002F` |\n| Architecture | `tldr arch src\u002F` |\n| Imports | `tldr imports file.py` |\n| Who imports X? | `tldr importers module_name .` |\n| Affected tests | `tldr change-impact --git` |\n| Type check | `tldr diagnostics file.py` |\n| Semantic search | `tldr semantic search \"auth flow\"` |\n\n---\n\n## The 5-Layer Stack\n\n```\nLayer 1: AST         ~500 tokens   Function signatures, imports\nLayer 2: Call Graph  +440 tokens   What calls what (cross-file)\nLayer 3: CFG         +110 tokens   Complexity, branches, loops\nLayer 4: DFG         +130 tokens   Variable definitions\u002Fuses\nLayer 5: PDG         +150 tokens   Dependencies, slicing\n───────────────────────────────────────────────────────────────\nTotal:              ~1,200 tokens  vs 23,000 raw = 95% savings\n```\n\n---\n\n## CLI Commands\n\n### Navigation\n\n```bash\n# File tree\ntldr tree [path]\ntldr tree src\u002F --ext .py .ts        # Filter extensions\ntldr tree . --show-hidden           # Include hidden files\n\n# Code structure (codemaps)\ntldr structure [path] --lang python\ntldr structure src\u002F --max 100       # Max files to analyze\n```\n\n### Search\n\n```bash\n# Text search\ntldr search \u003Cpattern> [path]\ntldr search \"def process\" src\u002F\ntldr search \"class.*Error\" . --ext .py\ntldr search \"TODO\" . -C 3           # 3 lines context\ntldr search \"func\" . --max 50       # Limit results\n\n# Semantic search (natural language)\ntldr semantic search \"authentication flow\"\ntldr semantic search \"error handling\" --k 10\ntldr semantic search \"database queries\" --expand  # Include call graph\n```\n\n### File Analysis\n\n```bash\n# Full file info\ntldr extract \u003Cfile>\ntldr extract src\u002Fapi.py\ntldr extract src\u002Fapi.py --class UserService      # Filter to class\ntldr extract src\u002Fapi.py --function process       # Filter to function\ntldr extract src\u002Fapi.py --method UserService.get # Filter to method\n\n# Relevant context (follows call graph)\ntldr context \u003Centry> --project \u003Cpath>\ntldr context main --project src\u002F --depth 3\ntldr context UserService.create --project . --lang typescript\n```\n\n### Flow Analysis\n\n```bash\n# Control flow graph (complexity)\ntldr cfg \u003Cfile> \u003Cfunction>\ntldr cfg src\u002Fprocessor.py process_data\n# Returns: cyclomatic complexity, blocks, branches, loops\n\n# Data flow graph (variable tracking)\ntldr dfg \u003Cfile> \u003Cfunction>\ntldr dfg src\u002Fprocessor.py process_data\n# Returns: where variables are defined, read, modified\n\n# Program slice (what affects line X)\ntldr slice \u003Cfile> \u003Cfunction> \u003Cline>\ntldr slice src\u002Fprocessor.py process_data 42\ntldr slice src\u002Fprocessor.py process_data 42 --direction forward\ntldr slice src\u002Fprocessor.py process_data 42 --var result\n```\n\n### Codebase Analysis\n\n```bash\n# Build cross-file call graph\ntldr calls [path]\ntldr calls src\u002F --lang python\n\n# Reverse call graph (who calls this function?)\ntldr impact \u003Cfunc> [path]\ntldr impact process_data src\u002F --depth 5\ntldr impact authenticate . --file auth  # Filter by file\n\n# Find dead\u002Funreachable code\ntldr dead [path]\ntldr dead src\u002F --entry main cli test_  # Specify entry points\ntldr dead . --lang typescript\n\n# Detect architectural layers\ntldr arch [path]\ntldr arch src\u002F --lang python\n# Returns: entry layer, middle layer, leaf layer, circular deps\n```\n\n### Import Analysis\n\n```bash\n# Parse imports from file\ntldr imports \u003Cfile>\ntldr imports src\u002Fapi.py\ntldr imports src\u002Fapi.ts --lang typescript\n\n# Reverse import lookup (who imports this module?)\ntldr importers \u003Cmodule> [path]\ntldr importers datetime src\u002F\ntldr importers UserService . --lang typescript\n```\n\n### Quality & Testing\n\n```bash\n# Type check + lint\ntldr diagnostics \u003Cfile|path>\ntldr diagnostics src\u002Fapi.py\ntldr diagnostics . --project              # Whole project\ntldr diagnostics src\u002F --no-lint           # Type check only\ntldr diagnostics src\u002F --format text       # Human-readable\n\n# Find affected tests\ntldr change-impact [files...]\ntldr change-impact                        # Auto-detect (session\u002Fgit)\ntldr change-impact src\u002Fapi.py             # Explicit files\ntldr change-impact --session              # Session-modified files\ntldr change-impact --git                  # Git diff files\ntldr change-impact --git --git-base main  # Diff against branch\ntldr change-impact --run                  # Actually run affected tests\n```\n\n### Caching\n\n```bash\n# Pre-build call graph cache\ntldr warm \u003Cpath>\ntldr warm src\u002F --lang python\ntldr warm . --background                  # Build in background\n\n# Build semantic index (one-time)\ntldr semantic index [path]\ntldr semantic index . --lang python\ntldr semantic index . --model all-MiniLM-L6-v2  # Smaller model (80MB)\n```\n\n---\n\n## Daemon (Faster Queries)\n\nThe daemon holds indexes in memory for instant repeated queries.\n\n### Daemon Commands\n\n```bash\n# Start daemon (backgrounds automatically)\ntldr daemon start\ntldr daemon start --project \u002Fpath\u002Fto\u002Fproject\n\n# Check status\ntldr daemon status\n\n# Stop daemon\ntldr daemon stop\n\n# Send raw command\ntldr daemon query ping\ntldr daemon query status\n\n# Notify file change (for hooks)\ntldr daemon notify \u003Cfile>\ntldr daemon notify src\u002Fapi.py\n```\n\n### Daemon Features\n\n| Feature | Description |\n|---------|-------------|\n| Auto-shutdown | 30 minutes idle |\n| Query caching | SalsaDB memoization |\n| Content hashing | Skip unchanged files |\n| Dirty tracking | Incremental re-indexing |\n| Cross-platform | Unix sockets \u002F Windows TCP |\n\n### Daemon Socket Protocol\n\nSend JSON to socket, receive JSON response:\n\n```json\n\u002F\u002F Request\n{\"cmd\": \"search\", \"pattern\": \"process\", \"max_results\": 10}\n\n\u002F\u002F Response\n{\"status\": \"ok\", \"results\": [...]}\n```\n\n**All 22 daemon commands:**\n```\nping, status, shutdown, search, extract, impact, dead, arch,\ncfg, dfg, slice, calls, warm, semantic, tree, structure,\ncontext, imports, importers, notify, diagnostics, change_impact\n```\n\n---\n\n## Semantic Search (P6)\n\nNatural language code search using embeddings.\n\n### Setup\n\n```bash\n# Build index (downloads model on first run)\ntldr semantic index .\n\n# Default model: bge-large-en-v1.5 (1.3GB, best quality)\n# Smaller model: all-MiniLM-L6-v2 (80MB, faster)\ntldr semantic index . --model all-MiniLM-L6-v2\n```\n\n### Search\n\n```bash\ntldr semantic search \"authentication flow\"\ntldr semantic search \"error handling patterns\" --k 10\ntldr semantic search \"database connection\" --expand  # Follow call graph\n```\n\n### Configuration\n\nIn `.claude\u002Fsettings.json`:\n```json\n{\n  \"semantic_search\": {\n    \"enabled\": true,\n    \"auto_reindex_threshold\": 20,\n    \"model\": \"bge-large-en-v1.5\"\n  }\n}\n```\n\n---\n\n## Languages Supported\n\n| Language | AST | Call Graph | CFG | DFG | PDG |\n|----------|-----|------------|-----|-----|-----|\n| Python | Yes | Yes | Yes | Yes | Yes |\n| TypeScript | Yes | Yes | Yes | Yes | Yes |\n| JavaScript | Yes | Yes | Yes | Yes | Yes |\n| Go | Yes | Yes | Yes | Yes | Yes |\n| Rust | Yes | Yes | Yes | Yes | Yes |\n| Java | Yes | Yes | - | - | - |\n| C\u002FC++ | Yes | Yes | - | - | - |\n| Ruby | Yes | - | - | - | - |\n| PHP | Yes | - | - | - | - |\n| Kotlin | Yes | - | - | - | - |\n| Swift | Yes | - | - | - | - |\n| C# | Yes | - | - | - | - |\n| Scala | Yes | - | - | - | - |\n| Lua | Yes | - | - | - | - |\n| Elixir | Yes | - | - | - | - |\n\n---\n\n## Ignore Patterns\n\nTLDR respects `.tldrignore` (gitignore syntax):\n\n```gitignore\n# .tldrignore\n.venv\u002F\n__pycache__\u002F\nnode_modules\u002F\n*.min.js\ndist\u002F\n```\n\nFirst run creates `.tldrignore` with sensible defaults.\nUse `--no-ignore` to bypass.\n\n---\n\n## When to Use TLDR vs Other Tools\n\n| Task | Use TLDR | Use Grep |\n|------|----------|----------|\n| Find function definition | `tldr extract file --function X` | - |\n| Search code patterns | `tldr search \"pattern\"` | - |\n| String literal search | - | `grep \"literal\"` |\n| Config values | - | `grep \"KEY=\"` |\n| Cross-file calls | `tldr calls` | - |\n| Reverse deps | `tldr impact func` | - |\n| Complexity analysis | `tldr cfg file func` | - |\n| Variable tracking | `tldr dfg file func` | - |\n| Natural language query | `tldr semantic search` | - |\n\n---\n\n## Python API\n\n```python\nfrom tldr.api import (\n    # L1: AST\n    extract_file, extract_functions, get_imports,\n    # L2: Call Graph\n    build_project_call_graph, get_intra_file_calls,\n    # L3: CFG\n    get_cfg_context,\n    # L4: DFG\n    get_dfg_context,\n    # L5: PDG\n    get_slice, get_pdg_context,\n    # Unified\n    get_relevant_context,\n    # Analysis\n    analyze_dead_code, analyze_architecture, analyze_impact,\n)\n\n# Example: Get context for LLM\nctx = get_relevant_context(\"src\u002F\", \"main\", depth=2, language=\"python\")\nprint(ctx.to_llm_string())\n```\n\n---\n\n## Bug Fixing Workflow (Navigation + Read)\n\n**Key insight:** TLDR navigates, then you read. Don't try to fix bugs from summaries alone.\n\n### The Pattern\n\n```bash\n# 1. NAVIGATE: Find which files matter\ntldr imports file.py              # What does buggy file depend on?\ntldr impact func_name .           # Who calls the buggy function?\ntldr calls .                      # Cross-file edges (follow 2-hop for models)\n\n# 2. READ: Get actual code for critical files (2-4 files, not all 50)\n# Use Read tool or tldr search -C for code with context\ntldr search \"def buggy_func\" . -C 20\n```\n\n### Why This Works\n\nFor cross-file bugs (e.g., wrong field name, type mismatch), you need to see:\n- The file with the bug (handler accessing `task.user_id`)\n- The file with the contract (model defining `owner_id`)\n\nTLDR finds which files matter. Then you read them.\n\n### Getting More Context\n\nIf TLDR output isn't enough:\n- `tldr search \"pattern\" . -C 20` - Get actual code with 20 lines context\n- `tldr imports file.py` - See what a file depends on\n- Read the file directly if you need the full implementation\n\n---\n\n## Token Savings Evidence\n\n```\nRaw file read:    23,314 tokens\nTLDR all layers:   1,189 tokens\n─────────────────────────────────\nSavings:              95%\n```\n\nThe insight: Call graph navigates to relevant code, then layers give structured summaries. You don't read irrelevant code.\n","# TLDR-Code: Complete Reference\n\nToken-efficient code analysis. **95% savings** vs raw file reads.\n\n## Quick Reference\n\n| Task | Command |\n|------|---------|\n| File tree | `tldr tree src\u002F` |\n| Code structure | `tldr structure . --lang python` |\n| Search code | `tldr search \"pattern\" .` |\n| Call graph | `tldr calls src\u002F` |\n| Who calls X? | `tldr impact func_name .` |\n| Control flow | `tldr cfg file.py func` |\n| Data flow | `tldr dfg file.py func` |\n| Program slice | `tldr slice file.py func 42` |\n| Dead code | `tldr dead src\u002F` |\n| Architecture | `tldr arch src\u002F` |\n| Imports | `tldr imports file.py` |\n| Who imports X? | `tldr importers module_name .` |\n| Affected tests | `tldr change-impact --git` |\n| Type check | `tldr diagnostics file.py` |\n| Semantic search | `tldr semantic search \"auth flow\"` |\n\n---\n\n## The 5-Layer Stack\n\n```\nLayer 1: AST         ~500 tokens   Function signatures, imports\nLayer 2: Call Graph  +440 tokens   What calls what (cross-file)\nLayer 3: CFG         +110 tokens   Complexity, branches, loops\nLayer 4: DFG         +130 tokens   Variable definitions\u002Fuses\nLayer 5: PDG         +150 tokens   Dependencies, slicing\n───────────────────────────────────────────────────────────────\nTotal:              ~1,200 tokens  vs 23,000 raw = 95% savings\n```\n\n---\n\n## CLI Commands\n\n### Navigation\n\n```bash\n# File tree\ntldr tree [path]\ntldr tree src\u002F --ext .py .ts        # Filter extensions\ntldr tree . --show-hidden           # Include hidden files\n\n# Code structure (codemaps)\ntldr structure [path] --lang python\ntldr structure src\u002F --max 100       # Max files to analyze\n```\n\n### Search\n\n```bash\n# Text search\ntldr search \u003Cpattern> [path]\ntldr search \"def process\" src\u002F\ntldr search \"class.*Error\" . --ext .py\ntldr search \"TODO\" . -C 3           # 3 lines context\ntldr search \"func\" . --max 50       # Limit results\n\n# Semantic search (natural language)\ntldr semantic search \"authentication flow\"\ntldr semantic search \"error handling\" --k 10\ntldr semantic search \"database queries\" --expand  # Include call graph\n```\n\n### File Analysis\n\n```bash\n# Full file info\ntldr extract \u003Cfile>\ntldr extract src\u002Fapi.py\ntldr extract src\u002Fapi.py --class UserService      # Filter to class\ntldr extract src\u002Fapi.py --function process       # Filter to function\ntldr extract src\u002Fapi.py --method UserService.get # Filter to method\n\n# Relevant context (follows call graph)\ntldr context \u003Centry> --project \u003Cpath>\ntldr context main --project src\u002F --depth 3\ntldr context UserService.create --project . --lang typescript\n```\n\n### Flow Analysis\n\n```bash\n# Control flow graph (complexity)\ntldr cfg \u003Cfile> \u003Cfunction>\ntldr cfg src\u002Fprocessor.py process_data\n# Returns: cyclomatic complexity, blocks, branches, loops\n\n# Data flow graph (variable tracking)\ntldr dfg \u003Cfile> \u003Cfunction>\ntldr dfg src\u002Fprocessor.py process_data\n# Returns: where variables are defined, read, modified\n\n# Program slice (what affects line X)\ntldr slice \u003Cfile> \u003Cfunction> \u003Cline>\ntldr slice src\u002Fprocessor.py process_data 42\ntldr slice src\u002Fprocessor.py process_data 42 --direction forward\ntldr slice src\u002Fprocessor.py process_data 42 --var result\n```\n\n### Codebase Analysis\n\n```bash\n# Build cross-file call graph\ntldr calls [path]\ntldr calls src\u002F --lang python\n\n# Reverse call graph (who calls this function?)\ntldr impact \u003Cfunc> [path]\ntldr impact process_data src\u002F --depth 5\ntldr impact authenticate . --file auth  # Filter by file\n\n# Find dead\u002Funreachable code\ntldr dead [path]\ntldr dead src\u002F --entry main cli test_  # Specify entry points\ntldr dead . --lang typescript\n\n# Detect architectural layers\ntldr arch [path]\ntldr arch src\u002F --lang python\n# Returns: entry layer, middle layer, leaf layer, circular deps\n```\n\n### Import Analysis\n\n```bash\n# Parse imports from file\ntldr imports \u003Cfile>\ntldr imports src\u002Fapi.py\ntldr imports src\u002Fapi.ts --lang typescript\n\n# Reverse import lookup (who imports this module?)\ntldr importers \u003Cmodule> [path]\ntldr importers datetime src\u002F\ntldr importers UserService . --lang typescript\n```\n\n### Quality & Testing\n\n```bash\n# Type check + lint\ntldr diagnostics \u003Cfile|path>\ntldr diagnostics src\u002Fapi.py\ntldr diagnostics . --project              # Whole project\ntldr diagnostics src\u002F --no-lint           # Type check only\ntldr diagnostics src\u002F --format text       # Human-readable\n\n# Find affected tests\ntldr change-impact [files...]\ntldr change-impact                        # Auto-detect (session\u002Fgit)\ntldr change-impact src\u002Fapi.py             # Explicit files\ntldr change-impact --session              # Session-modified files\ntldr change-impact --git                  # Git diff files\ntldr change-impact --git --git-base main  # Diff against branch\ntldr change-impact --run                  # Actually run affected tests\n```\n\n### Caching\n\n```bash\n# Pre-build call graph cache\ntldr warm \u003Cpath>\ntldr warm src\u002F --lang python\ntldr warm . --background                  # Build in background\n\n# Build semantic index (one-time)\ntldr semantic index [path]\ntldr semantic index . --lang python\ntldr semantic index . --model all-MiniLM-L6-v2  # Smaller model (80MB)\n```\n\n---\n\n## Daemon (Faster Queries)\n\nThe daemon holds indexes in memory for instant repeated queries.\n\n### Daemon Commands\n\n```bash\n# Start daemon (backgrounds automatically)\ntldr daemon start\ntldr daemon start --project \u002Fpath\u002Fto\u002Fproject\n\n# Check status\ntldr daemon status\n\n# Stop daemon\ntldr daemon stop\n\n# Send raw command\ntldr daemon query ping\ntldr daemon query status\n\n# Notify file change (for hooks)\ntldr daemon notify \u003Cfile>\ntldr daemon notify src\u002Fapi.py\n```\n\n### Daemon Features\n\n| Feature | Description |\n|---------|-------------|\n| Auto-shutdown | 30 minutes idle |\n| Query caching | SalsaDB memoization |\n| Content hashing | Skip unchanged files |\n| Dirty tracking | Incremental re-indexing |\n| Cross-platform | Unix sockets \u002F Windows TCP |\n\n### Daemon Socket Protocol\n\nSend JSON to socket, receive JSON response:\n\n```json\n\u002F\u002F Request\n{\"cmd\": \"search\", \"pattern\": \"process\", \"max_results\": 10}\n\n\u002F\u002F Response\n{\"status\": \"ok\", \"results\": [...]}\n```\n\n**All 22 daemon commands:**\n```\nping, status, shutdown, search, extract, impact, dead, arch,\ncfg, dfg, slice, calls, warm, semantic, tree, structure,\ncontext, imports, importers, notify, diagnostics, change_impact\n```\n\n---\n\n## Semantic Search (P6)\n\nNatural language code search using embeddings.\n\n### Setup\n\n```bash\n# Build index (downloads model on first run)\ntldr semantic index .\n\n# Default model: bge-large-en-v1.5 (1.3GB, best quality)\n# Smaller model: all-MiniLM-L6-v2 (80MB, faster)\ntldr semantic index . --model all-MiniLM-L6-v2\n```\n\n### Search\n\n```bash\ntldr semantic search \"authentication flow\"\ntldr semantic search \"error handling patterns\" --k 10\ntldr semantic search \"database connection\" --expand  # Follow call graph\n```\n\n### Configuration\n\nIn `.claude\u002Fsettings.json`:\n```json\n{\n  \"semantic_search\": {\n    \"enabled\": true,\n    \"auto_reindex_threshold\": 20,\n    \"model\": \"bge-large-en-v1.5\"\n  }\n}\n```\n\n---\n\n## Languages Supported\n\n| Language | AST | Call Graph | CFG | DFG | PDG |\n|----------|-----|------------|-----|-----|-----|\n| Python | Yes | Yes | Yes | Yes | Yes |\n| TypeScript | Yes | Yes | Yes | Yes | Yes |\n| JavaScript | Yes | Yes | Yes | Yes | Yes |\n| Go | Yes | Yes | Yes | Yes | Yes |\n| Rust | Yes | Yes | Yes | Yes | Yes |\n| Java | Yes | Yes | - | - | - |\n| C\u002FC++ | Yes | Yes | - | - | - |\n| Ruby | Yes | - | - | - | - |\n| PHP | Yes | - | - | - | - |\n| Kotlin | Yes | - | - | - | - |\n| Swift | Yes | - | - | - | - |\n| C# | Yes | - | - | - | - |\n| Scala | Yes | - | - | - | - |\n| Lua | Yes | - | - | - | - |\n| Elixir | Yes | - | - | - | - |\n\n---\n\n## Ignore Patterns\n\nTLDR respects `.tldrignore` (gitignore syntax):\n\n```gitignore\n# .tldrignore\n.venv\u002F\n__pycache__\u002F\nnode_modules\u002F\n*.min.js\ndist\u002F\n```\n\nFirst run creates `.tldrignore` with sensible defaults.\nUse `--no-ignore` to bypass.\n\n---\n\n## When to Use TLDR vs Other Tools\n\n| Task | Use TLDR | Use Grep |\n|------|----------|----------|\n| Find function definition | `tldr extract file --function X` | - |\n| Search code patterns | `tldr search \"pattern\"` | - |\n| String literal search | - | `grep \"literal\"` |\n| Config values | - | `grep \"KEY=\"` |\n| Cross-file calls | `tldr calls` | - |\n| Reverse deps | `tldr impact func` | - |\n| Complexity analysis | `tldr cfg file func` | - |\n| Variable tracking | `tldr dfg file func` | - |\n| Natural language query | `tldr semantic search` | - |\n\n---\n\n## Python API\n\n```python\nfrom tldr.api import (\n    # L1: AST\n    extract_file, extract_functions, get_imports,\n    # L2: Call Graph\n    build_project_call_graph, get_intra_file_calls,\n    # L3: CFG\n    get_cfg_context,\n    # L4: DFG\n    get_dfg_context,\n    # L5: PDG\n    get_slice, get_pdg_context,\n    # Unified\n    get_relevant_context,\n    # Analysis\n    analyze_dead_code, analyze_architecture, analyze_impact,\n)\n\n# Example: Get context for LLM\nctx = get_relevant_context(\"src\u002F\", \"main\", depth=2, language=\"python\")\nprint(ctx.to_llm_string())\n```\n\n---\n\n## Bug Fixing Workflow (Navigation + Read)\n\n**Key insight:** TLDR navigates, then you read. Don't try to fix bugs from summaries alone.\n\n### The Pattern\n\n```bash\n# 1. NAVIGATE: Find which files matter\ntldr imports file.py              # What does buggy file depend on?\ntldr impact func_name .           # Who calls the buggy function?\ntldr calls .                      # Cross-file edges (follow 2-hop for models)\n\n# 2. READ: Get actual code for critical files (2-4 files, not all 50)\n# Use Read tool or tldr search -C for code with context\ntldr search \"def buggy_func\" . -C 20\n```\n\n### Why This Works\n\nFor cross-file bugs (e.g., wrong field name, type mismatch), you need to see:\n- The file with the bug (handler accessing `task.user_id`)\n- The file with the contract (model defining `owner_id`)\n\nTLDR finds which files matter. Then you read them.\n\n### Getting More Context\n\nIf TLDR output isn't enough:\n- `tldr search \"pattern\" . -C 20` - Get actual code with 20 lines context\n- `tldr imports file.py` - See what a file depends on\n- Read the file directly if you need the full implementation\n\n---\n\n## Token Savings Evidence\n\n```\nRaw file read:    23,314 tokens\nTLDR all layers:   1,189 tokens\n─────────────────────────────────\nSavings:              95%\n```\n\nThe insight: Call graph navigates to relevant code, then layers give structured summaries. You don't read irrelevant code.\n",{"name":5,"keywords":49,"description":7,"allowed-tools":54},[50,51,52,33,34,30,29,28,35,39,37,53,36,31],"debug","refactor","understand","dead code",[40],"main","70e1c350500ee750987420bbae48837afa906b7e","skills\u002Ftldr-code","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis","https:\u002F\u002Fgithub.com\u002Frubicanjr","linktr.ee\u002Ffinanskodu","Industrial Engineer & CIO @FinansKodu. Architecting AI-driven financial agents and autonomous workflows. 🏗️ Building systems, not just prompts.","2026-06-09 13:50:15",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add rubicanjr\u002FFinCognis --skill tldr-code",{"tool":69,"command":70},"bunx","bunx skills add rubicanjr\u002FFinCognis --skill tldr-code",{"tool":72,"command":73},"pnpm","pnpm dlx skills add rubicanjr\u002FFinCognis --skill tldr-code","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Ftldr-code\u002FSKILL.md",true,[77],{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"rules.md","REFERENCE","参考文档",1098,"https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Ftldr-code\u002Frules.md",[84,105,114,134,164,183],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":95,"publishedAt":44},"01M6NWS9DAXJTADT4T5MB49X8W","workflow-router","Goal-based workflow orchestration - routes tasks to specialist agents based on user goals","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-router\u002FSKILL.md",[90],{"categoryNo":91,"categoryName":92,"taxonomyType":93,"taxonomyTypeDesc":94},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[96,97,98,99,100,101,102,103,104],"workflow router","workflow","router","orchestration","goals","goal","user","workflow orchestration","tasks",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":44},"01M6NWS3RETSC0SHP16HP66E14","wiring","Wiring Verification","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fwiring\u002FSKILL.md",[],[107,112,113],"verification","false",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":123,"publishedAt":44},"01M6NWS0XW9CVQZBDA1EGW0TWC","websocket-patterns","Connection management, room patterns, reconnection strategies, message buffering, and binary protocol design.","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fwebsocket-patterns\u002Fskill.md",[120],{"categoryNo":121,"categoryName":122,"taxonomyType":93,"taxonomyTypeDesc":94},"01JBSEEDCAT000000000000015","视觉设计",[124,125,126,127,128,129,130,131,132,133],"websocket","patterns","websocket patterns","design","protocol","management","message","strategies","binary","connection",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":144,"publishedAt":44},"01M6NWRDQDX9ZNETAWRRMQWV52","visual-verdict","Screenshot comparison QA for frontend development. Takes a screenshot of the current implementation, scores it across multiple visual dimensions, and returns a structured PASS\u002FREVISE\u002FFAIL verdict with concrete fixes. Use when implementing UI from a design reference or verifying visual correctness.","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fvisual-verdict\u002FSKILL.md",[140,143],{"categoryNo":141,"categoryName":142,"taxonomyType":93,"taxonomyTypeDesc":94},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":91,"categoryName":92,"taxonomyType":93,"taxonomyTypeDesc":94},[145,146,147,148,149,150,151,152,153,154,155,156,157,127,158,159,160,161,162,163],"visual","verdict","visual verdict","ui","across","revise","comparison","correctness","implementing","for","fixes","dimensions","frontend","development","qa","screenshot","returns","use","frontend development",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":44},"01M6NWR8HSNRS7MNDK2J02QYMN","verification-loop","Comprehensive verification system covering build, types, lint, tests, security, and diff review before a PR.","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fverification-loop\u002FSKILL.md",[],[171,172,112,173,174,175,176,177,178,179,180,181,182],"verification loop","loop","lint","review","security","pr","system","diff","build","tests","diff review","types",{"skillNo":184,"name":185,"nameZh":6,"description":186,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":189,"publishedAt":44},"01M6NWR4HHSFR0VR5EXFRWA747","vector-db-patterns","Embedding strategies, ANN algorithms, hybrid search, RAG chunking strategies, and reranking for semantic search and retrieval.","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fvector-db-patterns\u002Fskill.md",[],[190,191,192,193,125,194,35,195,196,131,197,198,199,200,201,154,202,203],"vector db patterns","vector db","db","vector","semantic search","embedding strategies","algorithms","chunking","semantic","retrieval","embedding","Hybrid Search","hybrid","rag"]