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

✍️ OpenClawRadar📅 Published: April 15, 2026🔗 Source
Snip: Open-source tool reduces Claude Code token usage with YAML filters
Ad

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)
Ad

Setup and usage

Setup requires one command:

brew install edouard-claude/tap/snip
snip init

After 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

Ad

👀 See Also

Claude Octopus v8.48: Multi-AI Orchestration Plugin for Development Workflows
Tools

Claude Octopus v8.48: Multi-AI Orchestration Plugin for Development Workflows

Claude Octopus v8.48 is an open-source plugin that orchestrates Claude, Codex, and Gemini AI models in parallel with distinct roles across development phases. It includes a 75% consensus gate between phases, fresh context windows for complex tasks, and specific commands like /octo:embrace for full lifecycle development.

OpenClawRadar
Voxray-AI: Production Go Backend for Real-Time Voice Agent Pipelines
Tools

Voxray-AI: Production Go Backend for Real-Time Voice Agent Pipelines

Voxray-AI is a Go backend that chains Whisper → any LLM → TTS into a real-time voice agent pipeline with WebSocket and WebRTC support. It's built for production-grade servers and high-concurrency voice workloads with configurable providers for STT, LLM, and TTS layers.

OpenClawRadar
GitVelocity: AI Scoring of 50k PRs Reveals Insights on Code Complexity
Tools

GitVelocity: AI Scoring of 50k PRs Reveals Insights on Code Complexity

GitVelocity uses Claude to score merged pull requests 0-100 across six dimensions: scope, architecture, implementation, risk, quality, and performance/security. After analyzing 50,000+ PRs across TypeScript, Python, Rust, Go, Java, and Elixir, the team found surprising patterns about PR size, test coverage, and AI adoption.

OpenClawRadar
Measuring Off-Task Token Spend in Claude Code: The 'Undeclared-Intent' Metric
Tools

Measuring Off-Task Token Spend in Claude Code: The 'Undeclared-Intent' Metric

A developer built a metric to quantify compute spent on unintended execution paths in Claude Code sessions, finding that 22.8% of tokens went to off-task work.

OpenClawRadar