Tutorials Beginner
Claude Code from zero: an agentic coding workflow, step by step
Install Claude Code, learn the core loop, and build up to a disciplined agentic workflow: CLAUDE.md, plan mode, custom skills, and MCP servers.
Agentic coding tools reward workflow discipline far more than prompt cleverness. This tutorial sets up Claude Code and then focuses on the habits that separate “autocomplete with extra steps” from an agent that does real work while you review it.
Step 1 — Install and authenticate
npm install -g @anthropic-ai/claude-code
cd your-project
claude
First run walks you through login. Verify with /status inside the session.
Step 2 — Give the agent a memory: CLAUDE.md
Claude Code reads CLAUDE.md from your project root at the start of every
session. This is the highest-leverage file in the whole workflow. A good one
is short and factual:
# CLAUDE.md
## Project
Payment reconciliation service. Python 3.12, FastAPI, PostgreSQL.
## Commands
- Test: `pytest -q`
- Lint: `ruff check .`
- Run locally: `make dev`
## Conventions
- Type hints everywhere; mypy must pass.
- Never touch `migrations/` by hand.
Rule of thumb: anything you’d tell a new teammate on day one belongs here. Anything you’d tell them once, in one specific situation, does not.
Step 3 — The core loop: plan first, then execute
For any non-trivial task, don’t let the agent code immediately. Press Shift+Tab to cycle into plan mode, describe the task, and read the plan it produces. You are reviewing the approach while it’s still cheap to change. Then approve, and let it execute against the plan.
The habit that matters: review at the plan level and the diff level, not keystroke level. You’re a tech lead now, not a typist.
Step 4 — Let it verify its own work
An agent that can run your tests can check itself. End tasks with an explicit verification instruction:
Implement the fix, then run
pytest -qand iterate until green.
This single habit converts “plausible-looking code” into “code that passed the suite before you ever read it.”
Step 5 — Extend it with an MCP server
Claude Code speaks MCP natively. Connect any server:
claude mcp add my-server -- python /path/to/server.py
claude mcp list
Now the tools your server exposes are available in-session — the same mechanism from our first MCP server tutorial.
Troubleshooting
The agent keeps “fixing” things you didn’t ask about
Scope creep is a prompting problem. Add “Do not change anything outside
src/billing/” style constraints to the task, and put standing
boundaries (“never edit generated files”) in CLAUDE.md.
Long session starts giving worse answers
Context windows fill up. Use /compact at natural breakpoints,
or /clear between unrelated tasks — a fresh session with a good
CLAUDE.md beats a bloated one.
Was this guide useful?
Thanks — noted. It shapes what gets written next.
newsletter
One practical agentic-AI guide in your inbox. No news, no hype.
Tutorials and decision frameworks as they ship. Unsubscribe anytime.