{"id":"ca1b42b1-41d8-4657-887f-47563fd22339","slug":"claude-tuning","kind":"mcp","name":"claude-tuning","summary":"One-command setup that makes Claude Code use fewer tokens: rtk shell compression, stash search index, web-search, codebase-memory, fast-jev-compaction, ponytail, plus Jev skill suggestions and model r","owner":"NourEldinShobier","repoUrl":"https://github.com/NourEldinShobier/claude-tuning","license":"MIT","licenseTier":"permissive","trust":"community","stars":1,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-09-22T21:25:37.000Z","addedAt":"2026-10-21T09:44:07.428Z","logoUrl":"https://avatars.githubusercontent.com/u/47837759?u=e7ce02ce240a8973d8d9b02c1760a3854deebdf9&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["developer-tools","search","memory-knowledge"],"tags":["bun","claude-code","claude-code-plugin","context-engineering","tokens","jev","rtk"],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-27T02:10:29.993Z","sample":false,"url":"https://conduits.dev/tools/claude-tuning","language":"TypeScript","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# claude-tuning\n\n**Claude Code uses fewer tokens and answers faster. One install, about 5 minutes.**\n\nWorks on macOS, Linux and Windows.\n\n## Install (5 minutes)\n\n1. Run these two commands:\n\n   ```bash\n   claude plugin marketplace add NourEldinShobier/claude-tuning\n   claude plugin install claude-tuning@claude-tuning\n   ```\n\n2. Restart Claude Code.\n3. Type `/claude-tuning:tune`. Claude installs and configures everything that is missing: Bun, the plugins, rtk, codebase-memory, settings and rules.\n4. Restart Claude Code once more.\n\nDone.\n\n## You need\n\nSetting the API keys is the only step you do yourself.\n\n| What | Required? | Get it |\n|---|---|---|\n| [Bun](https://bun.sh) | Yes | Installed by `/claude-tuning:tune` if missing |\n| Claude Code 2.1.274+ | For fast-jev-compaction | `claude update` |\n| `TYPESAFE_API_KEY` | Optional | Turns on the Jev features below. [console.typesafe.ai](https://console.typesafe.ai/settings/keys) |\n\n## What you get\n\n**Works right after install:**\n\n| Part | What it does | Result |\n|---|---|---|\n| **Skill suggestions** (Jev) | Tells Claude which of its skills fits your request. | 14 of 17 test prompts right |\n| **Model routing** (Jev) | Moves hard coding subagent tasks to Opus. Never downgrades, never overrides a model Claude chose. | 14 of 14 test tasks right |\n\n**Added by `/claude-tuning:tune`:**\n\n| Part | What it does |\n|---|---|\n| [rtk](https://github.com/rtk-ai/rtk) | Compresses shell output before Claude reads it: up to 90% less. Installed with its official installer if missing |\n| [stash](https://github.com/NourEldinShobier/stash) | Keeps big outputs in a local search index; Claude pulls back only what it needs |\n| [ponytail](https://github.com/DietrichGebert/ponytail) | Keeps code minimal |\n| [i-have-adhd](https://github.com/ayghri/i-have-adhd) | Short answers that lead with the next action |\n| Tool rules in `~/.claude/CLAUDE.md` | Tell Claude when to use the tools above |\n| [codebase-memory](https://github.com/DeusData/codebase-memory-mcp) | Code graph; installed with its official installer if missing |\n| [fast-jev-compaction](https://github.com/tamaratran/fast-jev-compaction) (Jev) | Compaction that keeps chosen messages word for word instead of summarising them |\n| [quicksilver](https://github.com/UditAkhourii/quicksilver) (Jev) | Jev picks the files, log lines or items that matter, so Claude reads only those |\n| [compact-adviser](https://github.com/kunchenguid/compact-adviser) (Jev) | Compacts on its own at a finished checkpoint, not mid-task. Confirm once with `/compact-adviser auto` |\n| [jev-steer-or-queue](https://github.com/NourEldinShobier/Jev_steer_or_queue) (Jev) | Decides whether a message you send mid-turn steers, queues or stops the task |\n| [toolgate](https://github.com/NourEldinShobier/toolgate) (Jev) | Stops tool calls that follow prompt-injected instructions; everything else runs |\n| Settings | 700k auto-compact window, function hooks on (for compaction), the code-graph and rtk hooks, and auto-update for claude-tuning and stash |\n\nYour existing settings are kept. Backups: `settings.json.bak`, `CLAUDE.md.bak`.\n\n## Without a TypeSafe key\n\nEverything still works:\n\n- Skill suggestions and model routing turn off.\n- Compaction falls back to Claude Code's own; compact-adviser, jev-steer-or-queue and quicksilver stay idle.\n\n## Setup options\n\n| Flag | Does |\n|---|---|\n| `--only=rtk,stash` | Installs only these |\n| `--no-rules` | Leaves your CLAUDE.md alone |\n\nRunning setup twice is safe. The second run changes nothing.\n\n## Turn things off\n\n| To turn off | Do this |\n|---|---|\n| rtk for one command | Run it as `rtk bypass <command>` |\n| One part | `claude plugin disable stash@stash` (or `ponytail@ponytail`, …); toolgate: delete the hooks whose command contains `toolgate` from `~/.claude/settings.json`, then `npm uninstall -g @riskaverse/toolgate` |\n| All of it | `claude plugin disable claude-tuning@claude-tuning` |\n\n## Tools we use\n\nWe copy no third-party code. Each tool installs from its own repo at a pinned version.\n\n| Tool | What it does | Reported gain | Licence | How we use it |\n|---|---|---|---|---|\n| [rtk](https://github.com/rtk-ai/rtk) | Compresses shell output: git, tests, builds, docker, kubectl, package managers and more | Up to 90% less output | Apache-2.0 | Installed by setup if missing, with its hook |\n| [stash](https://github.com/NourEldinShobier/stash) | Keeps big outputs and files in a local search index. Claude pulls back only what it needs. Local only: no API keys, no network. | 91 KB of git history came back as 9.7 KB (89% less) | MIT | Installed by setup; install alone: `stash@stash` |\n| [ponytail](https://github.com/DietrichGebert/ponytail) | Makes Claude write the smallest code that works | 54% less code, 22% fewer tokens, 20% cheaper, 27% faster | MIT | Installed by setup |\n| [i-have-adhd](https://github.com/ayghri/i-have-adhd) | Answers lead with the next action: numbered steps, no filler | No published numbers; shorter answers | MIT | Installed by setup |\n| [codebase-memory-mcp](https://github.com/DeusData/codebase-memory-mcp) | Code graph: \"where is X defined, who calls X\" without reading whole files | 120x fewer tokens (3.4k vs 412k over 5 queries) | MIT | Installed by setup if missing |\n| [fast-jev-compaction](https://github.com/tamaratran/fast-jev-compaction) | Jev picks which messages survive compaction; kept ones stay verbatim | No published token numbers; no summary drift | MIT | Installed by setup; function hooks turned on |\n| [quicksilver](https://github.com/UditAkhourii/quicksilver) | Jev filters, labels and ranks many files, log lines or items, so Claude reads only the matches | 86% fewer Claude tokens on 12 tasks, up to 20x faster | MIT | Installed by setup; the tool rules say when to use it |\n| [compact-adviser](https://github.com/kunchenguid/compact-adviser) | Jev picks a finished checkpoint and runs /compact there | No published token numbers; avoids compacting mid-task | MIT | Installed by setup in auto mode |\n| [jev-steer-or-queue](https://github.com/NourEldinShobier/Jev_steer_or_queue) | Jev routes mid-turn messages: steer, queue until the turn ends, or stop | No token numbers; 450–650 ms per mid-turn message, ~90 ms per tool hook (Rust port in the fork) | MIT | Fork; installed by setup in shadow mode |\n| [toolgate](https://github.com/NourEldinShobier/toolgate) | Jev checks each tool call before it runs; here only for prompt injection | ~0.4 s per gated call | MIT | Fork; installed by setup with the injection-only policy |\n\nGains for stash were measured in this repo. Gains for the other tools come from their own READMEs and benchmarks. They measure different things, so the numbers don't add up to one total. Pinned versions are in [UPSTREAMS.md](UPSTREAMS.md).\n\n**Services:**\n\n| Service | Used by |\n|---|---|\n| [TypeSafe Jev](https://typesafe.ai) | Skill suggestions, model routing, compaction, quicksilver, toolgate |\n\n**Runtime:** [Bun](https://bun.sh) runs this code. Only Bun's built-ins are used: SQLite, fetch and spawn.\n\nMore detail, including pinned commits and what changes in each tool: [UPSTREAMS.md](UPSTREAMS.md).\n\n- stash is written from scratch for this bundle. It lives in its own repo, so you can install it without this bundle.\n- `bun run upstreams` shows which tools have newer releases.\n\nTo update one:\n\n1. Read its changelog.\n2. Change the version in `src/upstreams.ts`.\n3. Run `bun test`.\n\n## Develop\n\n```bash\nbun install\nbun test                 # unit tests, no network\nbun run typecheck\nbun test/eval.ts         # live skill-suggestion check (needs TYPESAFE_API_KEY)\nbun test/eval-route.ts   # live model-routing check\n```\n\nDebug output: set `SKILL_SUGGEST_DEBUG=1` or `ROUTE_MODEL_DEBUG=1`.\n\n## Credits\n\n- Skill suggestions follow [TypeSafe's skill-suggestion cookbook](https://docs.typesafe.ai/cookbooks/skill_suggestion).\n- Every installed tool is credited in [UPSTREAMS.md](UPSTREAMS.md).\n\n## Licence\n\n[MIT](LICENSE)\n"}