{"slug": "deadweight-what-your-claude-code-setup-costs-on-every-request", "title": "Deadweight: What your Claude Code setup costs on every request", "summary": "A tool called deadweight, installed via `cargo install deadweight` or a prebuilt binary for macOS, Linux or Windows, audits Claude Code session history to measure the token overhead that plugins, skills, MCP servers and hooks add to every request before the user types anything. In the example run, each request carried 61.2k tokens (median of recent sessions 63.8k), of which ~19.4k came from the user's setup and ~41.8k from Claude Code itself, with deferred tool names (412) at ~7.1k tokens and skill listings (214) at ~6.2k the largest contributors. The tool reports that Claude Code caps the skill listing at roughly 30,000 characters, so 151 of 214 skills were listed by name only without descriptions, and it offers a `deadweight fix` command that disables 6 unused plugins and hides 11 unused skills to save ~6.8k tokens per request.", "body_md": "**Find the dead weight in your Claude Code setup.**\n\nEvery plugin, skill, MCP server and hook you install adds text to *every single request* Claude Code sends, before you type a word. `deadweight` measures that overhead from your own session history, tells you exactly where it comes from, shows what you never actually use, and removes it with one undoable command.\n\nAn example run. Yours will look different, and that's the point.\n\n## Same output as text\n\n``` bash\n$ deadweight\n\n  Before you type a word, every request carries 61.2k tokens\n  measured from your latest session; median of recent sessions 63.8k\n  ~19.4k from your setup · ~41.8k from Claude Code itself (system prompt + 18 tools)\n\n  WHAT YOUR SETUP ADDS\n  Deferred tool names (412)            ~7.1k  ████████████████████████\n  Skill listings (214)                 ~6.2k  █████████████████████\n  Hook injections (3)                  ~3.4k  ███████████▌\n  MCP server instructions (4)          ~2.1k  ███████▏\n  Agent listings (12)                   ~600  ██\n\n  BIGGEST SOURCES\n  name                           type           tokens    used  contents\n  github                         mcp server      ~3.9k    212×  91 tools\n  kitchen-sink                   plugin          ~3.6k   never  64 tools · 22 skills\n  workflow-kit                   plugin          ~2.6k     14×  hooks 2.2k · 11 skills\n  playwright                     mcp server      ~1.4k   never  33 tools\n  devops-pack                    plugin          ~1.3k      3×  hooks 1.2k · 6 skills\n  marketing-suite                plugin          ~1.1k   never  18 tools · 14 skills\n  linear                         mcp server       ~810     37×  41 tools\n\n  PROBLEMS\n  ✗ 151 of 214 skills are listed without a description: the skill listing is full\n      (~30.0k characters). Claude sees only their names, so it can't tell when to use them.\n      Including 4 you actually use: pdf-tools:extract, review-pr, workflow-kit:plan, +1 more\n      Make room: hide what you don't use (deadweight fix), or set \"skillListingBudgetFraction\": 0.02 in settings.json\n      (default 0.01; the extra room costs up to ~8.3k tokens per request).\n  ✗ 2 MCP servers failed to connect at startup\n  ! 9 MCP servers never signed in, still listing 18 auth-only tools\n  ! 3 skill names are listed more than once\n  ! 198 of 214 listed skills were not used in 30 days (~5.1k per request)\n\n  Run deadweight fix to disable 6 unused plugins and hide 11 unused skills and save ~6.8k tokens per request.\n\n  UNUSED, BUT YOURS TO REMOVE\n  mcp server playwright              ~1.4k   claude mcp remove \"playwright\"\n\n  LOADED IN EVERY PROJECT, USED IN ONE OR TWO\n  mcp server linear                  ~810    37× in /home/you/code/app (of 9 projects)\n    in .claude.json, move \"linear\" from the top-level mcpServers into projects > \"/home/you/code/app\" > mcpServers\n```\n\n- **Your usage limit drains faster.** The overhead is resent on every turn of every session.\n- **Your context window fills sooner** , so sessions compact earlier and Claude loses track of your actual work.\n- **Claude gets worse at picking the right skill.** This one surprised us: Claude Code caps the skill listing at roughly 30,000 characters. Once you go past it, skills are listed**by name only, without their descriptions** . With a few hundred skills installed, most of them end up as bare names, and Claude has no way to tell when to use them. Unused skills crowd out the ones you rely on.\n\nNone of this shows up anywhere in the UI. Plugins get installed one at a time and the total is never visible.\n\n```\ncargo install deadweight\n```\n\nOr grab a prebuilt binary for macOS, Linux or Windows from [Releases](https://github.com/msertdev/deadweight/releases). It's a single binary with no runtime dependencies.\n\n```\ndeadweight                 # audit: what every request carries and where it comes from\ndeadweight --all           # list every source, not just the biggest\ndeadweight --days 60       # count anything used in the last 60 days as \"used\"\ndeadweight --json          # machine-readable output\n\ndeadweight fix --dry-run   # show what would change\ndeadweight fix             # disable unused plugins, hide unused skills (asks first)\ndeadweight undo            # put everything back\n\ndeadweight card            # save your totals as a PNG to share (no names on it)\n```\n\n`fix` options:\n\n| flag | effect | \n|---|---|\n| `--keep NAME` | never touch this plugin or skill, or `connectors` (repeatable) | \n| `--park-skills` | move unused skills into the backup folder instead of hiding them | \n| `--include-hooked` | also disable unused plugins that run hooks | \n| `--yes` | don't ask for confirmation | \n| `--force` | run even with fewer than 5 sessions of history | \n\nRestart Claude Code after `fix` or `undo` to load the new setup.\n\n`deadweight card` writes `deadweight-card.png`: your total, how much of it is your setup, unused skills, and what `fix` would save. It shows totals only, never a plugin, skill or server name. `--output card.svg` gives you the SVG instead.\n\nPost yours. I'd like to see the biggest one.\n\ndeadweight ships as a Claude Code plugin too, so you can ask Claude to audit its own setup:\n\n```\n/plugin marketplace add msertdev/deadweight\n/plugin install deadweight@deadweight\n/deadweight\n```\n\nThe plugin needs the `deadweight` binary on your `PATH` (see [Install](#install)). It adds a single short line to the skill listing, about 18 tokens.\n\nClaude Code keeps a transcript of every session in `~/.claude/projects/`. Alongside the conversation it records what was loaded at startup: the skill listing, the deferred tool names, MCP server instructions, the agent listing, hook output, and the token usage the API billed for each request.\n\ndeadweight reads those records:\n\n1. **Measure.** The total comes from the API usage of the first request of your latest session (input + cache write + cache read tokens). This number is measured, not estimated.\n2. **Attribute.** Each skill line, tool name, instruction block, agent and hook injection is traced to the plugin, skill, MCP server or connector that added it. Hook commands are matched against each plugin's`hooks.json` . Sizes are converted to tokens from text length; whatever your setup doesn't explain is Claude Code's own system prompt and tools.\n3. **Check usage.** Every transcript from the last 30 days (including subagents) is scanned for`Skill` calls, MCP tool calls, agent launches and slash commands.\n4. **Diagnose.** Failed and never-authenticated MCP servers, duplicate skill names, skills that lost their description, and single skills with very large descriptions.\n5. **Scope.** A user-scope MCP server loads in every project. If its tools were only ever called from one or two projects, deadweight says which ones, so you can move it to those projects and stop paying for it everywhere else. (A project's`.mcp.json` works too, if the team should share it.)\n\nOn the author's machine, 1.4 GB of transcripts (41 sessions, 400+ subagent runs) are scanned in about a second, in parallel.\n\n- **Read-only by default.** Only`fix` and`undo` write anything, and both ask first.\n- **No secrets are read.** From`.claude.json` deadweight takes only MCP server*names* , never commands, environment variables or headers. A test checks that secret values never reach the output.\n- **Nothing is deleted.** Plugins are disabled in`settings.json` (`enabledPlugins: false` ), not uninstalled. Unused user skills are hidden from the model with`skillOverrides` (`\"user-invocable-only\"` ), so`/name` still runs them;`--park-skills` moves them into the backup folder instead. If none of your claude.ai connectors was used,`disableClaudeAiConnectors` switches them off in Claude Code (they stay connected on claude.ai).\n- **Everything is backed up.** Each`fix` writes a manifest and a copy of`settings.json` to`~/.claude/deadweight/backups/<timestamp>/` .`undo` reverts the latest one.\n- **Conservative.** Plugins that run hooks may be doing useful work deadweight can't see (memory, safety checks), so they are skipped unless you pass`--include-hooked` .`fix` refuses to run with fewer than 5 sessions of history.\n- **No network.** deadweight never makes a network request.\n\nMCP servers in `.claude.json` are never edited, and neither is a single claude.ai connector while you still use others; deadweight prints the command that removes them, or where to move them, instead.\n\n**Does it work with `CLAUDE_CONFIG_DIR`?** Yes, and you can also pass `--config-dir`.\n\n**Why does `fix` skip a plugin I never use?** It runs hooks. Review it, then run `deadweight fix --include-hooked`, or disable it yourself with `/plugin`.\n\n**My usage looks wrong.** Claude Code deletes transcripts older than `cleanupPeriodDays` (30 by default), so deadweight can't see further back than that. Use `--keep` for anything you use rarely but want to keep.\n\n**Is it affiliated with Anthropic?** No. It's an independent open-source tool that reads files Claude Code writes on your machine.\n\nIssues and pull requests are welcome. Start with [CONTRIBUTING.md](https://github.com/msertdev/deadweight/blob/main/CONTRIBUTING.md) and the [good first issues](https://github.com/msertdev/deadweight/labels/good%20first%20issue); the whole codebase is about 2,600 lines of Rust.\n\nIf deadweight misattributes something in your setup, run `deadweight --json`, remove anything private, and open an issue with the relevant part.\n\nIf deadweight saved you tokens, a star helps other people find it. If you'd like to chip in, you can [donate via PayPal](https://www.paypal.me/CansuAvci). Thank you!\n\nMIT © [Murat Sert](https://github.com/msertdev)", "url": "https://wpnews.pro/news/deadweight-what-your-claude-code-setup-costs-on-every-request", "canonical_source": "https://github.com/msertdev/deadweight", "published_at": "2026-11-19 09:14:23+00:00", "updated_at": "2026-11-19 09:47:03.128565+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "ai-products"], "entities": ["deadweight", "Claude Code", "Anthropic", "GitHub", "Playwright", "Linear"], "also_reported_by": [], "takeaway": "Claude Code resends installed plugins, skills, MCP servers and hooks on every request — 19.4k of a 61.2k-token baseline in the example — and once the skill listing passes roughly 30,000 characters, extra skills appear by name only, so hiding unused ones with `deadweight fix` saved ~6.8k tokens per r", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/deadweight-what-your-claude-code-setup-costs-on-every-request", "markdown": "https://wpnews.pro/news/deadweight-what-your-claude-code-setup-costs-on-every-request.md", "text": "https://wpnews.pro/news/deadweight-what-your-claude-code-setup-costs-on-every-request.txt", "jsonld": "https://wpnews.pro/news/deadweight-what-your-claude-code-setup-costs-on-every-request.jsonld"}}