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.
The complete guide to Claude Code setup, skills, hooks, and MCP integration.
Production-tested Claude Code patterns. 240+ documented patterns, 100+ hours saved per year.
| Models: Opus 4.6 | Sonnet 4.6 | Haiku 4.5 – 1M token context window – 25 hook events – Agent teams & task management |
One command to install production-tested best practices into any project:
# Core install (rules + best practices doc)
curl -sL https://raw.githubusercontent.com/ytrofr/claude-code-guide/master/install.sh | bash
# Full install (rules + skills + commands + all 19 rules)
git clone https://github.com/ytrofr/claude-code-guide.git
cd claude-code-guide
./install.sh --full /path/to/your-project
# Everything including hooks + settings.json
./install.sh --with-hooks /path/to/your-project
# Install globally (applies to ALL your projects)
./install.sh --global
# Update to latest version
bash .claude/best-practices/update.sh
| Tier | Command | What’s Installed |
|---|---|---|
| Core | ./install.sh |
6 rules + BEST-PRACTICES.md + CLAUDE.md import |
| Full | --full |
Core + 19 rules + 3 skills + 5 slash commands |
| With Hooks | --with-hooks |
Full + 4 hooks + settings.json |
| Flag | What it Installs |
|---|---|
--skills |
3 starter skills to ~/.claude/skills/ (global, auto-discovered) |
--commands |
5 slash commands (/session-start, /advise, etc.) |
--hooks |
4 hook scripts + settings.json (formatting, skill detection) |
--all-rules |
All 19 rules across 9 categories (global, planning, quality, etc.) |
Claude Code will immediately apply all best practices in every session after installation.
See install.sh for all options including --update, --uninstall, --global.
| Metric | Result |
|---|---|
| Context Window | 1M tokens |
| Models | Opus 4.6, Sonnet 4.6, Haiku 4.5 |
| Time Saved | 100+ hours/year |
| Hooks | 25 events automated |
| Skills | 240+ native loading |
| Token Savings | 47-70% per branch |
| Production Skills | 240+ documented |
| MCP Integrations | 13 servers, 70+ tools |
Source: 14+ months of production use with 97 components validated.
# 1. Clone the template
cp -r template/ ~/my-project/.claude
cd ~/my-project
# 2. Validate structure
./scripts/validate-setup.sh
# 3. Add skills (Claude Code discovers them automatically)
cp -r template/.claude/skills/ ~/.claude/skills/
# 4. Configure MCP servers
cp .claude/mcp_servers.json.template .claude/mcp_servers.json
# Add your GitHub token
# 5. Start Claude Code
claude
| Detailed walkthrough: Quick Start Guide | Skills System |
Claude Code is Anthropic’s official CLI for AI-powered coding assistance, powered by Opus 4.6, Sonnet 4.6, and Haiku 4.5 with a 1M token context window. It provides an interactive terminal experience where Claude can read files, write code, run commands, manage tasks, and coordinate agent teams. Claude Code understands your project context through CLAUDE.md files and can be extended with hooks, skills, and MCP servers.
Install via the official installer: curl -fsSL https://claude.ai/install.sh | sh (or claude update if already installed). Create a CLAUDE.md file in your project root with project-specific instructions. Optionally add hooks in .claude/hooks/ for automation, skills in ~/.claude/skills/ for reusable workflows, and MCP servers for database/API access. Our template provides all these pre-configured.
Hooks are shell scripts that run automatically at specific points in the Claude Code lifecycle. There are 25 hook events (PreToolUse, PostToolUse, SessionStart, SessionEnd, etc.) that can validate inputs, block dangerous operations, auto-format code, and run background analytics. See our Complete Hooks Guide.
MCP (Model Context Protocol) extends Claude Code with external tools. Connect to PostgreSQL databases, GitHub repositories, memory systems, and APIs. This guide covers 13 MCP servers with 70+ tools including PostgreSQL, GitHub, Perplexity, Playwright, and Basic Memory for persistent knowledge storage.
Skills are Markdown files with YAML frontmatter (name: and description: with “Use when…” clause). Claude Code natively discovers all skills from ~/.claude/skills/ and matches them to queries using the description field. No custom hooks needed – skills are built into Claude Code. Our system runs 240+ production skills with native activation.
The memory bank is a hierarchical knowledge system using a 4-tier structure: always (auto-loaded), learned (patterns), ondemand (blueprints), and reference (archives). It stores project context, decisions, and patterns for efficient token usage. Properly configured, it provides 34-62% token reduction while maintaining full context access.
Based on production metrics: 100+ hours per year in developer time. Key achievements include 240+ proven patterns, 47-70% token savings per branch, 25 hook events for automation, and 80%+ research cost savings with Perplexity caching. ROI scales with project complexity.
.claude/rules/claude-code-guide/
├── install.sh # One-command best practices installer
├── best-practices/ # Installable best practices package
│ ├── BEST-PRACTICES.md # Universal best practices document
│ ├── rules/ # 6 universal rules (project-agnostic)
│ └── VERSION # Version tracking for updates
├── docs/ # Complete documentation
│ ├── quick-start.md # 30-minute setup
│ ├── skill-activation-system.md
│ └── guide/ # 59 detailed guides
├── template/ # Clone-and-go starter (full setup)
│ ├── .claude/ # Pre-configured setup
│ │ ├── CLAUDE.md # Project context
│ │ ├── hooks/ # 9 automation scripts
│ │ ├── rules/ # 19 rules across 9 categories
│ │ └── skills/ # Starter skills
│ └── memory-bank/ # Knowledge hierarchy
├── skills-library/ # 20+ proven workflows
├── mcp-configs/ # MCP server configs
├── scripts/ # Setup & validation
├── examples/ # Real-world examples
└── web/ # Interactive checklist
| Aspect | This Guide |
|---|---|
| Production-Tested | 240+ patterns from real systems |
| Evidence-Based | Every claim backed by metrics |
| Team-Ready | Shared vs personal configuration |
| Phased Approach | Value in 30 minutes |
| Validation-First | Scripts catch 90% of mistakes |
Source Project: Production system (97 components) Research: Anthropic Claude 4 Best Practices + Sionic AI Skills Framework Marketplace: wshobson/agents - 273 components Official Docs: code.claude.com/docs Created: December 2024 Updated: April 2026
MIT License - See LICENSE
Getting Started
Core Systems
Advanced Topics
Built with lessons from 14+ months of production Claude Code usage.