Affaan Mustafa's Everything Claude Code

Table of content
Affaan Mustafa's Everything Claude Code

Affaan Mustafa is a multi-time founder and former AI/ML researcher now working as Product Lead at PMX Trade in San Francisco. He won the Anthropic x Forum Ventures hackathon in September 2025 building zenith.chat using Claude Code, then released his entire configuration as Everything Claude Code for others to learn from.

X/Twitter | GitHub | Site

Background

Mustafa has been using Claude Code since its experimental rollout in early 2025. His academic work focused on applied math and computational research at the University of Washington, with publications on market manipulation analysis and trading frameworks.

His production experience includes:

When his configurations thread hit 900,000 views on X, JP Caparas wrote an explainer that broke down the methodology for developers who wanted to adopt it.

The Repository Structure

Everything Claude Code bundles production configs across six categories:

ComponentPurpose
agents/Specialized subagents for delegation
skills/Domain knowledge and workflow definitions
commands/Slash commands for quick execution
rules/Always-follow guidelines
hooks/Event-triggered automations
mcp-configs/MCP server configurations

Install by copying to your ~/.claude/ directories and merging hooks into ~/.claude/settings.json.

Subagent Architecture

Mustafa uses nine specialized agents that Claude can delegate tasks to:

AgentResponsibility
plannerFeature implementation planning
architectSystem design decisions
code-reviewerQuality and standards evaluation
security-reviewerVulnerability analysis
tdd-guideTest-driven development guidance
e2e-runnerPlaywright testing automation
build-error-resolverCompilation issue fixes
refactor-cleanerDead code removal
doc-updaterDocumentation synchronization

The delegation model keeps each agent focused. Instead of one overloaded context, specialized agents handle their domain with targeted knowledge.

Context Window Management

Mustafa’s most cited advice: Don’t enable all MCPs at once.

From his guide:

“Your 200k context window can shrink to 70k with too many tools enabled.”

His recommended limits:

ResourceMaximum
Configured MCPs20-30
Enabled per projectUnder 10
Active toolsUnder 80

Use disabledMcpServers in project config to disable unused MCPs. This preserves context for the code and conversation that matter.

Hook Examples

Hooks trigger automated behaviors on tool use. One example from his config warns about debug statements:

{
  "PreToolUse": [{
    "matcher": "Write|Edit",
    "hooks": [{
      "type": "command",
      "command": "check_for_console_log"
    }]
  }]
}

This fires before any write operation, catching console.log statements before they reach production code.

Slash Commands

Quick-access commands for common workflows:

CommandAction
/tddStart test-driven development cycle
/planGenerate implementation plan
/e2eRun end-to-end tests
/code-reviewTrigger code review agent
/build-fixResolve build errors
/refactor-cleanClean up dead code

Commands invoke the appropriate agent with pre-configured context.

Rules and Constraints

The rules/ directory contains modular constraint files:

Rules load automatically, so Claude follows them without prompting.

Key Takeaways

PrincipleImplementation
Specialize agentsNine focused subagents vs one overloaded context
Preserve context windowDisable unused MCPs per project
Automate constraintsHooks and rules enforce standards
Quick accessSlash commands for common workflows
Document everythingGuides explain the “why” behind configs

Next: Jesse Vincent’s Superpowers Framework

Topics: claude-code ai-coding plugins context-engineering