本文由 AI 分析生成
建立時間: 2026-05-30 來源: https://x.com/Mnilax/status/2058269663788736907
Summary
A practical audit of 18 high-impact Claude configuration settings across three surfaces: Claude.ai (8 settings), Claude Code settings.json (7 settings), and the Anthropic API/Console (3 settings). The author identifies that Anthropic ships 125+ settings.json keys but documents only ~40. Key findings include cache_control breakpoint placement as the single largest cost lever (a 87), and context bloat from unused plugins/MCP servers consuming 25-40K tokens before any work begins.
針對 Claude 三個設定介面進行的實戰審計,包含 18 個高影響力設定。最大成本槓桿是 cache_control 斷點位置(月費從 87)。背景膨脹問題:未使用的插件和 MCP 伺服器在任何工作開始前就消耗 25-40K tokens。
Key Points
- Memory drift: after 4-6 weeks, default memory accumulates stale project-specific context that degrades output quality; fix with project-scoped memory
- Extended Thinking at “Light” setting saves 18-25% Opus token spend vs always-on “Full”
- SessionStart hook with branch-aware context loading (
context-$(git branch --show-current).md) cuts context bloat by 30% - cache_control breakpoint must be placed AFTER stable system prompt (not after user message) for full cache hits; crossover is 2+ reads within TTL
- permissions.deny has a known bug — enforce OS-level protection (chmod 600 .env) as backup
- cleanupPeriodDays: 180 (default 30) gives Dreaming 6× more session history for pattern learning
- inference_geo US-only data residency adds 10% premium on Opus 4.7+; skip if requirement is “aspirational” not contractual
Insights
The audit reveals that Claude Code’s token economy is adversarial by default — every plugin, MCP server, and loaded skill competes for context budget before any user prompt is processed. The branch-aware SessionStart hook is an elegant solution: rather than one bloated global CLAUDE.md, each git branch loads a purpose-specific context file. The inference_geo finding is a hidden cost most teams never audit — legal teams often request regional residency “to be safe” when contractual requirements don’t actually require it.
Connections
Raw Excerpt
The answer: also get the $200/month Codex plan. Install the Codex CLI, and Compound Engineering can build with Codex credits instead.