hook-tool-output-truncator
CommunityLimit tool output, preserve essential context.
Authorxuezhaojun
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Truncates oversized tool outputs from grep, glob, webfetch, bash, and other tools to prevent context window blowout, preserving the beginning and end so the LLM retains useful context.
Core Features & Use Cases
- Middle-cut truncation preserves the start and end of long outputs to keep essential context.
- Configurable limits allow a global default and per-tool overrides for precise control.
- Low overhead activates only when outputs exceed thresholds, reducing token usage.
- Use case: large repo searches or logs where results overwhelm the context window.
Quick Start
Start by enabling the hook in your project and integrating the tool-output-truncator with your existing hook pipeline to apply per-tool limits.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: hook-tool-output-truncator Download link: https://github.com/xuezhaojun/oh-your-opencode/archive/main.zip#hook-tool-output-truncator Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.