Skills

Mix Compression

Reduce mix output noise (5-15% token savings) by installing rtk filters that compress...

Install

npx skills add oliver-kriska/claude-elixir-phoenix --skill mix-compression -g -a claude-code -y
Category
Testing
Updated
5d ago
License
MIT
Context cost
Lightabout 963 tokens
Runs scripts
No, instructions only

What it does

Reduce mix output noise (5-15% token savings) by installing rtk filters that compress mix test/credo/dialyzer/compile output before it reaches Claude. Use when long mix output floods context.

Mix Output Compression

Mix commands (mix test, mix credo, mix dialyzer, mix compile) emit verbose, repetitive output that consumes context fast. This skill installs rtk, a CLI proxy that filters tool output before it lands in the transcript.

The filters short-circuit happy paths to a single line (mix test: all pass) while preserving full failure blocks, compile errors, and stack traces. Net win: 5-15% per-session token reduction on mix-heavy workflows.

When to use

  • Long sessions, /phx:work or /phx:full hitting context limits from mix output
  • Debugging loops, /phx:investigate retrying mix compile/mix test repeatedly
  • Dialyzer-heavy projects, mix dialyzer output dominates the transcript

Iron Laws

  1. NEVER strip critical signals, compile errors (** (CompileError), == Compilation error in), test failures (FAILURES, 0 failures, preserved even on short-circuit), dialyzer warnings, and stack traces with file:line MUST pass through unchanged
  2. Verify after install, run rtk verify (or rtk verify --filter mix-test) to confirm the bundled test fixtures pass before declaring success
  3. Never overwrite existing .rtk/filters.toml, diff and merge instead

Workflow

Step 1: Detect rtk

which rtk && rtk --version

Read ${CLAUDE_SKILL_DIR}/references/install.md if rtk is missing, covers homebrew install + shell hook setup.

Step 2: Seed .rtk/filters.toml

Reference filters live at ${CLAUDE_SKILL_DIR}/references/rtk-filters.toml. Six production-tested filters covering:

Read the whole SKILL.md on GitHub

More in Testing