{
 "topic": "claude-code-lighter-and-faster",
 "url": "https://stacks.jakubdudek.com/claude-code-lighter-and-faster",
 "title": "How to make Claude Code lighter and faster (context, cache, subagents, tools)",
 "description": "What really cuts usage and context in Claude Code: measuring with /usage, CLAUDE.md, MCP versus CLI, trimming tool output, subagents, plugins and the cache.",
 "aliases": [
  "optimisation",
  "slimming down",
  "context",
  "tokens",
  "limits",
  "usage",
  "cache",
  "prompt cache",
  "subagents",
  "plugins",
  "MCP",
  "CLI",
  "CLAUDE.md",
  "harness",
  "/usage",
  "/context",
  "compact instructions"
 ],
 "domain": "ai",
 "created": "2026-11-18",
 "last_checked": "2026-11-18",
 "claims": [
  {
   "ref": "claude-code-lighter-and-faster#c1",
   "url": "https://stacks.jakubdudek.com/claude-code-lighter-and-faster/c1",
   "card": "claude-code-lighter-and-faster",
   "id": "c1",
   "status": "valid",
   "claim": "On a plan, /usage shows the share of usage that goes to skills, subagents, plugins and MCP servers.",
   "quote": "recent usage attributed to skills, subagents, plugins, and individual MCP servers, each shown as a percentage of the total.",
   "source_url": "https://code.claude.com/docs/en/costs",
   "tier": "T1",
   "checked": "2026-11-18",
   "valid_until": "2026-12-18"
  },
  {
   "ref": "claude-code-lighter-and-faster#c2",
   "url": "https://stacks.jakubdudek.com/claude-code-lighter-and-faster/c2",
   "card": "claude-code-lighter-and-faster",
   "id": "c2",
   "status": "valid",
   "claim": "A subagent is the most expensive way to do a small task: +578% input tokens.",
   "quote": "A subagent is the most expensive way to do a small task: 534,125 input tokens (+578%)",
   "source_url": "https://doi.org/10.5281/zenodo.23465633",
   "tier": "T2",
   "checked": "2026-11-18",
   "valid_until": "2026-12-18"
  },
  {
   "ref": "claude-code-lighter-and-faster#c3",
   "url": "https://stacks.jakubdudek.com/claude-code-lighter-and-faster/c3",
   "card": "claude-code-lighter-and-faster",
   "id": "c3",
   "status": "valid",
   "claim": "Installed plugins cost tokens even when they are not used.",
   "quote": "Installed plugins cost tokens even when unused.",
   "source_url": "https://doi.org/10.5281/zenodo.23465633",
   "tier": "T2",
   "checked": "2026-11-18",
   "valid_until": "2026-12-18"
  },
  {
   "ref": "claude-code-lighter-and-faster#c4",
   "url": "https://stacks.jakubdudek.com/claude-code-lighter-and-faster/c4",
   "card": "claude-code-lighter-and-faster",
   "id": "c4",
   "status": "valid",
   "claim": "Anthropic recommends keeping CLAUDE.md under 200 lines.",
   "quote": "Aim to keep CLAUDE.md under 200 lines by including only essentials",
   "source_url": "https://code.claude.com/docs/en/costs",
   "tier": "T1",
   "checked": "2026-11-18",
   "valid_until": "2026-12-18"
  },
  {
   "ref": "claude-code-lighter-and-faster#c5",
   "url": "https://stacks.jakubdudek.com/claude-code-lighter-and-faster/c5",
   "card": "claude-code-lighter-and-faster",
   "id": "c5",
   "status": "valid",
   "claim": "CLI tools are more context-efficient than MCP servers.",
   "quote": "are still more context-efficient than MCP servers because they don’t add any per-tool listing.",
   "source_url": "https://code.claude.com/docs/en/costs",
   "tier": "T1",
   "checked": "2026-11-18",
   "valid_until": "2026-12-18"
  },
  {
   "ref": "claude-code-lighter-and-faster#c6",
   "url": "https://stacks.jakubdudek.com/claude-code-lighter-and-faster/c6",
   "card": "claude-code-lighter-and-faster",
   "id": "c6",
   "status": "valid",
   "claim": "A hook can cut a long log down to its errors alone, from tens of thousands of tokens to hundreds.",
   "quote": "Instead of Claude reading a 10,000-line log file to find errors, a hook can grep for `ERROR` and return only matching lines, reducing context from tens of thousands of tokens to hundreds.",
   "source_url": "https://code.claude.com/docs/en/costs",
   "tier": "T1",
   "checked": "2026-11-18",
   "valid_until": "2026-12-18"
  },
  {
   "ref": "claude-code-lighter-and-faster#c7",
   "url": "https://stacks.jakubdudek.com/claude-code-lighter-and-faster/c7",
   "card": "claude-code-lighter-and-faster",
   "id": "c7",
   "status": "valid",
   "claim": "The first message after a pause longer than the cache lifetime reprocesses the whole context.",
   "quote": "misses the cache and reprocesses your full context",
   "source_url": "https://code.claude.com/docs/en/costs",
   "tier": "T1",
   "checked": "2026-11-18",
   "valid_until": "2026-12-18"
  },
  {
   "ref": "claude-code-lighter-and-faster#c8",
   "url": "https://stacks.jakubdudek.com/claude-code-lighter-and-faster/c8",
   "card": "claude-code-lighter-and-faster",
   "id": "c8",
   "status": "valid",
   "claim": "A Compact instructions section in CLAUDE.md tells compaction what to keep.",
   "quote": "When you are using compact, please focus on test output and code changes",
   "source_url": "https://code.claude.com/docs/en/costs",
   "tier": "T1",
   "checked": "2026-11-18",
   "valid_until": "2026-12-18"
  }
 ],
 "as_of": "2026-12-04",
 "note": "A claim says what its source said on the day it was checked. \"valid_until\" is the date by which it should be checked again, not a promise that it is true today.",
 "license": "CC BY 4.0",
 "author": "Jakub Dudek",
 "conclusions": "Measure first: on a subscription plan `/usage` shows what share of usage goes to skills, subagents, plugins and each MCP server [c1]. Optimising without it is guesswork.\n\nThe largest cost is usually the Claude Code harness itself, not the task. In the TokenSave measurement on a simple task the subagent was the most expensive route: +578% input tokens [c2]. Installed plugins cost tokens even when none was used [c3]. A subagent pays off on a large, noisy task, not on a small one.\n\nStanding context: Anthropic's documentation recommends a CLAUDE.md under 200 lines [c4] and CLI tools (gh, aws) over MCP servers, because a CLI adds no tool listing [c5]. Long tool results are better trimmed by a hook that returns only the errors than read as whole logs [c6].\n\nCache: after a pause longer than the cache lifetime, the first message reprocesses the whole context [c7]. Compaction can be steered with a `# Compact instructions` section in CLAUDE.md, which says what to keep [c8].",
 "history": []
}
