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

Chat Saver CG: Browser Extension Built with Claude Exports Conversations Across 12 AI Platforms
A developer built Chat Saver CG, a browser extension that exports and transfers conversations between Claude, ChatGPT, Gemini, and 9 other AI platforms, using Claude extensively for development including architecture decisions, debugging DOM parsing issues, and writing adapter logic.

Spec27: Spec-Driven Validation for AI Agents – API-Level Testing Without Internal Access
Spec27 is a new tool from Safe Intelligence for spec-driven validation of AI agents. It tests agent behavior from the outside in, running adversarial and robustness checks against primary interfaces without needing SDKs, gateways, or internal traces.

My Agent Built Himself an Interoception System — Now He Has Desires

OpenClaw Smart Router Open-Sourced for Automatic Model Selection
A developer has open-sourced a Smart Router for OpenClaw that automatically classifies queries by complexity and routes them to optimal models, saving 60-80% on API costs compared to always using premium models like Claude or GPT-4o.