Index
4 min read Updated Feb 18, 2026

The Claude Code Setup Guide That Made Me Rethink Everything

An Anthropic hackathon winner's 10-month Claude Code configuration - context management, hooks, subagents, and the principles that actually matter.

An Anthropic hackathon winner publicly shared his Claude Code setup guide yesterday, and I applied every part of it immediately. I spent the entire day on it, and the difference was real.

The guide comes from affaan (@affaanmustafa), who has used Claude Code daily for 10 months. Reading through his configuration, my first thought was: “What have I been doing this whole time?”

The guide is available as a GitHub repo, and its core message is clear: not more, but exactly what you need.

The 200K Context Window Is a Myth - The Real Number Is 70K

Claude Code’s 200K context window is a theoretical maximum. If you load too many MCP servers and plugins, your usable context drops to around 70K.

affaan’s approach:

  1. Configure 14 MCP servers, but only activate 5-6 per project.
  2. Keep fewer than 80 tools enabled simultaneously.

His actual config includes GitHub, Supabase, Vercel, Railway, the Cloudflare series, ClickHouse, and more - 14 servers total. But he explicitly disables the unused ones via disabledMcpServers. After I adopted this pattern, response quality improved noticeably.

Skills vs Hooks vs Subagents - Role Separation Is the Key

These three concepts are confusing at first, but the distinction matters.

  • Skills: Live in ~/.claude/skills. Run an entire workflow with a single command like /refactor-clean.
  • Hooks: Event-driven automation. Auto-format with Prettier after editing .ts files, warn on console.log statements, and more. The hookify plugin lets you generate hooks through conversation.
  • Subagents: Live in ~/.claude/agents. Dedicated roles like planner, architect, tdd-guide, and security-reviewer that handle delegated tasks.

affaan places hooks at three execution points - PreToolUse, PostToolUse, and Stop - automating formatting, type checking, and security audits. This pattern was also endorsed by Boris Cherny.

mgrep and Git Worktrees Are Game Changers

The most impactful practical tips from the guide:

mgrep

More accurate than ripgrep, with built-in web search support. A single command like /mgrep 'function handleSubmit' searches both local files and the web simultaneously.

Git Worktrees

When working on multiple features at once, create independent checkouts and run Claude Code in each one. You can also use /fork to branch conversations. There is ongoing debate about whether worktrees or repo clones are the better approach - both have trade-offs depending on your workflow.

Zed Editor

Built on Rust, so it stays lightweight. The Agent Panel tracks Claude’s file modifications in real time, and CMD+Shift+R executes custom commands instantly.

Rules Structure for Consistency

Modularize ~/.claude/rules by concern:

  • security.md - No hardcoded secrets
  • coding-style.md - Immutability, file structure guidelines
  • testing.md - TDD workflow, 80% coverage minimum
  • git-workflow.md - Commit message format
  • performance.md - Model selection criteria

Add rules like “never commit console.log” here, then enforce them with a Stop hook that audits your changes. Mistakes disappear when automation catches them before they ship.

The Core Principles

affaan distills his philosophy into five principles:

  • Treat configuration like fine-tuning, not architecture. Small, targeted adjustments beat sweeping overhauls.
  • The context window is precious. Disable anything you are not actively using.
  • Leverage parallel execution. Use /fork and worktrees to run agents concurrently.
  • Automate repetitive work. Hooks eliminate manual steps that slow you down.
  • Limit subagent scope. Give each agent a narrow, well-defined responsibility.

Excessive configuration is counterproductive. Keeping only the tools you actually need active is what real productivity looks like. Subtracting is the hardest part for most people, and this guide is a strong reminder of that.

One personal note: for browser automation, I have found Vercel’s agent-browser to be far more stable than Playwright and similar tools mentioned in the original guide. The speed and range of tasks it handles are on a different level.

The full setup is available on affaan’s GitHub repository. Rather than copying it wholesale, understand the reasoning behind each choice and adapt it to your own workflow. That is where the real value lies.

Join the newsletter

Get updates on my latest projects, articles, and experiments with AI and web development.