A few days ago, a thread titled "The Shorthand Guide to Everything Claude Code" hit 900,000 views on X. Over 10,000 people bookmarked it. The author, Affaan Mustafa, had distilled 10 months of daily Claude Code usage into a single, densely practical post covering skills, hooks, subagents, MCPs, plugins, and the configuration that actually matters.
He's been using Claude Code since the experimental rollout back in February, and he won a hackathon in NYC building with it. So when I saw Affaan's guide blow up, I paid attention. Not because it was hype, but because it wasn't. This was someone sharing what actually works after grinding through the same learning curve the rest of us have.
Here's a breakdown of what's in that guide, who wrote it, and what else we can squeeze out of it.
Who is Affaan Mustafa?
Before we get into the technical stuff, it helps to know who wrote this.

Affaan (who goes by "cogsec" on X) is a 21-year-old builder based in Seattle. He's been shipping products since he was 18, when he founded a Microsoft-backed AI startup called DCUBE. Since then, he's built autonomous trading agents on Solana (one hit $38M FDV with 70,000 concurrent viewers watching him code live), contributed to elizaOS (a 17,000+ star framework), and dropped out of a PhD track at the University of Washington to keep building.
Most relevant to this guide: he won the Anthropic x Forum Ventures hackathon in NYC in September 2025, alongside David Rodriguez. They built Zenith, an AI-powered customer discovery platform, entirely using Claude Code. The prize included $15,000 in Anthropic credits (which anyone with that mind can burn through in less than a week).

So when he says "here's my complete setup after 10 months of daily use," he's not theorising. He's documenting what survived the pressure of a hackathon and months of real work.
The building blocks
Affaan's guide covers six core concepts. If you're new to Claude Code, here's what each one does and why it matters.
Concept: Skills and commands
Skills are markdown files that give Claude specialised knowledge for specific workflows. Think of them as reusable prompts you can invoke when needed.
They live in ~/.claude/skills/ (for personal use across all projects) or .claude/skills/ (for project-specific stuff). You can chain them together in a single prompt. Affaan's example: /refactor-clean after a long coding session to strip out dead code and loose markdown files.
Commands are similar but executed via slash commands. The distinction is mostly about storage and invocation style. The official docs cover this at docs.anthropic.com/en/docs/claude-code/skills.
# Example skill structure
~/.claude/skills/
pmx-guidelines.md # Project-specific patterns
coding-standards.md # Language best practices
tdd-workflow/ # Multi-file skill with README.md
security-review/ # Checklist-based skillConcept: Hooks
Hooks are trigger-based automations that fire on specific events during Claude's execution. Unlike skills (which are about knowledge), hooks are about actions.
There are six hook types:
- PreToolUse — runs before a tool executes (great for validation or reminders)
- PostToolUse — runs after a tool finishes (for formatting, logging, feedback loops)
- UserPromptSubmit — fires when you send a message
- Stop — triggers when Claude finishes responding
- PreCompact — runs before context compaction
- Notification — handles permission requests
Affaan's practical example: a hook that reminds you to use tmux before running long commands like npm install or pytest. If you're not in a tmux session, it warns you so your process doesn't die if the terminal disconnects.
{
"PreToolUse": [
{
"matcher": "tool == \"Bash\" && tool_input.command matches \"(npm|pnpm|yarn|cargo|pytest)\"",
"hooks": [
{
"type": "command",
"command": "if [ -z \"$TMUX\" ]; then echo '[Hook] Consider tmux for session persistence' >&2; fi"
}
]
}
]
}The official hooks documentation is at docs.anthropic.com/en/docs/claude-code/hooks.
Pro tip from the guide: use the
hookifyplugin to create hooks conversationally instead of writing JSON manually. Run/hookifyand describe what you want.
Concept: Subagents
Subagents are processes your main Claude instance can delegate tasks to. They run with limited scopes and their own context, which frees up your main agent to focus on orchestration.
This is where it gets interesting. A subagent can be sandboxed with specific tool permissions and assigned a subset of your skills. Need a code review? Spawn a code-reviewer subagent. Need security analysis? security-reviewer. They work in parallel without bloating your main context.
# Example subagent structure
~/.claude/agents/
planner.md # Feature implementation planning
architect.md # System design decisions
tdd-guide.md # Test-driven development
code-reviewer.md # Quality/security review
security-reviewer.md # Vulnerability analysis
build-error-resolver.md
e2e-runner.md
refactor-cleaner.mdSee docs.anthropic.com/en/docs/claude-code/sub-agents for the full picture.
Concept: Rules and memory
Rules are your guardrails. Your .rules folder holds markdown files with best practices Claude should always follow. You can either dump everything into a single CLAUDE.md file or break it into modular files grouped by concern.
Affaan's rules structure:
~/.claude/rules/
security.md # No hardcoded secrets, validate inputs
coding-style.md # Immutability, file organisation
testing.md # TDD workflow, 80% coverage
git-workflow.md # Commit format, PR process
agents.md # When to delegate to subagents
performance.md # Model selection, context managementExample rules he mentions: no emojis in the codebase, no purple hues in frontend, always test before deployment, never commit console.logs.
The memory system uses CLAUDE.md files at three levels:
- Project:
./CLAUDE.md(shared with your team) - User:
~/.claude/CLAUDE.md(personal, applies to all projects) - Project-specific user:
.claude/CLAUDE.md
Details at docs.anthropic.com/en/docs/claude-code/memory.
Concept: MCPs (Model Context Protocol)
MCPs connect Claude to external services. Not a replacement for APIs, but a prompt-driven wrapper around them that gives Claude more flexibility in navigating information.
Affaan's example: the Supabase MCP lets Claude pull specific data and run SQL directly without copy-paste. Same pattern works for databases, deployment platforms, GitHub, and more.
Here's the critical bit from his guide:
Your 200k context window before compacting might only be 70k with too many tools enabled. Performance degrades significantly.
This is the most important insight for anyone loading up on MCPs. Every MCP you enable adds tools to Claude's context. Too many tools means less room for actual code and conversation.
Rule of thumb: Have 20–30 MCPs in your config, but keep under 10 enabled at any time. Under 80 tools active.
Navigate to /plugins and scroll down, or run /mcp to see what's currently enabled.
The official MCP overview is at docs.anthropic.com/en/docs/claude-code/mcp.
Concept: Plugins
Plugins package tools for easy installation. A plugin can be a skill + MCP combined, or hooks and tools bundled together.
To install from a marketplace:
# Add a marketplace
claude plugin marketplace add https://github.com/mixedbread-ai/mgrep
# Then open Claude, run /plugins, find the new marketplace, install from thereLSP plugins are handy if you run Claude Code outside editors. Language Server Protocol gives Claude real-time type checking, go-to-definition, and intelligent completions without needing an IDE open.
Same warning as MCPs: watch your context window.
The stuff that actually matters

Beyond the building blocks, Affaan's guide includes practical tips that separate casual users from people who actually ship with this thing.
Keyboard shortcuts
Ctrl+U- delete entire line (faster than backspace spam)!- quick bash command prefix@- search for files/- initiate slash commandsShift+Enter- multi-line inputTab- toggle thinking displayEsc Esc- interrupt Claude or restore code
Parallel workflows
Two approaches for running multiple Claude instances without conflicts:
/fork- fork conversations to do non-overlapping tasks in parallel instead of queuing messages- Git worktrees — for overlapping parallel work. Each worktree is an independent checkout.
git worktree add ../feature-branch feature-branch
# Now run separate Claude instances in each worktreetmux for long-running commands
Stream and watch logs from processes Claude runs:
tmux new -s dev
# Claude runs commands here, you can detach and reattach
tmux attach -t devmgrep over grep
mgrep is noticeably better than ripgrep or grep. Install via plugin marketplace, then use the /mgrep skill. Works with both local and web search.
mgrep "function handleSubmit" # Local search
mgrep --web "Next.js 15 app router changes" # Web searchOther useful commands
/rewind- go back to a previous state/statusline- customise with branch, context %, todos/checkpoints- file-level undo points/compact- manually trigger context compaction
His actual setup
This is where the guide gets concrete. Affaan shares his exact configuration.
Plugins (typically 4–5 enabled at a time):
ralph-wiggum@claude-code-plugins # Loop automation
frontend-design@claude-code-plugins # UI/UX patterns
commit-commands@claude-code-plugins # Git workflow
security-guidance@claude-code-plugins # Security checks
pr-review-toolkit@claude-code-plugins # PR automation
typescript-lsp@claude-plugins-official # TS intelligence
hookify@claude-plugins-official # Hook creation
code-simplifier@claude-plugins-official
feature-dev@claude-code-plugins
explanatory-output-style@claude-code-plugins
code-review@claude-code-plugins
context7@claude-plugins-official # Live documentation
pyright-lsp@claude-plugins-official # Python types
mgrep@Mixedbread-Grep # Better searchMCP servers (configured at user level):
{
"github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"] },
"firecrawl": { "command": "npx", "args": ["-y", "firecrawl-mcp"] },
"supabase": {
"command": "npx",
"args": ["-y", "@supabase/mcp-server-supabase@latest", "--project-ref=YOUR_REF"]
},
"memory": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-memory"] },
"sequential-thinking": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
},
"vercel": { "type": "http", "url": "https://mcp.vercel.com" },
"railway": { "command": "npx", "args": ["-y", "@railway/mcp-server"] },
"cloudflare-docs": { "type": "http", "url": "https://docs.mcp.cloudflare.com/mcp" },
"cloudflare-workers-bindings": {
"type": "http",
"url": "https://bindings.mcp.cloudflare.com/mcp"
},
"cloudflare-workers-builds": { "type": "http", "url": "https://builds.mcp.cloudflare.com/mcp" },
"cloudflare-observability": {
"type": "http",
"url": "https://observability.mcp.cloudflare.com/mcp"
},
"clickhouse": { "type": "http", "url": "https://mcp.clickhouse.cloud/mcp" },
"AbletonMCP": { "command": "uvx", "args": ["ableton-mcp"] },
"magic": { "command": "npx", "args": ["-y", "@magicuidesign/mcp@latest"] }
}The key: 14 MCPs configured but only 5–6 enabled per project. He disables the rest on a per-project basis using disabledMcpServers in ~/.claude.json.
Key hooks:
{
"PreToolUse": [
{ "matcher": "npm|pnpm|yarn|cargo|pytest", "hooks": ["tmux reminder"] },
{ "matcher": "Write && .md file", "hooks": ["block unless README/CLAUDE"] },
{ "matcher": "git push", "hooks": ["open editor for review"] }
],
"PostToolUse": [
{ "matcher": "Edit && .ts/.tsx/.js/.jsx", "hooks": ["prettier --write"] },
{ "matcher": "Edit && .ts/.tsx", "hooks": ["tsc --noEmit"] },
{ "matcher": "Edit", "hooks": ["grep console.log warning"] }
],
"Stop": [
{ "matcher": "*", "hooks": ["check modified files for console.log"] }
]
}Custom status line:
Shows user, directory, git branch with dirty indicator, context remaining %, model, time, and todo count.
On editors
Affaan uses Zed, a Rust-based editor that's lightweight and fast. He likes it for Claude Code because:
- Agent panel integration — track file changes in real-time as Claude edits
- Performance — opens instantly, handles large codebases without lag
- CMD+Shift+R command palette — quick access to custom slash commands
- Minimal resource usage — won't compete with Claude for system resources
- Vim mode — full keybindings if that's your thing
His workflow:
- Split screen: terminal with Claude Code on one side, editor on the other
Ctrl+Gto quickly open the file Claude is working on- Auto-save enabled so Claude's file reads are always current
- Use the editor's git features to review changes before committing
VSCode and Cursor work fine too. You can use Claude Code in terminal mode with automatic sync via \ide, or use the extension for tighter integration. Official docs at docs.anthropic.com/en/docs/claude-code/ide-integrations.
Key takeaways
Affaan closes his guide with five principles. Worth repeating:
- Don't overcomplicate — treat configuration like fine-tuning, not architecture
- Context window is precious — disable unused MCPs and plugins
- Parallel execution — fork conversations, use git worktrees
- Automate the repetitive — hooks for formatting, linting, reminders
- Scope your subagents — limited tools = focused execution
Easy to overlook, that last one. The temptation is to give every subagent access to everything. But a subagent with 50 tools will be slower and less focused than one with 5 tools scoped to its actual job.
What I think
I've been running a similar setup since the experimental days (praise the sun for tmux), and most of this lines up with my own experience. The context window management advice is the most valuable part. I've watched my effective context drop from 200k to under 80k by being careless with MCP and plugin loading (but hey, there's a fix for that now).
The hooks setup is worth stealing too. Having Prettier run automatically after every edit, and TypeScript checks after every .ts file change, catches errors before they compound. The console.log auditing on Stop is a nice touch.
If you're just getting started with Claude Code, don't try to implement all of this at once. Start with a few skills, one or two MCPs you actually need, and maybe a PostToolUse hook for formatting. Add complexity as you hit limits, not before.
And if you want the original source, Affaan's full guide is at x.com/affaanmustafa/status/2012378465664745795. He also published a GitHub repo with his configs at github.com/affaan-m/everything-claude-code.
References
- Affaan Mustafa's original guide: x.com/affaanmustafa/status/2012378465664745795
- Everything Claude Code repo: github.com/affaan-m/everything-claude-code
- Zenith (hackathon project): zenith.chat
- Claude Code Skills docs: docs.anthropic.com/en/docs/claude-code/skills
- Claude Code Hooks docs: docs.anthropic.com/en/docs/claude-code/hooks
- Claude Code Subagents docs: docs.anthropic.com/en/docs/claude-code/sub-agents
- Claude Code Memory docs: docs.anthropic.com/en/docs/claude-code/memory
- Claude Code MCP overview: docs.anthropic.com/en/docs/claude-code/mcp
- Claude Code IDE integrations: docs.anthropic.com/en/docs/claude-code/ide-integrations
- Claude Code Plugins reference: docs.anthropic.com/en/docs/claude-code/plugins-reference