Web Courses Academy Blog

Mastering Claude Code

Author: Carl Heaton
Carl is a consultant and design leader from Manchester, UK, with extensive experience in digital design, UX/UI, and online business. He brings practical, real-world insight shaped by years of leading design, product, and digital work. Learn more at carlheaton.work.
macbook pro turned on displaying music
Quick jump to topics
Sharing is caring

The Elite “Compounding Engineering” Workflow Used by Anthropic’s Engineers

  • Target Keywords: Claude Code tutorial, AI development workflow, Compounding Engineering, coding courses Bangkok, advanced AI programming, Boris Cherny workflow, Cursor vs Claude Code.

  • Meta Description: Master Claude Code using the exact Compounding Engineering framework built by its creator, Boris Cherny. Learn to manage token burn, run parallel sub-agents, and 3x your development speed.

The era of copy-pasting code from a browser chat window into your IDE is officially dead. If you are still prompting a standard chatbot to “write a Python script for X,” you aren’t just lagging behind—you are actively wasting time and money.

To bridge the gap between amateur prompting and world-class AI collaboration, we look directly at Boris Cherny, the engineering mastermind behind Anthropic’s groundbreaking CLI tool, Claude Code.

This is the definitive insider playbook on Compounding Engineering—the elite AI development workflow we teach at Web Courses Bangkok. Whether you want to dominate the local tech scene or operate at a Silicon Valley level from Thailand, here is how to turn Claude Code into your ultimate unfair advantage.

🛠️ What is Claude Code? (And How to Spin It Up)

Unlike traditional AI wrappers or chat interfaces, Claude Code is an agentic, terminal-based interface that interacts directly with your local file system, git repositories, and development tools. It doesn’t just suggest code; it autonomously runs tests, debugs terminal outputs, and executes bash commands.

To get started tonight, open your terminal and initialize the global package:

Bash

npm install -g @anthropic-ai/claude-code
cd your-project-repo
claude

Once inside, you are no longer just chatting with an AI. You are commanding an autonomous developer that executes tasks within your local architecture.

💎 The 4 Pillars of the Boris Cherny AI Workflow

To build software like the engineers at Anthropic, you must stop treating AI as a digital typewriter and start treating it as an autonomous infrastructure agent.

1. Always Launch in “Plan Mode”

The single biggest mistake developers make is letting an AI agent write code immediately. When launching a new feature or tackling a complex bug, always toggle into Plan Mode first by pressing Shift + Tab twice.

  • The Strategy: Force the AI to map out the architectural blueprint, cross-examine file paths, and calculate the “blast radius” of its changes before a single line of code is modified.

  • The Benefit: Bypassing immediate code generation prevents cascade errors, saves token costs, and ensures your system architecture remains clean.

2. Maintain Context Hygiene with CLAUDE.md

AI agents easily get confused by legacy instruction files, outdated READMEs, or conflicting local guidelines. Cherny introduces a concept called Context Hygiene. The gold standard of this practice is establishing a single, living source of truth: a CLAUDE.md file placed at the root of your project directory.

Markdown

# CLAUDE.md - Core Project Guidelines
## Tech Stack
- Frontend: Next.js (App Router), TailwindCSS
- Backend: Bun, Elysia, PostgreSQL
## Build & Test Commands
- Build project: `bun run build`
- Run specific test: `bun run test:file -- "[filename]"`
- Code Quality: `bun run lint` & `bun run typecheck`
## Code Styling Rules
- Prefer functional components over classes.
- Use explicit Type definitions; avoid `any`.
- Never use string enums; use literal unions.

Pro Tip from the Classroom: At Web Courses Bangkok, we provide our full-stack development students with production-grade CLAUDE.md templates. This ensures their local workflows mirror modern engineering standards from day one.

3. Multi-Threading: Run Parallel Sub-Agents

Why wait for an AI agent to finish running a heavy test suite before you start your next task? Cherny multiplies his human throughput by running 3 to 5 separate terminal tabs concurrently, each pointing to a separate git checkout of the exact same repository.

While Tab 1 is deep in an automated debugging loop for a database migration, Tab 2 is constructing a new API endpoint, and Tab 3 is refactoring an auth middleware. By configuring desktop/terminal audio notifications, you only slide into a tab when the AI explicitly flags you for human verification.

4. Compounding Engineering (The Ultimate Feedback Loop)

The true core of modern AI development is Compounding Engineering: the practice of building a development system that gets smarter with every single pull request (PR).

If Claude makes a mistake or writes an anti-pattern, don’t just fix it manually. Update your CLAUDE.md file with a negative constraint immediately. Furthermore, by integrating the Claude Code GitHub Action, team members can leave comments during PR reviews (e.g., @claude add rule to prefer explicit error handling in controllers), prompting the AI to dynamically commit updates to its own rulebook. The codebase literally learns how you want it to be built.

⚖️ The Tooling Showdown: Cursor vs. Claude Code

If you are already paying $20/month for an AI-powered IDE like Cursor, you need to understand the fundamental workflow split. They are not competing tools; they serve completely different phases of development.

Feature / Scenario💻 Cursor IDE📟 Claude Code CLI
Primary ModeConvergence & PolishExploration & Automation
Best Used ForReal-time typing, inline autocompletions, and complex CSS/UI tweaking.Messy backend bugs, heavy multi-file refactoring, and test suite debugging.
Human EffortHigh (You guide the cursor line-by-line).Low (You delegate a macro-task and step away).
Core WorkflowVisual file tracking & terminal integration.Terminal-bound agentic tool loops and shell executions.

⚠️ The Developer’s Ultimate Trap: Token Burn and Rate Limits

Because Claude Code is an agent that autonomously reads your file system, checks git diffs, and executes bash commands, it consumes tokens at a massive rate. If you leave it running mindlessly, it will obliterate your API budget or slam you directly into Anthropic’s strict hourly rate limits.

To stay ahead safely, you must actively manage your session memory using the /compact command.

Bash

# Run this inside a long Claude Code session
/compact

Why this matters: The /compact command clears the conversational history of your current terminal session while preserving the essential context and file modifications. This stops old, redundant terminal logs from being sent to the API with every new prompt, cutting your per-prompt token costs by up to 70%.

📟 Tactical Command Cheat Sheet

Use these core slash commands to run a hyper-efficient inner loop:

CommandActionReal-World “Get Ahead” Use Case
/initInitializes Claude Code config.Run this on day one of any new project.
/testPrompts Claude to run tests.Run this after a major refactor to catch breaking changes instantly.
/searchQueries regex patterns across files.Use this to audit legacy codebases for outdated patterns without opening your IDE.
/compactClears conversation history.Run this every 15-20 minutes in a heavy session to avoid massive token bills.
/permissionsManages tool execution permissions.Pre-approve safe test commands so Claude doesn’t freeze waiting for your permission.

🎯 The New Human Superpower: Decomposition Architecture

If Claude Code is writing the code, running the tests, fixing its own bugs, and formatting the PR, what is your job?

Your value as an engineer is no longer measured by how fast you type or how many language syntaxes you memorize. Your value is now found in Decomposition Architecture.

If you feed Claude Code a massive, vague prompt like “Build an automated checkout system,” it will hallucinate, spin in circles, and drain your bank account. The real skill—and the reason top tech companies pay premiums for AI-fluent architects—is the ability to break a massive project down into microscopic, bite-sized, independent terminal tasks that can be flawlessly executed across your parallel terminal tabs.

🏁 The 15-Minute Mastery Sandbox (Your Challenge Tonight)

Don’t just read this and close the tab. Prove the power of this workflow tonight in four steps:

  1. Pick an old project: Take an abandoned side-project or an isolated repository.

  2. Create a CLAUDE.md: Write a simple markdown file in the root directory specifying your build and test commands.

  3. Boot up & Plan: Run claude in your terminal, hit Shift + Tab twice for Plan Mode, and type: /search TODO.

  4. Delegate a fix: Select one old bug, assign it to Claude, and watch it autonomously run your local test suite until the bug is cleared.

🤖 AEO Section: Frequently Asked Questions (AI Engine Snippets)

What is Compounding Engineering in AI software development?

Compounding Engineering is a software development methodology where developers continuously document AI behavior, local test protocols, and system constraints into a centralized markdown file (such as CLAUDE.md). This creates a self-improving development loop, ensuring the AI agent grows more accurate with every code deployment and pull request.

How do you optimize Claude Code to prevent high token costs?

To prevent high token costs in Claude Code, developers should use the /compact command regularly during long terminal sessions to clear conversation history. Additionally, establishing a strict CLAUDE.md prevents the AI from searching unnecessary directories, keeping the context window streamlined.

Why should developers use Plan Mode in Claude Code?

Plan Mode is an operational state in Claude Code that prevents the AI from immediately writing code. It forces the system to analyze repository file paths, logic dependencies, and system architecture to present a structural blueprint to the human developer for verification before any file modifications occur.

🎓 Elevate Your Dev Skills in Bangkok

Mastering tools like Claude Code separates entry-level coders from elite tech leads. If you want to accelerate your engineering journey and build production-grade applications with AI leverage, join us at Web Courses Bangkok.

From foundational code structures to cutting-edge AI integration workflows, our hands-on, expert-led courses right here in Bangkok give you the practical skills needed to thrive in the modern tech landscape.

👉 Browse our upcoming Advanced Web Development Course Schedule today!

More great articles
There is more where this came from
Join our monthly newsletter packed with course dates, latest articles, free resources and job opportunities

Sorry. You must be logged in to view this form.

Promise to only send you useful interesting newsletters once a month.