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

Claude Pulse Browser Extension Surfaces Token Counts, Cache Timers, and Rate Limits on Claude.ai
Claude Pulse is a client-side Chrome extension that adds a real-time dashboard to Claude.ai showing per-message token counts, total context usage, prompt cache expiry timer, and rate limit progress bar. Also includes chat export to Markdown.

CodeLedger: Open-source Claude Code plugin tracks token usage and background agents
CodeLedger is an open-source MCP server plugin for Claude Code that automatically tracks token usage across projects, identifies background agents, and provides cost optimization recommendations based on analysis of local JSONL session files.

Nudge: A local-first app that surfaces Claude-generated plans via contextual triggers
Nudge is a free, local-first iOS/Android app that lets you paste markdown plans (from Claude, ChatGPT, Notes) and attach triggers like time, location, Wi-Fi, inactivity, or one-time to surface them via local notifications.

Watchtower: A Local Proxy for Monitoring Claude Code API Traffic
Watchtower is a free, open-source tool that acts as a local HTTP proxy and real-time web dashboard to intercept and display all API traffic between Claude Code (or Codex CLI) and their APIs. It shows requests, SSE streams, tool definitions, system prompts, token usage, and rate limits.