Affaan Mustafa's Everything Claude Code
Table of content

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.
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:
- Core contributor to elizaOS (17,400+ GitHub stars)
- Built autonomous Solana trading agents processing millions in volume
- Co-founded 0em Labs building the “inbox0” MCP marketplace
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:
| Component | Purpose |
|---|---|
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:
| Agent | Responsibility |
|---|---|
planner | Feature implementation planning |
architect | System design decisions |
code-reviewer | Quality and standards evaluation |
security-reviewer | Vulnerability analysis |
tdd-guide | Test-driven development guidance |
e2e-runner | Playwright testing automation |
build-error-resolver | Compilation issue fixes |
refactor-cleaner | Dead code removal |
doc-updater | Documentation 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:
| Resource | Maximum |
|---|---|
| Configured MCPs | 20-30 |
| Enabled per project | Under 10 |
| Active tools | Under 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:
| Command | Action |
|---|---|
/tdd | Start test-driven development cycle |
/plan | Generate implementation plan |
/e2e | Run end-to-end tests |
/code-review | Trigger code review agent |
/build-fix | Resolve build errors |
/refactor-clean | Clean up dead code |
Commands invoke the appropriate agent with pre-configured context.
Rules and Constraints
The rules/ directory contains modular constraint files:
- Security rules: Input validation, auth requirements
- Coding style: Language-specific conventions
- Testing rules: 80% coverage minimum
- Git workflow: Commit message format, branch naming
- Agent delegation: When to hand off to specialists
Rules load automatically, so Claude follows them without prompting.
Key Takeaways
| Principle | Implementation |
|---|---|
| Specialize agents | Nine focused subagents vs one overloaded context |
| Preserve context window | Disable unused MCPs per project |
| Automate constraints | Hooks and rules enforce standards |
| Quick access | Slash commands for common workflows |
| Document everything | Guides explain the “why” behind configs |
Links
Next: Jesse Vincent’s Superpowers Framework
Get updates
New guides, workflows, and AI patterns. No spam.
Thank you! You're on the list.