今日已更新 166 条资讯 | 累计 20138 条内容
关于我们

Save 60-90% of Your Claude Code Tokens With Two Tools

Dawid Nitka 2026年06月15日 05:22 2 次阅读 来源:Dev.to

TL;DR: Two tools cut Claude Code token usage at two different layers. RTK is a shell proxy that compresses command output before it ever reaches the context window. context-mode is a Claude Code plugin that does heavy tool work in a sandbox and hands back only the answer. They stack cleanly on top of each other, and a single skill installs both. This article explains how each one works and how to wire them in. Two commands into a session, my context window was already a third full, and I hadn't written a line of code yet. A pnpm install had dumped its entire dependency tree, a git log paid out two hundred commits, then a stack trace landed in full. None of that was work I'd asked for - it just sat there in the context window eating tokens on every turn. Most of the token budget goes on that boring output - the installs, the logs, the traces - which piles up and gets re-read on every single turn, never on the clever reasoning you actually wanted. Two tools attack that pile from two directions. Here's how they work, and how to install both in one command. This is the last article in the series, and it builds on the skill pattern from the third. You can pass this article URL straight to Claude Code and follow along. Where the tokens actually go Picture the context window as a desk. Everything Claude needs stays on the desk so it can glance at it: your prompts, its replies and the output of every command it ran. The desk has a size limit, and once something is on it, it gets re-read on every turn until it falls off the edge. Two kinds of clutter land there: Command output that arrives bloated. A dependency install, a long log, a verbose test run. It enters once and costs tokens on every turn after. The accumulated pile itself. Even reasonably sized outputs add up across a long session until the desk is buried. The two tools map onto those two problems. RTK trims the output before it ever reaches the desk. context-mode keeps the heaviest work off the desk altogether. Lay

本文内容来源于互联网,版权归原作者所有
查看原文