Claude Code Guide

The complete guide to Claude Code setup. 100+ hours saved. 370x optimization. Production-tested patterns for skills, hooks, and MCP integration.

View the Project on GitHub ytrofr/claude-code-guide

Chapter 25: Best Practices Reference

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


Overview

This chapter provides a comprehensive index of Anthropic best practices research, organized by category with extraction status and implementation guidance.


πŸ“Š Index Statistics

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

πŸš€ Priority 1: Critical Patterns (Extracted & Implemented)

Context Engineering

Article: Effective Context Engineering for AI Agents Key Patterns:

Implementation: See memory-bank/always/ (always-loaded) + memory-bank/ondemand/ (on-demand)

Long-Running Agent Harnesses

Article: Effective Harnesses for Long-Running Agents Key Patterns:

Implementation: See SESSION-PROTOCOL.md, system-status.json

Advanced Tool Use

Article: Advanced Tool Use on Claude Developer Platform Key Patterns:

Implementation: See Chapter 20 (Skills Filtering), Entry #198

Writing Effective Tools

Article: Writing Effective Tools for Agents Key Patterns:

Implementation: See Chapter 17-24 (skill patterns)


πŸ€– Skills & Agents Category

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

πŸ› οΈ Context & Tools Category

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

πŸͺ Hooks & Configuration Category

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

πŸ”Œ MCP & Execution Category

Article URL Key Takeaway
Code Execution with MCP Link MCP server patterns
Desktop Extensions Link One-click MCP installation

πŸ’° Cost Optimization Category

Article URL Key Takeaway
Prompt Caching Link 90% cost reduction on repeated loads
Building Effective Agents Link Workflow patterns (3x faster than custom agents)

πŸ“š Claude.com Blog Articles (15)

Skills Category

Hooks & Configuration

Enterprise & Use Cases


🎯 Extraction Workflow

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)"

πŸ“… Maintenance Schedule

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

πŸ”— Cross-Reference with Implementation Guide

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

πŸ“– Official Documentation References

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)


πŸ“Š Implementation Priority Matrix

High ROI (Implement First)

  1. Context Optimization (34% token reduction) - Chapter 21
  2. Skill Detection (100% accuracy) - Chapter 17, 24
  3. Tool Consolidation (733% ROI) - Chapter 20
  4. Session Protocol (3x continuity) - Chapter 12

Medium ROI (Phase 2)

  1. MCP Integration (zero-token validation)
  2. Perplexity Caching (80% cost savings)
  3. Playwright E2E (100% test coverage)

Lower Priority (As-Needed)

  1. Enterprise patterns
  2. Slack integration
  3. Advanced RAG

Most Important Articles (Start Here):

  1. Effective Context Engineering - Foundation pattern
  2. Building Skills for Claude Code - Skill creation
  3. How to Configure Hooks - Automation
  4. Writing Effective Tools - Tool design

Implementation Guide Chapters:


πŸ“ˆ Success Metrics

Metric Target Current Status
Articles indexed 30+ 33 βœ…
Priority 1 extracted 4 4 βœ…
Implementation coverage 80% 85% βœ…
ROI documented 10+ patterns 15+ βœ…

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