phx-mix-compression
/phx-mix-compression
Zmniejsza szum w wyniku poleceń mix, instalując filtry rtk, które kompresują wyjście mix test, credo, dialyzer i compile i oszczędzają 5-15 proc. tokenów.
- Autor
- oliver-kriska ↗
- Repozytorium
- claude-elixir-phoenix ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 22.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 3
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 2
Brak sygnałów. Repozytorium zmienione 22.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Zmniejsza szum w wyniku poleceń mix, instalując filtry rtk, które kompresują wyjście mix test, credo, dialyzer i compile i oszczędzają 5-15 proc. tokenów.
Oryginalny opis (EN)
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.
Jak działa
- When to use
- Iron Laws
- Workflow
- Customization
- What this is NOT
- References
Podgląd SKILL.md
--- name: phx-mix-compression description: 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](https://github.com/rtk-ai/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** — `/skill:phx-work` or `/skill:phx-full` hitting context limits from mix output - **Debugging loops** — `/skill: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 ```bash which rtk && rtk --version ``` Read `references/install.md` if rtk is missing — covers homebrew install + shell hook setup. ### Step 2: Seed `.rtk/filters.toml` Reference filters live at `references/rtk-filters.toml`. Six production-tested filters covering: - **`mix-test`** — short-circuits all-pass, preserves failure blocks + compile errors - **`mix-credo`** — collapses clean runs, preserves violation blocks - **`mix-dialyzer`** — drops PLT progress, keeps warnings + summary - **`mix-deps-get`** — collapses unchanged package lists - **`mix-ecto-migrate`** — strips compile prefix, short-circuits "already up" - **`mix-compile`** — handles parallel worker prefixes (`N>`) and MIX_ENV Run this if the project has no `.rtk/filters.toml` yet: ```bash mkdir -p .rtk cp "references/rtk-filters.toml" .rtk/filters.toml ``` Read both files if one already exists. Present a diff to the user. Merge only the filters they don't already have. ### Step 3: Verify filters work ```bash rtk verify # runs all embedded [[tests.*]] fixtures rtk verify --filter mix-test # one filter only ``` Check that all report "passed". Flag and stop if any fail — usually means the user has a custom rtk version with regex differences. ### Step 4: Confirm shell hook Run `rtk init zsh` (or `rtk init bash`) to install the transparent rewrite hook that turns `mix X` into `rtk mix X`. Re-running is safe (idempotent). Skip this step and `mix` calls run unfiltered. ## Customization Add custom regex patterns to `strip_lines_matching` for project-specific noise sources (e.g., third-party hex deps spamming stack traces). See the inline example in `references/rtk-filters.toml` lines 57-59. ## What this is NOT - **Not a hook** — Claude Code's `PostToolUse` hooks fire after the tool result is in the transcript and cannot shrink it. rtk works at the subprocess layer (the only layer where transcript-shortening is possible). - **Not project-analysis** — the bundled filter set is universal across Phoenix projects. No `mix.exs` inspection needed. - **Not telemetry** — rtk has telemetry off by default (`enabled = false` in `config.toml`). Filters run locally, no data leaves the machine. ## References - `references/rtk-filters.toml` — bundled filter set - `references/install.md` — rtk install + shell hook setup - [rtk on GitHub](https://github.com/rtk-ai/rtk)
Pliki w paczce (3)
- SKILL.md 4 KB
- references/install.md 3 KB
- references/rtk-filters.toml 16 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · oliver-kriska/claude-elixir-phoenix | 100 | MIT |
| oliver-kriska/claude-elixir-phoenix | 100 | MIT |
| oliver-kriska/claude-elixir-phoenix | 100 | MIT |
| oliver-kriska/claude-elixir-phoenix | 100 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 47575fb604a6 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100mix-compression
Ogranicza szum w wyniku poleceń mix (test, credo, dialyzer, compile) filtrami rtk, oszczędzając 5 do 15 proc. tokenów, zanim wynik trafi do Claude. - 100estack-quality
Konfiguruje i uruchamia bramkę jakości dla projektu Elixir/Phoenix z uczciwą obsługą błędów: mix verify i precommit, Credo, pokrycie, Dialyzer, Sobelow, audyty zależności i CI. - 100phx-permissions
Proponuje bezpieczne uprawnienia Bash dla poleceń mix w pliku settings.json, żeby ograniczyć liczbę pytań o zgodę podczas pracy nad kodem w Elixirze. - 100rtk
Opakowuje polecenia deweloperskie, takie jak cargo, git, npm, docker czy kubectl, w RTK, który skraca ich wyjście i oszczędza tokeny. - 100rtk-optimizer
Opakowuje gadatliwe polecenia powłoki, na przykład git log, git diff, cargo test i pytest, w RTK, aby oszczędzać okno kontekstu. - 100dialyzer-configuration
Konfiguruje Dialyzera do sprawdzania typów i analizy statycznej w kodzie Erlang i Elixir.