Claude Code: the Complete Guide to Coding with an AI Agent
Claude Code reads your project, writes the code, runs commands and checks its work. Installation, effective requests, Plan mode, CLAUDE.md, permissions, Git, tests, MCP and costs: everything you need to steer Anthropic's coding agent.

What exactly is Claude Code?
Claude Code is the coding agent from Anthropic, the company behind the Claude AI models. It does more than complete the line you are typing: it reads your project, proposes a plan, writes and edits files, runs commands (installs, tests, the development server) and checks its own work before handing control back to you.
You can use it in the terminal, in VS Code and JetBrains editors, in a desktop app or from the browser. You talk to it in plain language, as you would to a colleague: "add hourly room booking, check for slots that are already taken, and write the tests".
That is what separates an agent from a simple autocomplete assistant. Autocomplete saves you a few seconds per line. An agent takes on a whole task, from plan to verification, while you keep control over the decisions. You still need to know how to steer it: that is what this guide is about.
What Claude Code can do
- Understand an existing project: explain an unfamiliar codebase, find where a feature lives, summarize the architecture.
- Build a feature end to end: data model, business logic, interface, tests.
- Fix a bug from an error message, a screenshot or a failing test.
- Work with Git: create a branch, write a clear commit message, prepare a pull request.
- Refactor and simplify code that grew too fast.
- Connect to your tools through the MCP protocol: database, browser, Stripe, issue tracker.
- Run without you, in a continuous integration pipeline such as GitHub Actions.
It does not invent your product for you. It quickly and properly executes what you can describe, and it does so better the more relevant context you give it.
Installing Claude Code and getting started
You need a Mac, Windows or Linux computer, and a Claude subscription or API credit: Claude Code uses Anthropic's models, and that usage is paid for. Installation takes one command, described in the official documentation, then you sign in with your account.
The first habits to build:
- Open the terminal in the project folder, then start Claude Code. It only sees that folder and what you allow it to.
- Ask it to explain the project before changing anything. It is the best way to check that it has understood.
- Create the CLAUDE.md file with the /init command: Claude Code summarizes the project, its commands and its conventions there, and reads it again at every session.
- Start with a small task whose right answer you already know, to learn how to read what it proposes.
The VS Code extension shows changes file by file, which makes reviewing much more comfortable when you are starting out.
Writing a good request: the skill that changes everything
The quality of the result depends first on the quality of the request. An agent cannot read your mind: what you leave unsaid, it guesses, and sometimes it guesses wrong.
| Vague request | Clear request |
|---|---|
| "Build a booking system" | "Add hourly room booking: a customer picks a free slot between 8 am and 8 pm, two bookings cannot overlap, write the tests for these rules" |
| "Fix the bug" | "The /reservations page returns a 500 error when the customer is not signed in. Here is the error message. Find the cause and propose a fix with a test" |
| "Improve the design" | "On a room page, make the photo large and put the price and the Book button above the fold, mobile first" |
Three habits make the difference:
- Plan mode. For a significant task, ask for a plan first, without writing code. You read it, correct it, then start the work. A wrong direction takes one sentence to fix at the planning stage, and an hour once the code is written.
- Break it down. One feature at a time, one verifiable step at a time. Giant requests produce average results that are hard to review.
- Require verification. Ask it to run the tests, check the types, open the page. An agent that checks its work makes far fewer mistakes than one that stops as soon as it has written something.
Project context and memory
Claude Code does not remember anything from one session to the next, except what you write down for it. That is the role of CLAUDE.md: a file at the root of the project that describes the tech stack, useful commands, naming conventions and the rules never to break ("every database migration must stay compatible with the previous version", for example). The more precise and up to date it is, the less you repeat the same instructions.
The other idea to master is the context window: the amount of information the model keeps in mind during a session. It fills up with every file read and every exchange. When it overflows, the earliest instructions get lost. Good habits:
- one session per task, and the /clear command between unrelated topics;
- the /compact command to summarize a long session and start again lighter;
- files and functions of reasonable size, which the agent can read in full without wasting space.
Security and permissions: staying in control
An agent that runs commands on your machine needs clear limits. By default, Claude Code asks for your approval before editing a file or running a command. You can then permanently allow what is harmless (running tests, reading files) and explicitly forbid what is not (reading the .env file, deleting folders, pushing to production).
The rules that protect you:
- Secrets stay secret: passwords, API keys and customer data are never pasted into a conversation, and the files that hold them are made off limits.
- You review every change before accepting it, especially at first. The diff (what changes, line by line) is your best tool.
- Nothing goes to production without you. The agent prepares, you approve.
- One Git branch per task: if the result is not right, you throw away the branch, not the project.
Git, tests and quality: working like a real team
Claude Code shows its full value in a professional workflow. A branch per feature, readable commits, a pull request reviewed before merging: the agent can do all of this, and does it better when it is the project's rule.
Tests are its best ally. Ask it to write the tests that describe the expected behavior first, then the code that makes them pass. Tests become the definition of "done": the agent knows exactly when it has finished, and you know it has not broken anything elsewhere.
To go further, Git worktrees let several sessions work in parallel on different branches without stepping on each other. And an automated review of pull requests catches some mistakes before you even read them.
Customizing the agent
Once you know the basics, Claude Code adapts to the way you work:
| Tool | What it is for | Example |
|---|---|---|
| Custom commands | Run a recurring instruction with one command | Prepare a pull request following your rules |
| Skills | Give the agent know-how it loads when it needs it | The SEO conventions for your pages |
| Subagents | Hand a task to a specialized agent, in its own context | A security reviewer |
| Hooks | Trigger an automatic action at a precise moment | Format the code after every edit |
| Plugins | Bundle all of this and share it with a team | Your agency's in-house kit |
| MCP | Connect the agent to external tools | Database, browser, Stripe |
Each one solves a concrete problem. There is no need to install everything on day one: add a tool when you notice you keep repeating the same thing.
Automating and building your own agents
Claude Code is not only for conversations. The claude -p command runs it without an interface, inside a script: generating release notes, analyzing an error log, processing a batch of files. Connected to GitHub Actions, it can review every pull request or fix a simple issue as soon as someone asks in a comment.
The same building blocks are available to developers through the Claude API and Anthropic's agent development kit: you can build your own agent, for example an assistant that sorts the support messages of your application. This is often where the developer's job changes most: you no longer only code features, you design systems that work with AI.
How much does it cost?
There are two ways to pay:
- a Claude subscription, at a fixed monthly price, with usage limits that depend on the plan;
- the API, billed by usage, more flexible for automation and teams.
Prices change: check Anthropic's official page before choosing. To keep spending under control, whatever the plan: short, focused sessions, a clean context, the right model for the right task, and a regular look at your usage.
The most common mistakes
- Accepting everything without reviewing. The agent is fast, and so are its mistakes. Reviewing is still your job.
- Asking for too much at once. A huge feature in one request gives a result that is hard to check.
- Not writing a CLAUDE.md. Without it, you repeat your rules at every session, and the agent forgets them.
- Working without Git. Without branches or commits, you cannot cleanly go back.
- Ignoring tests. Without tests, "it works" means nothing.
- Giving secrets to the agent. Keys, passwords and personal data stay out of the conversation.
- Believing you no longer need to learn to code. The opposite is true: the better you understand code, the better you steer the agent and the faster you spot its mistakes.
Claude Code, Copilot, Cursor or Codex?
Claude Code is not the only coding agent. GitHub Copilot, Cursor and OpenAI's Codex each have their strengths, prices and ways of working, and many developers combine two of them. Our article which AI coding assistant to choose gives you a method to decide. If you are still unsure, our course AI coding assistants compared puts them to the test on the same tasks. If you are new to programming, also start with the basics of web development: an agent speeds up people who know what they want to achieve.
Learn Claude Code on Mudey
The course Claude Code: build a booking website from A to Z, taught in French, follows exactly this path on a real project: Réunéa, the application of a business center that rents meeting rooms by the hour. You start from an almost empty folder and finish with an application online, on your own domain name.
- A real application: a showcase and room pages, booking with its business rules, online payment with Stripe, passwordless sign-in, two-factor authentication for staff, a customer area, an assistant that sorts support messages.
- 100% hands-on: every step is done on screen, in the terminal, VS Code and the browser, then a workshop with a commented solution puts you in charge at the end of each module. You also see the agent make mistakes, and how to get it back on track.
- Everything in this guide: installation, requests, Plan mode, CLAUDE.md, permissions, Git and GitHub, tests, commands, skills, subagents, hooks, plugins, MCP, GitHub Actions, the Claude API, teamwork, costs and deployment.
- Accessible: the basics of the terminal and Git are shown step by step, and no AI experience is required.
The first lessons are free to watch: check the preview on the course page to judge the method before you start. For more articles on the topic, visit the AI for coding page.
In short
Claude Code is an agent that reads your project, writes the code, runs the commands and checks its work. It saves a huge amount of time for people who know how to steer it: clear requests, Plan mode for big tasks, an up-to-date CLAUDE.md, controlled permissions, Git and tests to stay in control. Learn it on a concrete project, review everything it produces, and keep control over what goes to production.
Ready to put it into practice?
Browse the Mudey catalog and progress at your own pace, with a certificate at the end.
Browse the catalog

