Snip: Open-source tool reduces Claude Code token usage with YAML filters

Snip is an open-source tool written in Go that reduces Claude Code token usage by 60-90% by filtering shell command output before it reaches the context window. Inspired by rtk (Rust Token Killer), it takes a different approach: filters are data (YAML files) rather than compiled code.
How it works
AI coding agents often waste tokens on verbose shell output. For example, a passing go test can produce hundreds of lines that the LLM doesn't need, and git log dumps full metadata when a one-liner would suffice. Snip sits between Claude Code and the shell, filtering output through declarative YAML pipelines.
Benchmark example from the source:
- Before:
go test ./...→ 689 tokens - After: "10 passed, 0 failed" → 16 tokens (97.7% reduction)
Setup and usage
Setup requires one command:
brew install edouard-claude/tap/snip
snip initAfter this, every shell command Claude runs goes through snip.
Key differentiators from rtk
- Filters are YAML files you drop in a folder, not Rust code compiled into the binary
- 16 composable pipeline actions including: keep/remove lines, regex, JSON extract, state machine, group_by, dedup
- Users can write their own filter in 5 minutes without touching Go
- The engine and filters evolve independently
Compatibility
Snip also works with Cursor, Copilot, Gemini CLI, Aider, Windsurf, and Cline.
📖 Read the full source: r/ClaudeAI
👀 See Also

Caddie: Slack-Based OpenClaw Alternative Launches Next Week
Caddie is a Slack-based version of OpenClaw that requires no local installation or MCP configuration. Users authorize it through the Slack App Directory in 60 seconds, then type commands to automate tasks across Gmail, LinkedIn, CRM, calendar, and 100+ other tools.

Two Patterns for Preventing AI Agent Memory Rot: AutoDream and Skeptical Retrieval
OpenClaw introduces two MIT-licensed patterns to address file-based AI memory rot: AutoDream for nightly memory consolidation and Skeptical Retrieval for decay-weighted memory scoring. Both work together in a self-improving loop to keep agent context current.

Skales: A Desktop AI Agent That Connects to Ollama Without Docker
Skales is a desktop AI agent that connects to Ollama locally, requiring no Docker setup. It offers features like email management via Gmail IMAP, browser automation, and voice chat using Whisper through Groq.

Context Gateway: An Open-Source Proxy for Compressing AI Agent Context
Context Gateway is an open-source proxy that sits between coding agents and LLMs, compressing tool outputs before they enter the context window. It uses small language models to detect signal in context, performs background compaction at 85% window capacity, and includes spending caps, a dashboard, and Slack notifications.