Claude · Module 02 of 8

Coding

Use Claude and Claude Code to write, debug, test, review and restructure code in a real project.

9 lessons36 techniques

Code generation

Build from a spec, one layer at a time, with agreed types and an existing file as the pattern to follow.

4 techniques →

Debugging

Reproduce the bug with a failing test, trace silent failures with logs, and reset when the first fix doesn't work.

4 techniques →

Architecture

Get real design options and honest trade-offs, settle the interface in plan mode, and record the decision before it's lost.

4 techniques →

Refactoring

Restructure code one named move at a time, starting with characterization tests when the code has none.

4 techniques →

Multi-file workflows

Approve the file list before edits, let the type checker drive wide changes, and split big diffs into commits you can review.

4 techniques →

Claude Code

Keep Anthropic's coding agent on track with plan mode, a short CLAUDE.md and a check that comes back pass or fail.

4 techniques →

Testing

Get failing tests that catch the bug, tests of behavior rather than implementation, table-driven cases, and a ranked list of missed edge cases.

4 techniques →

Code review

Run /code-review on what changed, ask for inputs that break the code, rank the findings, and give Claude your team's checklist.

4 techniques →

API integration

Give Claude current docs so it doesn't invent fields, generate a typed client, and make every API failure visible.

4 techniques →
Check yourself

How well do you code with Claude?

Six situations from real work in Claude Code, covering plans, checks, bugs and reviews. See the answer as soon as you choose. No sign-up.

Take the quiz
Claude for coding

Claude Code or the Claude app?

Use Claude Code when the work lives in a repository. It reads your code, edits files and runs commands, so it can run your tests and act on the result. Use the Claude app when you want to reason through a problem or work on a snippet. There, Claude sees only what you paste or add, and its GitHub integration is read-only, with no commit history. Most lessons here work in both, and each card says where the steps differ. Anthropic's API docs list Opus 5.5 as the model to start with for most workloads, while its Claude Code help article recommends Sonnet for most coding. Sonnet costs half as much, so try it first and move up when the answer falls short.

What Claude can't get from your code

Anthropic's Claude Code best practices come down to three points, and this course follows them. Tell Claude what it can't see, such as decisions, constraints and what done means. Give it a check that passes or fails, so it isn't judging its work by how finished it looks. And enforce rules that have no exceptions with hooks and deny rules, because a line in a prompt or CLAUDE.md is still Claude's call. Much older advice no longer applies. The same page says you can stop describing your file layout, stop writing "think hard", and stop adding ALL CAPS to your instructions.

Where to start

Start with the lesson that matches the job in front of you: code generation, debugging, architecture, refactoring, multi-file changes, Claude Code itself, testing, code review or API integration. If you only learn one habit, make it asking for evidence, meaning the command Claude ran and its output, instead of accepting a summary that says it worked.

Frequently asked
Is Claude good for coding?

Anthropic says Opus 5.5 is strongest on multistep work in a real repository, such as carrying a change through a large code base until its tests pass. That's a vendor claim, so test it on your own code. The result depends heavily on whether Claude has a check it can run, such as tests or a type checker.

Which Claude model is best for coding?

Claude Code runs Opus 5.5 at medium effort by default on most plans and providers. Anthropic's docs say Sonnet costs less on routine work, and that Fable 5.1 is available if you select it. As a rule of thumb, try /effort high on a hard bug before changing model.

Is Claude Code free?

No. Claude Code isn't on the Free plan. You need a paid plan, starting with Pro, or API billing. Anthropic's pricing page has current prices. The Claude app's Free plan can still help with snippets you paste in.

What is the difference between Claude and Claude Code?

Claude is the chat app, where it sees only what you give it. Claude Code is Anthropic's coding agent, which works inside your project from a terminal, editor, desktop app or browser, and can read files, edit them and run commands. Both use the same Claude models.

How do I stop Claude from breaking my code?

Commit before each change, give Claude tests it can run, and ask to see the output. For hard limits, use a deny rule or a hook, which Claude Code enforces no matter what the model decides. Rewind is useful for quick undo, but it doesn't replace git.