Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

tldr-code总帐代码

Agent Skill

tldr-code 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

7,442

周安装

304

GitHub Stars

3,711

下载量

2,408
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:tldr-code(总帐代码)
来源仓库:https://github.com/parcadei/continuous-claude-v3
仓库路径:skills/tldr-code
安装命令:
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill tldr-code
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill tldr-code

简介

tldr-code 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 适用于研究检索类任务,可结合来源仓库和原始 README 核验具体用法。
  • 通过 npx skills add 命令从 GitHub 安装,支持主流 AI 宿主环境。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • tldr-code 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

TLDR-Code: Complete Reference

Token-efficient code analysis. 95% savings vs raw file reads.

Quick Reference

TaskCommand
File treetldr tree src/
Code structuretldr structure. --lang python
Search codetldr search "pattern".
Call graphtldr calls src/
Who calls X?tldr impact func_name.
Control flowtldr cfg file.py func
Data flowtldr dfg file.py func
Program slicetldr slice file.py func 42
Dead codetldr dead src/
Architecturetldr arch src/
Importstldr imports file.py
Who imports X?tldr importers module_name.
Affected teststldr change-impact --git
Type checktldr diagnostics file.py
Semantic searchtldr semantic search "auth flow"

The 5-Layer Stack

Layer 1: AST         ~500 tokens   Function signatures, imports
Layer 2: Call Graph  +440 tokens   What calls what (cross-file)
Layer 3: CFG         +110 tokens   Complexity, branches, loops
Layer 4: DFG         +130 tokens   Variable definitions/uses
Layer 5: PDG         +150 tokens   Dependencies, slicing
───────────────────────────────────────────────────────────────
Total:              ~1,200 tokens  vs 23,000 raw = 95% savings

CLI Commands

Navigation

# File tree
tldr tree [path]
tldr tree src/ --ext .py .ts        # Filter extensions
tldr tree . --show-hidden           # Include hidden files

# Code structure (codemaps)
tldr structure [path] --lang python
tldr structure src/ --max 100       # Max files to analyze

Search

# Text search
tldr search <pattern> [path]
tldr search "def process" src/
tldr search "class.*Error" . --ext .py
tldr search "TODO" . -C 3           # 3 lines context
tldr search "func" . --max 50       # Limit results

# Semantic search (natural language)
tldr semantic search "authentication flow"
tldr semantic search "error handling" --k 10
tldr semantic search "database queries" --expand  # Include call graph

File Analysis

# Full file info
tldr extract <file>
tldr extract src/api.py
tldr extract src/api.py --class UserService      # Filter to class
tldr extract src/api.py --function process       # Filter to function
tldr extract src/api.py --method UserService.get # Filter to method

# Relevant context (follows call graph)
tldr context <entry> --project <path>
tldr context main --project src/ --depth 3
tldr context UserService.create --project . --lang typescript

Flow Analysis

# Control flow graph (complexity)
tldr cfg <file> <function>
tldr cfg src/processor.py process_data
# Returns: cyclomatic complexity, blocks, branches, loops

# Data flow graph (variable tracking)
tldr dfg <file> <function>
tldr dfg src/processor.py process_data
# Returns: where variables are defined, read, modified

# Program slice (what affects line X)
tldr slice <file> <function> <line>
tldr slice src/processor.py process_data 42
tldr slice src/processor.py process_data 42 --direction forward
tldr slice src/processor.py process_data 42 --var result

Codebase Analysis

# Build cross-file call graph
tldr calls [path]
tldr calls src/ --lang python

# Reverse call graph (who calls this function?)
tldr impact <func> [path]
tldr impact process_data src/ --depth 5
tldr impact authenticate . --file auth  # Filter by file

# Find dead/unreachable code
tldr dead [path]
tldr dead src/ --entry main cli test_  # Specify entry points
tldr dead . --lang typescript

# Detect architectural layers
tldr arch [path]
tldr arch src/ --lang python
# Returns: entry layer, middle layer, leaf layer, circular deps

Import Analysis

# Parse imports from file
tldr imports <file>
tldr imports src/api.py
tldr imports src/api.ts --lang typescript

# Reverse import lookup (who imports this module?)
tldr importers <module> [path]
tldr importers datetime src/
tldr importers UserService . --lang typescript

Quality & Testing

# Type check + lint
tldr diagnostics <file|path>
tldr diagnostics src/api.py
tldr diagnostics . --project              # Whole project
tldr diagnostics src/ --no-lint           # Type check only
tldr diagnostics src/ --format text       # Human-readable

# Find affected tests
tldr change-impact [files...]
tldr change-impact                        # Auto-detect (session/git)
tldr change-impact src/api.py             # Explicit files
tldr change-impact --session              # Session-modified files
tldr change-impact --git                  # Git diff files
tldr change-impact --git --git-base main  # Diff against branch
tldr change-impact --run                  # Actually run affected tests

Caching

# Pre-build call graph cache
tldr warm <path>
tldr warm src/ --lang python
tldr warm . --background                  # Build in background

# Build semantic index (one-time)
tldr semantic index [path]
tldr semantic index . --lang python
tldr semantic index . --model all-MiniLM-L6-v2  # Smaller model (80MB)

Daemon (Faster Queries)

The daemon holds indexes in memory for instant repeated queries.

Daemon Commands

# Start daemon (backgrounds automatically)
tldr daemon start
tldr daemon start --project /path/to/project

# Check status
tldr daemon status

# Stop daemon
tldr daemon stop

# Send raw command
tldr daemon query ping
tldr daemon query status

# Notify file change (for hooks)
tldr daemon notify <file>
tldr daemon notify src/api.py

Daemon Features

FeatureDescription
Auto-shutdown30 minutes idle
Query cachingSalsaDB memoization
Content hashingSkip unchanged files
Dirty trackingIncremental re-indexing
Cross-platformUnix sockets / Windows TCP

Daemon Socket Protocol

Send JSON to socket, receive JSON response:

// Request
{"cmd": "search", "pattern": "process", "max_results": 10}

// Response
{"status": "ok", "results": [...]}

All 22 daemon commands:

ping, status, shutdown, search, extract, impact, dead, arch,
cfg, dfg, slice, calls, warm, semantic, tree, structure,
context, imports, importers, notify, diagnostics, change_impact

Semantic Search (P6)

Natural language code search using embeddings.

Setup

# Build index (downloads model on first run)
tldr semantic index .

# Default model: bge-large-en-v1.5 (1.3GB, best quality)
# Smaller model: all-MiniLM-L6-v2 (80MB, faster)
tldr semantic index . --model all-MiniLM-L6-v2

Search

tldr semantic search "authentication flow"
tldr semantic search "error handling patterns" --k 10
tldr semantic search "database connection" --expand  # Follow call graph

Configuration

In .claude/settings.json:

{
  "semantic_search": {
    "enabled": true,
    "auto_reindex_threshold": 20,
    "model": "bge-large-en-v1.5"
  }
}

Languages Supported

LanguageASTCall GraphCFGDFGPDG
PythonYesYesYesYesYes
TypeScriptYesYesYesYesYes
JavaScriptYesYesYesYesYes
GoYesYesYesYesYes
RustYesYesYesYesYes
JavaYesYes---
C/C++YesYes---
RubyYes----
PHPYes----
KotlinYes----
SwiftYes----
C#Yes----
ScalaYes----
LuaYes----
ElixirYes----

Ignore Patterns

TLDR respects .tldrignore (gitignore syntax):

# .tldrignore
.venv/
__pycache__/
node_modules/
*.min.js
dist/

First run creates .tldrignore with sensible defaults. Use --no-ignore to bypass.


When to Use TLDR vs Other Tools

TaskUse TLDRUse Grep
Find function definitiontldr extract file --function X-
Search code patternstldr search "pattern"-
String literal search-grep "literal"
Config values-grep "KEY="
Cross-file callstldr calls-
Reverse depstldr impact func-
Complexity analysistldr cfg file func-
Variable trackingtldr dfg file func-
Natural language querytldr semantic search-

Python API

from tldr.api import (
    # L1: AST
    extract_file, extract_functions, get_imports,
    # L2: Call Graph
    build_project_call_graph, get_intra_file_calls,
    # L3: CFG
    get_cfg_context,
    # L4: DFG
    get_dfg_context,
    # L5: PDG
    get_slice, get_pdg_context,
    # Unified
    get_relevant_context,
    # Analysis
    analyze_dead_code, analyze_architecture, analyze_impact,
)

# Example: Get context for LLM
ctx = get_relevant_context("src/", "main", depth=2, language="python")
print(ctx.to_llm_string())

Bug Fixing Workflow (Navigation + Read)

Key insight: TLDR navigates, then you read. Don't try to fix bugs from summaries alone.

The Pattern

# 1. NAVIGATE: Find which files matter
tldr imports file.py              # What does buggy file depend on?
tldr impact func_name .           # Who calls the buggy function?
tldr calls .                      # Cross-file edges (follow 2-hop for models)

# 2. READ: Get actual code for critical files (2-4 files, not all 50)
# Use Read tool or tldr search -C for code with context
tldr search "def buggy_func" . -C 20

Why This Works

For cross-file bugs (e.g., wrong field name, type mismatch), you need to see:

  • The file with the bug (handler accessing task.user_id)
  • The file with the contract (model defining owner_id)

TLDR finds which files matter. Then you read them.

Getting More Context

If TLDR output isn't enough:

  • tldr search "pattern". -C 20 - Get actual code with 20 lines context
  • tldr imports file.py - See what a file depends on
  • Read the file directly if you need the full implementation

Token Savings Evidence

Raw file read:    23,314 tokens
TLDR all layers:   1,189 tokens
─────────────────────────────────
Savings:              95%

The insight: Call graph navigates to relevant code, then layers give structured summaries. You don't read irrelevant code.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.67%
按下载量换算666

OpenCode

20.85%
按下载量换算502

Gemini CLI

17.27%
按下载量换算416

Codex

12.37%
按下载量换算298

windsurf

7.54%
按下载量换算182

Antigravity

3.67%
按下载量换算88

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills