Build & Sell with Claude Code — The 10-Hour Course Distilled
Everything you need to go from Claude Code novice to autonomous AI-builder and freelancer — distilled from 10+ hours into one actionable read.
Claude Code isn’t just a coding assistant — it’s an autonomous agent platform that rewrites how software gets built. This post distills 10+ hours of course content into the key mental models, hacks, and business frameworks you actually need.
🧠 The Core Mental Model — What Claude Code Actually Is
Claude Code runs in your terminal and can read files, write code, run commands, browse the web, spin up sub-agents, and self-correct — all without you babysitting every step.
Think of it less like GitHub Copilot and more like a junior developer you can delegate entire projects to.
The Three Layers of Claude Code
| Layer | What It Does |
|---|---|
| CLAUDE.md | Your permanent system prompt — injected at the start of every session |
| Skills / Tools | Reusable prompt files and MCP servers that extend capabilities |
| Sub-agents / Teams | Parallel workers with isolated context that report back to the main session |
How a Session Actually Works
flowchart LR
A([You]) --> B[Main Claude Code Session]
B -->|delegates| C[Sub-agent 1\nResearch]
B -->|delegates| D[Sub-agent 2\nTesting]
B -->|delegates| E[Sub-agent 3\nCode Review]
C --> F([Main session\nreceives report])
D --> F
E --> F
style B fill:#4A90D9,color:#fff
style C fill:#5BA85A,color:#fff
style D fill:#E8A838,color:#fff
style E fill:#9B6EBD,color:#fff
style F fill:#4A90D9,color:#fff
⚙️ Context Management — The #1 Thing Beginners Get Wrong
Context rot is real. When your context window fills up, output quality degrades — and if you’re running 10+ sessions in parallel, you often won’t notice until it’s too late.
The Context Hygiene Playbook
- Keep CLAUDE.md lean — 100–200 lines max. Every line is injected into every session. Route non-essential docs to external files and just reference them.
- Use
/compactat 60% — Compress history mid-session, keeping only critical decisions. You can tell it what to keep:/compact but keep all API integration decisions. - Use
/clearbetween tasks — Wipe history when switching topics. Your CLAUDE.md and files persist; your conversation doesn’t. - Run
/context— See exactly what’s eating your tokens. MCP servers can be surprisingly expensive — sometimes a direct API endpoint costs far fewer tokens. - Max 3–4 parallel sessions — More than that and you lose track of what’s going on. Quality over quantity.
Sub-agents for Heavy Lifting
If you have a 15-minute YouTube transcript to analyse, don’t let your main session read it. Delegate to a sub-agent: “read this, give me the key highlights.” Keep the main thread clean.
flowchart TD
A[Main Session\n~Clean context] -->|"Read 200-page PDF\nSummarise findings"| B[Sub-agent\nHaiku model\nCheap + fast]
B -->|"3-bullet summary"| A
style A fill:#4A90D9,color:#fff
style B fill:#5BA85A,color:#fff
Use Haiku for sub-agents doing heavy data processing (scraping, summarising, reading large files). Reserve Sonnet/Opus for the main thread where quality matters.
🔧 Git, GitHub & Work Trees — Safe Parallel Development
Git Concepts in 60 Seconds
| Concept | Analogy |
|---|---|
| Repository | Bank account — stores every transaction (commit) ever made |
| Commit | Checkpoint — snapshot of the project at a point in time |
| Branch | Draft mode — make changes without touching the published version |
| Push / Pull | Sync to / from cloud |
| Merge | Combine a branch back into main once tested |
Git Work Trees — Run Multiple Sessions Safely
The problem: normally you can only work on one branch at a time. Switch branches and you risk losing in-progress work.
The solution: work trees give each Claude Code session its own isolated branch and folder — no risk of agents overwriting each other.
1
2
3
# Each terminal gets its own workspace + branch
claude --worktree feature-login
claude --worktree bugfix-api
Claude Code has native work tree support built in. You can run 4–5 parallel sessions on the same project and merge them all back to
maincleanly when done.
🤖 Browser Automation — When There’s No API
Claude Code can launch a real browser, fill out forms, click buttons, scrape pages, and run QA loops — even on sites where you’re already logged in.
The QA Self-Checking Loop
flowchart LR
A[Build feature] --> B[Take screenshot]
B --> C{Looks right?}
C -->|No| D[Identify bugs\nfrom screenshot]
D --> E[Fix code]
E --> A
C -->|Yes| F[Open Chrome DevTools\nCheck for JS errors]
F -->|Errors found| D
F -->|Clean| G[✅ Ship]
style A fill:#4A90D9,color:#fff
style G fill:#5BA85A,color:#fff
style D fill:#D9534F,color:#fff
Browser automation is iterative — expect 4–5 loops before a script runs cleanly. That’s normal, not a failure. Each run, the script gets smarter.
Persistent Login Sessions
Claude Code can use your existing Chrome profile, meaning it can interact with platforms where you’re already logged in — Notion, CRMs, school communities, etc. First run requires manual login; subsequent runs use the saved session.
🛠️ The 32 Claude Code Hacks — Ranked by Impact
Beginner Hacks (1–10)
| # | Hack | Why It Matters |
|---|---|---|
| 1 | /init on every project | Auto-generates CLAUDE.md from your codebase |
| 2 | Status line | See model, context %, and cost at a glance |
| 3 | Voice input (/v) | Talk to your terminal — great for long prompts |
| 4 | Keep context small | Focused context = better outputs, no exceptions |
| 5 | /context to find bloat | Diagnose token waste before it degrades quality |
| 6 | /compact at 60% | Compress mid-session, keep critical decisions |
| 7 | Always start in plan mode | Claude outlines steps before writing a line of code |
| 8 | Give problems, not commands | “How should we handle growth tracking?” beats “Write me a function” |
| 9 | Make Claude ask questions | “Ask me questions until you’re 95% confident you understand the task” |
| 10 | Self-checking to-do lists | Bake verification steps (screenshot, DevTools check) directly into the task list |
Intermediate Hacks (11–22)
| # | Hack | Why It Matters |
|---|---|---|
| 11 | Sub-agents for parallel work | Team of specialists > one generalist |
| 12 | Custom skills | Reusable .md prompt files in ~/.claude/skills/ — commit to GitHub for team use |
| 13 | Haiku for sub-agents | 10× cheaper for bulk processing tasks |
| 14 | Refresh CLAUDE.md constantly | Log new patterns, gotchas, conventions after each session |
| 15 | CLAUDE.md routes to other files | Keep it lean; point to style guides and reference docs instead of embedding them |
| 16 | Exit early and reask | Don’t let Claude burn tokens going the wrong direction — hit Escape and correct |
| 17 | Challenge outputs aggressively | “Scrap that, try again with a completely different approach” often yields dramatically better results |
| 18 | /re for quick undos | Roll back to a previous conversation point without starting over |
| 19 | Hooks for notifications | Get a sound alert when a long-running session finishes |
| 20 | Feed screenshots | Claude can see — use this for design checks, error message analysis, and visual QA |
| 21 | Chrome DevTools | Test app functionality, not just appearance |
| 22 | Clone inspiration sites | Screenshot a design you love, feed it in, say “make it look like this” |
Advanced Hacks (23–32)
| # | Hack | Why It Matters |
|---|---|---|
| 23 | Parallel sessions + work trees | Run 5 isolated branches simultaneously, merge when done |
| 24 | API endpoints over MCP servers | If you only need one endpoint, loading a full MCP server wastes tokens |
| 25 | /loop for recurring tasks | Monitor deployments, PRs, error logs — runs in background, interrupts only when needed |
| 26 | Host on a VPS | Always-on sessions, SSH in from anywhere, control via Telegram |
| 27 | Remote control from phone | Start a build at your desk, steer it from your pocket |
| 28 | No-SQL data analytics | Connect BigQuery CLI → ask questions in plain English → Claude writes and runs the query |
| 29 | ultrathink | Allocates 32K thinking tokens for hard architecture decisions or when stuck after 2+ attempts |
| 30 | Fine-grained permissions | Explicitly allow safe commands + deny destructive ones (deny takes priority) = full speed, no danger |
| 31 | Agent teams | Agents that share a task list and can talk to each other — more cohesive than sub-agents for complex projects |
| 32 | Context7 MCP | Injects current library docs (Next.js, React, MongoDB…) before Claude writes code — eliminates hallucinated deprecated APIs |
💼 Building a Business with Claude Code
The Core Mindset Shift
Stop selling AI agents. Start selling outcomes tied to real business pain.
Businesses don’t care if you used Claude Code, n8n, or duct tape. They care about time saved, money saved, and fewer errors.
The Diagnose → Solve → Value → Price Framework
flowchart LR
A[🔍 Diagnose\nFind the pain point] --> B[🔧 Solve\nBuild the system]
B --> C[💰 Value\nTranslate to numbers]
C --> D[🏷️ Price\nAnchor to ROI]
style A fill:#4A90D9,color:#fff
style B fill:#5BA85A,color:#fff
style C fill:#E8A838,color:#fff
style D fill:#9B6EBD,color:#fff
Example: Client onboarding automation
| Step | Action |
|---|---|
| Diagnose | Team spends 5 hrs/week onboarding clients |
| Solve | Automate 80% of that process |
| Value | 200+ hrs/year saved × $50/hr = $10,000/year back |
| Price | “I’m saving you $10K/year — I’m charging $3K” → obvious yes |
How to Get Your First Clients (No Audience Needed)
Three methods, in order of effectiveness when starting out:
1. Warm Outreach (Start Here)
Build a “trust map” — list 20 people you already know who run businesses. Reach out not to pitch, but to learn:
“I’m mapping the top time drains in your industry. Can I ask you 10 minutes of questions? No pitch.”
2. Referrals
After delivering value, ask the golden question: “Do you know any other business owners who might benefit from this?”
Only 11% of salespeople ask for referrals — yet 91% of happy clients would give one if asked. Ask every time.
3. The Trojan Horse Method (Highest Leverage)
Partner with agencies, consultants, and coaches who already have client relationships. Offer:
- Free AI discovery calls for their clients
- 20% rev share on any projects you close
- They look like heroes for bringing in an expert; you get warm introductions
Partner-sourced deals close 46% faster than cold outreach. You borrow trust instead of building it from scratch.
Value-Based Pricing — The Simple Math
1
2
Annual cost of manual process = (hours/week × 52) × hourly_rate
Your target price ≈ 10–15% of annual savings
Real example:
- 20 leads/week, 1 hr each to qualify → 20 hrs/week × $40/hr = $38,400/year
- Automated 80% → $30,720 saved/year
- Project price: 15% × $38,400 = $5,760 → they see 5× ROI in year 1 alone
The PRICE Framework
| Letter | Step |
|---|---|
| P — Prepare | Ground yourself in value-based pricing, not hours |
| R — Research | Map the full manual workflow end-to-end |
| I — Identify | Calculate ROI, annual savings, opportunity cost |
| C — Communicate | Paint the “after” picture before saying a number |
| E — Expand | After delivery: maintenance, optimisation, V2 retainer |
🚀 Delivery & Handover — The Professional Way
The Three Hosting Options
| Option | Best For | Compliance |
|---|---|---|
| Client hosts | Almost all client work | ✅ Cleanest — each client owns their instance |
| You host internally | Your own agency automations | ✅ Fine as long as clients don’t log in |
| You host as product | SaaS / subscription platform | ⚠️ Requires commercial license |
Never run multiple clients on a single shared instance without a commercial license. This violates most automation platform terms of service.
The QA Loop Before Handover
flowchart TD
A[Internal QA\nTest with real sample data] --> B{Pass?}
B -->|No| C[Fix bugs\nUpdate prompts]
C --> A
B -->|Yes| D[Client QA\nSimple UI / form to test]
D --> E{Client happy?}
E -->|No| F[Prompt tuning\nMinor tweaks]
F --> D
E -->|Yes| G[Push to Production]
style G fill:#5BA85A,color:#fff
style C fill:#D9534F,color:#fff
style F fill:#E8A838,color:#fff
Scope Creep — Protect Yourself
Define the exact list of functionality in the contract. When clients ask for more during the build:
“Love that idea — I’ll add it to the V2 backlog. For this version, we’re locking scope so I can deliver on time.”
This plants the seed for future work and protects your margins.
💡 One-Sentence Intuition
Claude Code turns you into a manager, not a coder — your job is to give clear goals, steer agents when they drift, and stack proof until you’re the AI partner businesses can’t afford to lose.
🔗 Related Resources
- Claude Code Docs
- Context7 MCP — live library documentation injection
- Pixel Agents VS Code Extension — visualise your agents as pixel art characters (Windows only for now)
Part of the AI Tools & Automation series. Next: running Claude Code on a VPS for always-on autonomous agents.