The complete guide to Claude Code setup (Opus 4.6, Sonnet 4.6, Haiku 4.5). 1M token context window. 100+ hours saved. 25 hook events. Agent teams and task management. Production-tested patterns for skills, hooks, and MCP integration.
Created: 2026-01-05 Source: Production Entry #189 (Best Practices Index) Pattern: Research-backed patterns from Anthropic + Claude documentation Coverage: 33 articles indexed, 15 fully extracted
This chapter provides a comprehensive index of Anthropic best practices research, organized by category with extraction status and implementation guidance.
| Metric | Count | Status |
|---|---|---|
| Total Articles | 33 | Indexed β |
| Anthropic Engineering | 18 | Indexed β |
| Claude.com Blog | 15 | Indexed β |
| Fully Extracted | 15 | Implementation-ready |
| Priority 1 IMPLEMENTED | 3 | Production patterns |
Article: Effective Context Engineering for AI Agents Key Patterns:
Implementation: See memory-bank/always/ (always-loaded) + memory-bank/ondemand/ (on-demand)
Article: Effective Harnesses for Long-Running Agents Key Patterns:
Implementation: See SESSION-PROTOCOL.md, system-status.json
Article: Advanced Tool Use on Claude Developer Platform Key Patterns:
Implementation: See Chapter 20 (Skills Filtering), Entry #198
Article: Writing Effective Tools for Agents Key Patterns:
Implementation: See Chapter 17-24 (skill patterns)
| Article | URL | Key Takeaway |
|---|---|---|
| Equipping Agents with Skills | Link | 84% activation rate with numbered triggers |
| Building Agents with Claude Agent SDK | Link | SDK patterns for custom agents |
| Building Effective Agents | Link | Workflow patterns vs custom agents |
| Multi-Agent Research System | Link | Agent coordination patterns |
| Article | URL | Key Takeaway |
|---|---|---|
| Effective Context Engineering | Link | Just-in-time retrieval, hybrid strategy |
| Writing Effective Tools | Link | Pagination defaults, consolidation |
| Advanced Tool Use | Link | Tool Search, PTC, examples |
| The βThinkβ Tool | Link | Extended thinking for complex tasks |
| Contextual Retrieval | Link | RAG optimization patterns |
| Article | URL | Key Takeaway |
|---|---|---|
| How to Configure Hooks | Link | 11 hook events for workflow automation |
| Using CLAUDE.md Files | Link | Project context customization |
| Building Skills for Claude Code | Link | Skill creation workflow |
| Article | URL | Key Takeaway |
|---|---|---|
| Code Execution with MCP | Link | MCP server patterns |
| Desktop Extensions | Link | One-click MCP installation |
| Article | URL | Key Takeaway |
|---|---|---|
| Prompt Caching | Link | 90% cost reduction on repeated loads |
| Building Effective Agents | Link | Workflow patterns (3x faster than custom agents) |
When extracting patterns from new articles:
EXTRACTION_WORKFLOW:
Step_1: "WebFetch(url, 'Extract key patterns, rules, anti-patterns, code examples')"
Step_2: "Pattern analysis (5 min)"
Step_3: "Cross-reference check (3 min)"
Step_4: "Create entry if new patterns (15 min)"
Step_5: "Update this index with extraction status (2 min)"
Step_6: "Update implementation guide if significant (10 min)"
| Frequency | Task |
|---|---|
| Weekly | Check for new Anthropic blog posts |
| Monthly | Review extraction priorities based on active work |
| Quarterly | Validate existing entries still align with latest research |
| Chapter | Related Research |
|---|---|
| Chapter 13: Claude Code Hooks | How to Configure Hooks |
| Chapter 17: Skill Detection | Equipping Agents with Skills |
| Chapter 20: Skills Filtering | Advanced Tool Use, Writing Tools |
| Chapter 21: Pre-prompt Optimization | Effective Context Engineering |
| Chapter 24: Keyword Enhancement | Skills patterns + context engineering |
| Chapter 36: Agents and Subagents | Building Effective Agents, Agent SDK |
| Chapter 37: Agent Teams | Multi-Agent Research System |
| Chapter 38: Context Costs & Budget | Best Practices, Skills, Features Overview |
These are pages from Anthropicβs official Claude Code documentation site (code.claude.com) that cover core concepts referenced throughout this guide:
| Documentation Page | URL | Key Topics |
|---|---|---|
| Best Practices | Link | Context management, CLAUDE.md pruning, verification patterns, subagent best practices |
| Sub-agents | Link | Agent memory (project/user), skills preloading, permission modes, hooks for agents |
| Skills | Link | Description budget (2% / SLASH_COMMAND_TOOL_CHAR_BUDGET), description format, disable-model-invocation, context: fork |
| Features Overview | Link | Context cost table (what loads when), comparison of extension points (skills vs agents vs hooks vs MCP) |
Related chapters: Chapter 36 (agents), Chapter 38 (context costs & skill budget), Chapter 20 (skill filtering)
Most Important Articles (Start Here):
Implementation Guide Chapters:
| Metric | Target | Current | Status |
|---|---|---|---|
| Articles indexed | 30+ | 33 | β |
| Priority 1 extracted | 4 | 4 | β |
| Implementation coverage | 80% | 85% | β |
| ROI documented | 10+ patterns | 15+ | β |
A systematic approach to auditing your Claude Code setup against official documentation:
Review all pages at code.claude.com/docs/en/:
Run verification commands to count what you have:
# Skills with each feature
grep -rl "^model:" .claude/skills/*/SKILL.md | wc -l
grep -rl "^allowed-tools:" .claude/skills/*/SKILL.md | wc -l
grep -rl "^context: fork" .claude/skills/ | wc -l
# Agent features
grep -rl "^memory:" .claude/agents/*.md | wc -l
grep -rl "^skills:" .claude/agents/*.md | wc -l
grep -rl "^permissionMode:" .claude/agents/*.md | wc -l
# Global agents
ls ~/.claude/agents/*.md 2>/dev/null | wc -l
# Hook types
grep -c '"type": "prompt"' .claude/settings.json
grep -c '"async": true' .claude/settings.json
Compare features available in docs vs features youβre using. Common gaps:
paths: YAML frontmatter in rules files (conditional loading)memory: field on agents (cross-session learning)skills: preloading on agents (faster startup)model: field on skills (cost optimization)allowed-tools: on read-only skills (safety)!command`` dynamic injection in skills (live context)~/.claude/agents/ (cross-project reuse)| Priority | Feature | Impact | Effort |
|---|---|---|---|
| P0 | Path-specific rules | HIGH (reduces context per message) | 1h |
| P0 | Agent memory | HIGH (cross-session learning) | 30min |
| P1 | Skills model: field | MEDIUM (cost savings) | 2h |
| P1 | Dynamic injection | HIGH (live context) | 2h |
| P2 | Prompt-based hooks | MEDIUM (intelligent validation) | 2h |
| P2 | allowed-tools | LOW (safety improvement) | 1h |
Reference: Entry #363 implemented 11 gaps across 120+ files in ~25 hours total.
Research Authority: Anthropic engineering + Claude.com blog Sacred Compliance: All patterns validated against Sacred Commandments ROI: 50-100h/year saved with research-backed patterns vs trial-and-error Updates: Monthly review of new Anthropic publications