Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Identity-aware context compression for Claude Code — reduces redundant identity tokens in conversation context
npx claudepluginhub pythondatascrape/engram-ccode --plugin engramengram: Manage the identity codebook — show the active codebook, diff against CLAUDE.md, initialize new codebooks, or validate existing ones
Manage engram plugin settings — redundancy thresholds, notification preferences, pricing, and auto-report configuration
Build an engram codebook for Claude prompts — compresses identity (CLAUDE.md) and prompt vocabulary into key=value pairs to reduce per-turn token cost
engram: Generate a token savings report showing compression and redundancy statistics for the current session
A Claude Code plugin that adapts Engram's identity-aware compression to reduce context window token usage in coding sessions.
Every Claude Code session re-reads the same CLAUDE.md files describing your project's conventions. engram-ccode compresses that project identity into a compact key=value format at session start — typically reducing 150–200 tokens of prose to 30–40 tokens — and monitors for redundant identity reinforcement throughout the session.
Example compression:
# CLAUDE.md prose (~187 tokens):
"This is a Go server using structured logging with slog.
Error handling returns errors wrapped with fmt.Errorf.
Every public function takes context.Context as first param.
Tests are table-driven using testify..."
# Compressed (~34 tokens):
[identity]
arch=modular_monolith concurrency=errgroup_ctx_cancel err_style=wrap_errorf
lang=go logging=slog pkg_style=no_circular testing=table_driven_testify
[/identity]
Three components work together:
| Component | What It Does |
|---|---|
MCP Server (server/index.mjs) | stdio-based server exposing 5 compression tools |
Hooks (hooks/) | SessionStart compresses identity; PostToolUse detects redundancy |
Skills (skills/) | /report, /codebook, /config slash commands |
| Tool | Purpose |
|---|---|
derive_codebook | Extract structured dimensions from CLAUDE.md via pattern matching |
compress_identity | Serialize dimensions to deterministic key=value format |
check_redundancy | Compare tool output against active codebook |
get_stats | Return session token accounting |
generate_report | Produce markdown savings report |
Auto-derived from CLAUDE.md without LLM calls:
lang · framework · build · testing · err_style · logging · arch · concurrency · transport · pkg_style
Override any dimension via .engram-codebook.yaml in your project root.
| Skill | Description |
|---|---|
/engram-ccode:report | Generate a token savings report for the session |
/engram-ccode:codebook | Show, diff, init, or validate the active codebook |
/engram-ccode:config | Manage redundancy threshold, pricing, and notification settings |
<project-root>/
├── .engram-codebook.yaml # optional dimension overrides
└── .engram/
├── codebook-cache.json # SHA-256-invalidated codebook cache
├── config.yaml # plugin settings
└── savings-log.csv # cross-session savings history
See INSTRUCTIONS.md.
MIT © 2026 Erik Meyer
Admin access level
Server config contains admin-level keywords
Share bugs, ideas, or general feedback.
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Token optimization for Claude Code. Automatic tool output compression (40-60% reduction), token meter in statusline, auto-compact at 70% context, structured output formats, self-building project wiki, URL ingestion, Karpathy compile pass, and semantic lint.
Open-source, local-first Claude Code plugin for token reduction, context compression, and cost optimization using hybrid RAG retrieval (BM25 + vector search), reranking, AST-aware chunking, and compact context packets.
Governor: always-on compact professional output, telemetry, context slimming, tool-output filtering, prompt guidance, and drift guardrails for Claude Code Max users.
AST-powered code compression for LLMs. Send 89% fewer tokens, get the same understanding. Parses your code with tree-sitter, keeps the signal, drops the noise.
Headroom startup hooks for Claude Code and GitHub Copilot CLI.
Claude Code context optimizer. Builds a local static repo graph, injects ranked file:line candidates through a UserPromptSubmit hook, and adds a SessionStart prewarm brief. No embeddings, no server, no telemetry. Measured live A/B: 40.9% aggregate token reduction across 36 Claude Code calls.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claim