Summary

A practitioner’s setup guide after 10 months of daily Claude Code use. Covers the foundational infrastructure: skills (workflow shortcuts), hooks (event-driven automations), subagents (scoped parallel workers), rules/memory, MCPs, and plugins. The central theme is context window economics — every configuration decision is ultimately about preserving the 200k context window from tool bloat and irrelevant state.

10 個月 Claude Code 每日使用的實戰設定指南,涵蓋基礎架構:skills(工作流捷徑)、hooks(事件驅動自動化)、subagents(有限工具範圍的平行工作者)、rules/memory、MCPs 和 plugins。核心主題是 context window 經濟學——所有設定決策最終都是為了保護 200k context 不被工具膨脹和無關狀態消耗。

Key Points

  • Skills vs Commands: both are workflow shortcuts; skills live in ~/.claude/skills/ (broader, multi-file), commands in ~/.claude/commands/ (quick slash-invocable prompts)
  • 6 Hook types: PreToolUse, PostToolUse, UserPromptSubmit, Stop, PreCompact, Notification — hooks are the automation layer; unlike skills they fire on tool/lifecycle events, not user invocation
  • Subagents can be scoped to specific tools, MCPs, and permissions — a subagent with only Glob+Grep tools runs cheaper and safer than one with full access
  • MCP rule of thumb: have 20-30 configured, keep under 10 enabled and under 80 active tools — too many MCPs can reduce effective context to ~70k from 200k
  • Plugins bundle tools (skill + MCP combined); LSP plugins give Claude real-time type checking without an IDE
  • Parallel execution: /fork for non-overlapping tasks, git worktrees for isolated parallel Claude instances
  • mgrep > grep: Mixedbread’s mgrep reduces token usage by ~50% compared to ripgrep on search tasks
  • Keyboard shortcuts: ! for bash, @ for file reference, Shift+Enter for multiline, Tab to toggle thinking, Esc Esc to interrupt

Insights

The MCP context window warning is the most practically important point in the article. A 200k context window with too many tools enabled effectively shrinks to 70k — this is a hidden performance degrader that most users don’t monitor. The fix (disable everything unused per project) is simple but requires discipline.

The subagent model selection insight at the end is underappreciated: Haiku vs Opus is a 5x cost difference, while Sonnet vs Opus is only 1.67x. The practical takeaway is to think in terms of Haiku for workers + Opus for orchestrators, skipping Sonnet as the middle tier in cost-optimized setups.

The “codemap updater” skill pattern — an LLM-maintained map of the codebase that updates at checkpoints — is the software engineering equivalent of Karpathy’s wiki index files. Both solve the same problem: how to navigate a large body of content without burning context on full exploration.

Connections

Raw Excerpt

Your 200k context window before compacting might only be 70k with too many tools enabled. Performance degrades significantly. Rule of thumb: Have 20-30 MCPs in config, but keep under 10 enabled / under 80 tools active.