8dkj4fjrrs-cmyk

Smart Context Compressor — AI skill for Claude Code

AI community

Run a coding agent for weeks in one session.

How to install Smart Context Compressor

This entry records only its repository, not the path inside it, so there is no exact command to give. Open 8dkj4fjrrs-cmyk/Smart-Context-Compressor and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Smart Context Compressor does

Run a coding agent for weeks in one session. A one-file local proxy that compresses the conversation before it reaches the model and keeps every original. No dependencies, one command.

Alternatives in AI

  • DontFeedTheAI — Transparent anonymization proxy for AI-assisted pentesting 654 ★
  • Token Proxy — Local AI API gateway for OpenAI / Gemini / Anthropic 92 ★
  • Deterministic Agent Control Protocol — Governance gateway for AI agents — bounded, auditable, session-aware control with MCP proxy, shell proxy & HTT 88 ★

README

Smart Context Compressor

**Run a coding agent for weeks in one session, inside a 100K-token window.**

*A small local proxy that compresses the conversation on its way to the model, and keeps the originals within reach.*

**One Python file · no dependencies · no injected tools · responses streamed back untouched**

[![tests](https://github.com/8dkj4fjrrs-cmyk/Smart-Context-Compressor/actions/workflows/tests.yml/badge.svg)](https://github.com/8dkj4fjrrs-cmyk/Smart-Context-Compressor/actions/workflows/tests.yml) ![license](https://img.shields.io/badge/license-MIT-blue) ![python](https://img.shields.io/badge/python-3.9%2B-blue) ![dependencies](https://img.shields.io/badge/dependencies-none-brightgreen) ![status](https://img.shields.io/badge/status-prototype-orange)

`ctxc run claude` · one command starts the compressor and your agent together · open `http://127.0.0.1:8787` in a browser to watch it work


In a real T3 Code + Claude Code session, requests the agent sent at **146K tokens** reached the model at **55K**. In a 6,000-tool-call benchmark session (13M tokens of history), every request stays under **71K tokens** with **~99%** of it in an unchanged, cacheable prefix. Check your own numbers with `curl http://127.0.0.1:8787/__ctxc/stats`.


Smart Context Compressor (command: `ctxc`) sits between a coding agent and its model API. The agent keeps sending its full conversation; the proxy shrinks it to a fixed budget, forwards it, and streams the reply straight back.

Why

AI coding agents send the whole conversation to the model on every turn. In a long session the conversation grows until it no longer fits in the model's context window. The agent then either stops, or throws away most of its history in one lossy step and **forgets what it was doing**.

Smart Context Compressor shrinks each request before it reaches the model:

  • Recent work is left exactly as it is, so the model sees what it is doing now.
  • Old tool output is trimmed: long log