Post

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.

Build & Sell with Claude Code — The 10-Hour Course Distilled

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

LayerWhat It Does
CLAUDE.mdYour permanent system prompt — injected at the start of every session
Skills / ToolsReusable prompt files and MCP servers that extend capabilities
Sub-agents / TeamsParallel 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

  1. 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.
  2. Use /compact at 60% — Compress history mid-session, keeping only critical decisions. You can tell it what to keep: /compact but keep all API integration decisions.
  3. Use /clear between tasks — Wipe history when switching topics. Your CLAUDE.md and files persist; your conversation doesn’t.
  4. Run /context — See exactly what’s eating your tokens. MCP servers can be surprisingly expensive — sometimes a direct API endpoint costs far fewer tokens.
  5. 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

ConceptAnalogy
RepositoryBank account — stores every transaction (commit) ever made
CommitCheckpoint — snapshot of the project at a point in time
BranchDraft mode — make changes without touching the published version
Push / PullSync to / from cloud
MergeCombine 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 main cleanly 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)

#HackWhy It Matters
1/init on every projectAuto-generates CLAUDE.md from your codebase
2Status lineSee model, context %, and cost at a glance
3Voice input (/v)Talk to your terminal — great for long prompts
4Keep context smallFocused context = better outputs, no exceptions
5/context to find bloatDiagnose token waste before it degrades quality
6/compact at 60%Compress mid-session, keep critical decisions
7Always start in plan modeClaude outlines steps before writing a line of code
8Give problems, not commands“How should we handle growth tracking?” beats “Write me a function”
9Make Claude ask questions“Ask me questions until you’re 95% confident you understand the task”
10Self-checking to-do listsBake verification steps (screenshot, DevTools check) directly into the task list

Intermediate Hacks (11–22)

#HackWhy It Matters
11Sub-agents for parallel workTeam of specialists > one generalist
12Custom skillsReusable .md prompt files in ~/.claude/skills/ — commit to GitHub for team use
13Haiku for sub-agents10× cheaper for bulk processing tasks
14Refresh CLAUDE.md constantlyLog new patterns, gotchas, conventions after each session
15CLAUDE.md routes to other filesKeep it lean; point to style guides and reference docs instead of embedding them
16Exit early and reaskDon’t let Claude burn tokens going the wrong direction — hit Escape and correct
17Challenge outputs aggressively“Scrap that, try again with a completely different approach” often yields dramatically better results
18/re for quick undosRoll back to a previous conversation point without starting over
19Hooks for notificationsGet a sound alert when a long-running session finishes
20Feed screenshotsClaude can see — use this for design checks, error message analysis, and visual QA
21Chrome DevToolsTest app functionality, not just appearance
22Clone inspiration sitesScreenshot a design you love, feed it in, say “make it look like this”

Advanced Hacks (23–32)

#HackWhy It Matters
23Parallel sessions + work treesRun 5 isolated branches simultaneously, merge when done
24API endpoints over MCP serversIf you only need one endpoint, loading a full MCP server wastes tokens
25/loop for recurring tasksMonitor deployments, PRs, error logs — runs in background, interrupts only when needed
26Host on a VPSAlways-on sessions, SSH in from anywhere, control via Telegram
27Remote control from phoneStart a build at your desk, steer it from your pocket
28No-SQL data analyticsConnect BigQuery CLI → ask questions in plain English → Claude writes and runs the query
29ultrathinkAllocates 32K thinking tokens for hard architecture decisions or when stuck after 2+ attempts
30Fine-grained permissionsExplicitly allow safe commands + deny destructive ones (deny takes priority) = full speed, no danger
31Agent teamsAgents that share a task list and can talk to each other — more cohesive than sub-agents for complex projects
32Context7 MCPInjects 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

StepAction
DiagnoseTeam spends 5 hrs/week onboarding clients
SolveAutomate 80% of that process
Value200+ 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

LetterStep
P — PrepareGround yourself in value-based pricing, not hours
R — ResearchMap the full manual workflow end-to-end
I — IdentifyCalculate ROI, annual savings, opportunity cost
C — CommunicatePaint the “after” picture before saying a number
E — ExpandAfter delivery: maintenance, optimisation, V2 retainer

🚀 Delivery & Handover — The Professional Way


The Three Hosting Options

OptionBest ForCompliance
Client hostsAlmost all client work✅ Cleanest — each client owns their instance
You host internallyYour own agency automations✅ Fine as long as clients don’t log in
You host as productSaaS / 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.




Part of the AI Tools & Automation series. Next: running Claude Code on a VPS for always-on autonomous agents.

This post is licensed under CC BY 4.0 by the author.