What I Learned After 10 Months with Claude Code

·10 min

📖 Reading Notes · Original Source

This article is a summary after reading @affaanmustafa's long post "The Shorthand Guide to Everything Claude Code". The original author won an award at the Anthropic × Forum Ventures Hackathon and shared practical insights from 10 months of deep Claude Code usage. All configuration examples, tips, and viewpoints are sourced from the original article, reorganized and supplemented with explanations. Not original content.

Original repository: github.com/affaan-m/everything-claude-code

Claude Code is an AI programming assistant that runs in the terminal, but it's far more than "faster code completion". It has a complete configuration system—skills, hooks, subagents, MCP—that truly embeds AI into your workflow.

The core point of this article is just one sentence: Treat configuration as fine-tuning, not architectural engineering.


01 · Skills: Give Claude "Working Memory"

Skills are essentially constrained prompts designed to trigger specific workflows. Instead of explaining to Claude every time "help me clean up dead code and run tests", you can solidify this process into a skill and get it done with one command.

Skills are stored in the ~/.claude/skills/ directory, can be invoked via slash commands (like /refactor-clean), and can be chained—triggering multiple skills in one prompt.

# Chain multiple skills in one prompt
Run /refactor-clean, /add-tests, /test-coverage

# Skills can also manage code navigation maps, saving context
~/.claude/skills/codemap-updater.md

The core value of skills is reducing repetitive prompts. Instead of re-describing your work habits to Claude every time, turn your most common workflows into skills and let AI remember your preferences.

Claude Code Skills System Diagram

Difference between Skills and Commands:

Type Location Trigger Method Use Case
Commands ~/.claude/commands / prefix trigger Quick single tasks
Skills ~/.claude/skills Called in prompts Multi-step broad workflows

02 · Hooks: Let Claude Do the Right Thing at the Right Time

Hooks are event-driven automation mechanisms. Unlike skills, they don't require manual invocation—they execute automatically when specific events occur, such as validation before tool execution, formatting after tool execution, or reminders before conversation ends.

Hooks Workflow Diagram

Hook Types Overview

Type Trigger Timing Common Uses
PreToolUse Before tool execution Validation, security checks, blocking dangerous commands
PostToolUse After tool execution Format output, generate feedback loops
UserPromptSubmit When user sends message Inject additional context
Stop After Claude completes reply Send desktop notifications (e.g., tmux alerts)
PreCompact Before context compression Save critical state

The author highly recommends the hookify plugin—instead of writing JSON configs manually, let AI generate hooks conversationally.

# Install hookify
/plugin install hookify

# Describe desired behavior in natural language
/hookify Warn me when I use rm -rf commands
/hookify Don't use console.log in TypeScript files
/hookify Warn before any command containing "production"

hookify automatically generates corresponding Markdown rule files in the .claude/ directory, effective immediately without restart.

Generated rule file format (YAML header + Markdown body):

---
name: block-dangerous-rm
enabled: true
event: bash
pattern: rm\s+-rf
action: block
---
⚠️ **Dangerous rm command detected!**
Please confirm the path is correct and consider safer alternatives.

💡 Pro Tip: Run /hookify (without parameters) and it will automatically analyze conversation history, find places where you corrected Claude, and generate corresponding rules.


03 · Subagents: Delegate Work to "Minions"

Subagents are independent agent instances that your main Claude (orchestrator) can delegate tasks to. They run in the background or foreground, have restricted tool permissions, and don't consume the main agent's context window.

Subagents Architecture Diagram

Best practice for subagents: Fewer tools → More focused execution. A subagent responsible only for code review shouldn't also have database access.

# Example subagent directory structure
~/.claude/agents/
  planner.md              # Break down feature tasks
  architect.md            # System design decisions
  code-reviewer.md        # Quality & security review
  build-error-resolver.md # Focus on error analysis
  refactor-cleaner.md     # Dead code cleanup
  doc-updater.md          # Keep docs in sync

Subagents work best when combined with skills—delegate some skills to subagents for execution, while the main agent handles scheduling and review.


04 · MCP: Powerful but Must Be Used Sparingly

MCP (Model Context Protocol) allows Claude to directly connect to external services—databases, GitHub, Supabase, etc.—without copy-pasting, operating data directly in conversations. This is one of Claude Code's most powerful capabilities.

MCP Connection Diagram

⚠️ Critical Warning: MCP Heavily Consumes Context

Your context window before compression might only be 200k tokens, but if too many MCPs are activated simultaneously, actual usable space might drop to 70k. Performance will significantly degrade.

Author's practical experience: Configure 20–30 MCPs, but only activate 5–6 per project, managed through the project-level .claude.json disabledMcpServers field.

{
  "disabledMcpServers": [
    "playwright",
    "cloudflare-workers-builds",
    "clickhouse",
    "tableson-mcp"
  ]
}

Rule of thumb: Install 20–30, activate no more than 10, keep total tools under 80.


05 · Rules & Memory: Let Claude Remember Your Habits

Claude's rules folder stores best practices in .md format, which it always follows. Two organization approaches:

Approach 1: Single CLAUDE.md file — Put all rules in one file, suitable for fewer rules or personal projects.

Approach 2: Split by concern — Separate security, code style, Git conventions, etc. into independent files for modular management and easier maintenance.

~/.claude/rules/
  security.md       # No hardcoded keys, validate input
  coding-style.md   # Testability, file organization
  testing.md        # 100% coverage requirement
  git-workflow.md   # Standard commit process
  agents.md         # When to delegate to subagents
  performance.md    # Model selection tradeoffs

Recommended rule examples:

# coding-style.md
- No emoji in codebase
- Avoid color constants in frontend
- Must run tests before deployment
- Prefer modular code over huge files
- Never commit console.log

06 · Tips & Shortcuts: Details That Truly Boost Efficiency

Keyboard Shortcuts

Shortcut Function
Ctrl+U Delete entire line (much faster than repeated Backspace)
! Quick bash command prefix
@ Search files
/ Trigger slash commands
Shift+Enter Multi-line input
Esc Esc Interrupt Claude / restore code

Parallel Workflows

/fork conversation branching: Handle multiple non-overlapping tasks simultaneously, replacing sequential message queuing.

Git Worktree: Run multiple Claude instances in parallel without conflicts.

# Create independent worktree, run independent Claude instance
git worktree add ../feature-branch feature-branch
# Now you can run Claude in both directories simultaneously without interference

Other High-Frequency Commands

Command Function
/rewind Return to previous state, quick undo
/fork Branch current conversation
/compact Manually trigger context compression
/checkpoints File-level undo points
mgrep Supports both local + web search
mgrep "function handleSubmit"        # Local search
mgrep --web "Next.js router changes" # Web search

07 · Core Conclusions: Five Principles Worth Remembering

01. Treat configuration as fine-tuning, not architecture — Keep file organization simple and clear, avoid over-engineering.

02. Context window is a scarce resource — Disabling unused MCPs and plugins is the most direct performance optimization.

03. Parallel execution is the right approach — Use /fork to branch conversations, use git worktrees to run multiple instances.

04. Automate repetitive work — Formatting, linting, reminders should be handled by hooks, not manually triggered each time.

05. Limit tool scope for subagents — Fewer tools mean more focused execution and more controllable results.


The biggest misconception about Claude Code is treating it as a "chat box that answers questions". Its true power emerges when you encode workflow knowledge and conventions into configuration, making it a collaborator that truly understands your project.

Starting today, do one thing: Write down the one rule you most want Claude to remember and put it in CLAUDE.md. The rest will accumulate with use.


References