跳到正文
TakoAPI
返回技能列表

context-builder

由 igorls 提供

Coding Agents & IDEs
500下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Generate LLM-optimized codebase context from any directory using context-builder CLI.

描述

该技能的功能

context-builder scans a local directory and generates a single structured markdown file from the codebase. Output is ordered by file relevance and supports AST-aware signature extraction to minimize token usage. Token budgeting, .gitignore awareness, and automatic directory exclusions are built in.

AST-aware signatures reduce context size by 80-90% compared to raw file dumps, making large codebases fit within model token limits without manual curation.

何时使用

  • Feed an entire Rust codebase to an LLM for architecture review
  • Onboard to an unfamiliar repo by generating a full project snapshot
  • Extract only public API signatures before a code review session
  • Generate incremental diffs after code changes to update LLM context
  • Package a specific monorepo package for focused LLM analysis

示例工作流

输入

User asks: Generate a context file for my Rust project at /home/user/myapp for LLM code review

智能体
  1. 1

    Run token count preview: context-builder -d /home/user/myapp --token-count

  2. 2

    If over budget, scope to Rust and TOML files with a token cap

  3. 3

    Run: context-builder -d /home/user/myapp -f rs,toml --max-tokens 120000 -y -o docs/context.md

  4. 4

    Attach docs/context.md to the LLM prompt for architecture or bug analysis

输出

docs/context.md containing relevance-ordered Rust and TOML files, capped at 120K tokens, ready for LLM input

前置要求

  • Rust toolchain (rustup + cargo, required to build context-builder from source)

安装

clawhub install igorls/context-builder

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接