LaunchKit · 2026
Back to Skills

context-builder

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

0
500 downloads
by @igorls

Setup & Installation

openclaw skills install @igorls/context-builder

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install context-builder

Version History

v0.8.3-1Feb 16, 2026 - Version note by skill developer:

- Simplified installation instructions: removed pre-built binary install script details and now direct users to GitHub Releases for manual download. - Clarified recommended source installation and referenced version verification. - No changes to core usage, workflows, CLI reference, or recipes. - Documentation is now more concise and easier to follow for setup and installation.

What This Skill Does

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.

When to use it

  • 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

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

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

AGENT
  1. 1Run token count preview: context-builder -d /home/user/myapp --token-count
  2. 2If over budget, scope to Rust and TOML files with a token cap
  3. 3Run: context-builder -d /home/user/myapp -f rs,toml --max-tokens 120000 -y -o docs/context.md
  4. 4Attach docs/context.md to the LLM prompt for architecture or bug analysis
OUTPUT

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

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

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