Intelligent Context Compressor

•
95
•

Compresses large code artifacts and logs into token-efficient summaries tailored for AI model evaluation.

The Intelligent Context Compressor is a specialized utility designed to manage large volumes of data within the Claude Code environment by applying tiered summarization strategies. It analyzes the specific type of artifact—such as a code diff, JSON structure, or log file—and selectively preserves the most critical information like function signatures, error messages, and structural keys while discarding redundant details. By operating in an isolated forked context, the skill prevents large raw files from polluting the parent agent's memory, ensuring that LLM 'judges' and agents can process complex codebase information without exceeding token limits or sacrificing performance.

Key Features

01Precise token counting using integrated count_tokens.py validation
02Tiered compression logic (Full, Structural, or Hard Truncation) based on token budget
0395 GitHub stars
04Forked context execution to prevent main conversation token bloat
05Artifact-specific strategies for code diffs, JSON, logs, and markdown files
06Metadata-rich JSON output indicating truncation status and token usage

Use Cases

01Processing massive log files to extract only errors and warnings for debugging
02Fitting large JSON data structures into limited context windows for multi-agent workflows
03Providing summarized context to LLM quality judges for automated code reviews