Hook-based token compressor for 7 AI CLI hosts (Claude Code, Copilot CLI, OpenCode, Gemini CLI, Codex CLI, Pi, Hermes). Up to 95% bash compression, signature-mode for code reads, cross-call dedup, MCP server, self-teaching protocol. Zero runtime deps.
# Add to your Claude Code skills
git clone https://github.com/claudioemmanuel/squeezGuides for using mcp servers skills like squeez.
Last scanned: 5/30/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-30T16:21:28.897Z",
"npmAuditRan": true,
"pipAuditRan": true
}See how squeez compares with popular alternatives.
squeez is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by claudioemmanuel. Hook-based token compressor for 7 AI CLI hosts (Claude Code, Copilot CLI, OpenCode, Gemini CLI, Codex CLI, Pi, Hermes). Up to 95% bash compression, signature-mode for code reads, cross-call dedup, MCP server, self-teaching protocol. Zero runtime deps. It has 229 GitHub stars.
Yes. squeez passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/claudioemmanuel/squeez" and add it to your Claude Code skills directory (see the Installation section above).
squeez is primarily written in Rust. It is open-source under claudioemmanuel on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh squeez against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
From $49 · 30 days · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
End-to-end token optimizer for seven AI CLI hosts — Claude Code, GitHub Copilot CLI, OpenCode, Gemini CLI, OpenAI Codex CLI, Pi, and Hermes. Compresses bash output up to 95%, collapses redundant calls, preserves exact identifiers through every summary, refuses net-loss compressions, and injects a terse prompt persona — automatically, with zero new runtime dependencies.
Latest first. Full history in CHANGELOG.md.
squeez init takes --session-id / --cwd (or --stdin to read the host's session-start payload); the Claude Code hook and the OpenCode plugin pass them. current.json, the finalized summary and the session-start snapshot in the shared hourly log carry host_session_id, so a stats panel can label a row "the chat that ran the release" instead of "today 07:10". Optional fields; hosts that send nothing change nothing. (#286)finalize summed every event in the hourly log, which every session of that hour shares — a session that ran one echo reported the previous session's savings, and summing summaries overcounted ~8×. Events older than the session's start are now skipped. (#284)cd pkg && cargo test is cargo, export CI=1; npm test is npm, (cd x && make) is make; VAR=1 prefixes and subshell openers no longer take slots. A full table evicts its least-called name instead of silently dropping new ones (64 → 128 slots). The same fix routes cd pkg && cargo test to the test-runner handler. (#285)pre_tool_call + squeez wrap (which had to skip every piped or chained command) to Hermes's transform_terminal_output hook: the command runs unchanged, its output goes through squeez filter, and the full output is kept on disk, redacted, with its path appended. Contributed by @fire. (#275)squeez doctor, Windows and OpenCode 2.xagent_spawn_cost guess; a spawn ceiling is enforced at PreToolUse and the metering blind spot (spawns counted only on return) is closed.squeez doctor — self-health check: hook drift and registration per host, config sanity, tracking freshness; each store judged by the host that owns it.SessionStart, not PostCompact (Claude Code does not deliver PostCompact output to the model).context_window_tokens pins it when detection is not possible.bash.exe from WindowsApps is recognized as the WSL launcher and skipped, the post-exit drain is bounded, MSYS children are killed on timeout, and Codex/Gemini hook commands are bash-prefixed so they actually run.init once per session, builds the wrap command for the shell OpenCode runs (PowerShell / pwsh / bash), starts no child process synchronously, and keeps runtime state in $XDG_STATE_HOME/squeez/opencode out of the watched config tree.init cannot corrupt an instruction file, every session starts with its own counters, the persona is taught once per session, and wrap fails open when the stash is refused rather than compressing lossily.git statusThe filter DSL could always cover the long tail GenericHandler can't compress — it just shipped empty, so every user started from a blank filters.ini. This release fills it, adds a native git status path, and makes two guards that were only ever measured in benchmarks run for real.
assets/filters_builtin.ini) — pip/uv/poetry, bundle/composer/rubocop/phpstan, dotnet/swift/gcc, mypy/basedpyright/golangci-lint, shellcheck/hadolint/yamllint/markdownlint/pre-commit, systemctl/journalctl/rsync/ping/ansible-playbook and more. Every rule ships an inline self-test that CI gates on. Project and user rules still shadow any built-in; builtin_filters = false turns the pack off.git status reads as porcelain — re-run as git status --porcelain=v1 -b and rendered as a working-tree summary. Exact paths are never collapsed to counts, raw porcelain codes never reach the model, and in-progress rebase/merge/bisect (which porcelain omits) is read from .git/ markers instead of a second git status.economy::preservation used to execute only in benchmark. It now scores anchor survival at wrap time on ≥90%-reduction calls; below the floor the verbatim original is stashed and the header carries [anchors: N%].TF_LOG=debug terraform plan and npx terraform plan reach the terraform branch; wrappers peel in a loop (sudo npx vitest); a pipeline ending in a transforming stage (cargo build | grep error) dispatches on that stage.Three methods — all produce the same result (binary at ~/.claude/squeez/bin/squeez, hooks registered).
curl -fsSL https://raw.githubusercontent.com/claudioemmanuel/squeez/main/install.sh | sh
Windows: requires Git Bash. Run the command above inside Git Bash — PowerShell/CMD are not supported.
# Install globally
npm install -g squeez
# Or run once without installing
npx squeez
Downloads the correct pre-built binary for your platform (macOS universal, Linux x86_64/aarch64, Windows x86_64). Requires Node ≥ 16.
cargo install squeez
Builds from crates.io. Requires Rust stable. On Windows you also need MSVC C++ Build Tools.
squeez setup auto-detects every CLI present on disk and registers the hooks. squeez uninstall removes them. Session data and config.ini are preserved so reinstall is lossless.
| Host | Memory file | Bash wrap | Session memory | Budget inject (Read/Grep) | Notes |
|---|---|---|---|---|---|
| Claude Code | ~/.claude/CLAUDE.md |
✅ native | ✅ native | ✅ native | Restart Claude Code to pick up hooks |
| Copilot CLI | ~/.copilot/copilot-instructions.md |
✅ native | ✅ native | ✅ native | Restart Copilot CLI after setup |
| OpenCode | ~/.config/opencode/AGENTS.md |
✅ native | ✅ native | ✅ native | Plugin at ~/.config/opencode/plugins/squeez.js; MCP tool calls skip hooks (upstream sst/opencode#2319) |
| Gemini CLI | ~/.gemini/GEMINI.md |
✅ native | ✅ native | 🟡 soft via GEMINI.md |
BeforeTool rewrite schema pending upstream docs (google-gemini/gemini-cli#25629) |
| Codex CLI | ~/.codex/AGENTS.md |
✅ native | ✅ native | 🟡 soft via AGENTS.md |
apply_patch hooks landed in 0.123.0 (#18391); updatedInput + read_file/grep hook surface still pending (openai/codex#18491) |
| Pi | ~/.pi/agent/skills/squeez/SKILL.md |
✅ native | ✅ via skill | ✅ native | TypeScript extension at ~/.pi/agent/extensions/squeez/index.ts; restart Pi after setup |
| Hermes | ~/.hermes/profiles/default/SOUL.md |
✅ output hook (transform_terminal_output) |
✅ native | ❌ no budget surface | Python plugin (__init__.py + plugin.yaml) at $HERMES_HOME/plugins/squeez-fallback/; opt-in — enable once with hermes plugins enable squeez-fallback |
squeez setup # register into every detected host
squeez setup --host=<slug> # register into one host
squeez uninstall # remove squeez entries from every detected host
squeez uninstall --host=<slug>
Slugs: claude-code / copilot / opencode / gemini / codex / pi / hermes.
After install, restart the CLI you use to pick up the new hooks.
squeez uninstall # preserves session data + config