Summary

A practitioner’s audit of 18 high-impact Claude configuration settings across claude.ai (8), Claude Code settings.json (7), and the Anthropic API/Console (3). The article covers undocumented and hidden settings that control memory scope, inference cost, context bloat, and permission boundaries. The author claims fixing these settings reduced an API bill from 87/month.

本文系統整理了 18 個高影響力的 Claude 設定,涵蓋 claude.ai 介面、Claude Code settings.json(共 125+ 個鍵,官方文件僅涵蓋約 40 個)與 API/Console 三個層面。作者主張這些設定是決定輸出品質與費用的關鍵,遠比模型選擇重要。

Key Points

  • Memory: enable project-scoped memory to prevent context drift; use exclusion lists for sensitive topics; inline “forget what you remembered about X” command works without UI
  • Extended Thinking: set default to Light mode; Full only for math/debugging/multi-step planning — saves 18-25% Opus token spend
  • Custom Styles are output contracts (200-1500 word instruction files), not tone toggles
  • enabledPlugins: false keeps plugin installed but unloaded — avoids 3-8K token pre-charge per unused plugin
  • permissions.deny has a known bug (anthropics/claude-code#11544) — add OS-level chmod 600 as second layer
  • hooks.SessionStart with branch-aware context loader cuts context bloat by 30%
  • cleanupPeriodDays: 180 (not default 30) gives 6x more signal for Dreaming/memory consolidation
  • cache_control breakpoint must go after static system prompt, not after user message — wrong placement gives partial cache hits only; 1h TTL available for daily-stable prefixes
  • inference_geo adds 10% premium on Opus 4.7+ — omit unless compliance actually requires it

Insights

The audit script pattern (running weekly to flag settings drift) treats configuration as a system that degrades over time, which matches the actual experience of accumulating MCP servers and plugins. The framing of Custom Styles as “output contracts” rather than tone preferences is a meaningful reframe — it suggests treating them like typed interfaces rather than stylistic preferences, enabling structural enforcement across all responses in a workflow.

Connections

Raw Excerpt

“Anthropic shipped 125+ keys to Claude Code’s settings.json. The official docs cover roughly 40. 14 of the missing ones live 3 clicks deep in the Claude.ai UI. 4 of them don’t appear in any documentation at all.”