Back to resources
// guide · tooling

The basics of Claude Code

An agent that codes in your terminal, with access to your files, git and your commands. It's not autocomplete: it's a colleague that reads the repo, proposes a plan, edits, and runs the tests. Here's the mental model and the reflexes that matter.

GuideJul 20, 2026~10 min · intermediate
Claude CodeCLAUDE.mdskillsMCPsubagentsgit
01

What it actually is

Claude Code is a command-line agent. You talk to it in natural language, and it acts on your project: it reads files, writes them, runs commands, makes commits. The difference from a chat is access: it works on your real code, not on a copy-paste.

a chat / autocomplete

suggests.

you copy-paste the context
sees one file at a time
runs nothing
Claude Code

acts.

reads the whole repo when needed
edits multiple files
runs tests, build, git
i

It's the same shift in posture as for application agents: from “generate an answer” to “carry out a task.” I talk about it in from a prompt to agentic.

02

Getting started

One-command install, then start the session from the project root — this matters: Claude takes the current directory as its working scope.

shellcopy
$ npm i -g @anthropic-ai/claude-code
$ cd ~/mon-projet # toujours lancer DEPUIS la racine du projet
$ claude # ouvre la session agent dans le terminal
i

A Claude Code session needs Anthropic API access (or a compatible subscription). Run it in a git repo: you can review and revert its changes like any commit.

03

The working loop

The core rhythm: you describe an intent, Claude explores, proposes a plan, then edits — showing you each diff before applying. You stay in the loop: accept, reject, or redirect.

sessioncopy
> ajoute un bouton "exporter en CSV" sur la page factures
# Claude explore le repo, propose un plan, puis EDITE les fichiers.
# tu vois chaque diff avant qu'il soit applique -> tu acceptes ou refuses.
> lance les tests
# il execute "npm test", lit la sortie, et corrige si ca casse.
be precise about intent, not implementation — let it propose;
one task at a time: small loops > a mega-prompt;
review the diffs — you remain responsible for the code.
04

CLAUDE.md — the single most important file

If you remember one thing: write a CLAUDE.md. It's a Markdown file at the root, read automatically at the start of every session, that serves as the project's long-term memory. Without it, you re-explain your stack and conventions every time — and the agent guesses the rest, often badly.

CLAUDE.mdcopy
# CLAUDE.md — lu automatiquement au demarrage de chaque session
# c'est la memoire longue du projet : mets-y ce que tu redis a chaque fois
## Stack
- Next.js 15 (app router), TypeScript strict, Tailwind
- base : Postgres via Prisma
## Conventions
- composants en PascalCase dans src/components
- pas de "any", pas de console.log en commit
- tests : vitest, a lancer avec "npm test" avant tout commit
## Commandes
- dev : npm run dev
- build : npm run build

What makes a good CLAUDE.md isn't length, it's density: the non-obvious decisions, the project's traps, the exact commands. Every line saves you a repeated correction.

the stack and versions (what the agent can’t guess);
house conventions: naming, folder structure, what’s forbidden;
the exact commands: dev, build, test, lint — so it verifies its own work;
known traps: “don’t touch X,” “migration Y must run before Z.”

Treat it like code: version it, review it as a team, grow it the moment you catch yourself repeating an instruction to the agent. A living CLAUDE.md means an agent that knows your project instead of guessing it.

i

It layers: a global CLAUDE.md (~/.claude/CLAUDE.md) for your personal preferences, one per repo for the project, and even one per subfolder for a specific module.

05

Skills — reusable know-how

A skill is a procedure you teach once and Claude reuses on its own. Concretely: a folder with a SKILL.md file describing a know-how (deploy, review a PR, generate a report) and, if needed, scripts. Claude reads the description and triggers the skill when the task matches.

arborescencecopy
.claude/skills/
deploy-ec2/
SKILL.md # nom + description : quand et comment l'utiliser
scripts/ # scripts optionnels que la skill peut lancer
review-pr/
SKILL.md

The SKILL.md is a header (name + description — that's what Claude reads to decide) plus steps. The description is the critical part: state clearly when to use it.

SKILL.mdcopy
---
name: deploy-ec2
description: >
Deployer l'app sur notre EC2 via Docker + Caddy.
A utiliser quand on parle de mise en prod ou de release.
---
# Etapes
1. npm run build, verifier que ca passe
2. git push, se connecter en SSH a l'instance
3. docker compose pull && docker compose up -d
4. curl le /health, confirmer 200 avant de terminer

The difference from CLAUDE.md: CLAUDE.md is always loaded (the permanent context), a skill is loaded only when relevant. You put one-off procedures in skills to keep the context light.

06

The superpowers

Once the basics are in place, Claude Code unlocks capabilities that take it from assistant to team. Three that genuinely change the game:

sessioncopy
# 1. des sous-agents qui bossent en parallele sur des taches isolees
> lance 3 agents : un qui ecrit les tests, un le back, un le front
# 2. des serveurs MCP : brancher des outils externes (GitLab, Sentry, une DB)
$ claude mcp add gitlab -- npx -y @modelcontextprotocol/server-gitlab
# 3. des slash commands : des prompts reutilisables, versionnes dans le repo
> /review # .claude/commands/review.md
> /ship
01
Subagents

Claude delegates isolated tasks to parallel agents, each with its own context. Useful to parallelize, or to have a “verifier” agent review another’s work.

02
MCP

The Model Context Protocol plugs in external tools: GitLab, Sentry, a database, your own service. The agent then acts well beyond files.

03
Slash commands

Reusable prompts, versioned in .claude/commands. /review, /ship: your workflows become a command, shared with the team.

04
Hooks

Scripts triggered automatically at key moments (before a commit, after an edit): lint, formatting, guardrails — without thinking about it.

i

Subagents and MCP are the very same ideas as on the product side: give tools and make several agents collaborate. I dig into them in give an agent tools.

07

Keeping it on the rails

01
Small steps

One feature per loop. An agent set loose on “redo the whole app” drifts; on a scoped task, it’s surgical.

02
Git as a net

Commit often. A change that goes sideways reverts in one command — you’re never afraid to let it try.

03
Make it verify

Ask it to run tests and the build. An agent that reads its own error output fixes itself.

04
You approve

Diffs pass before your eyes. For destructive actions, keep control — it’s human-in-the-loop.

!

Don't let it run without review, especially on commands that delete or deploy. Same principle as on the product side: human-in-the-loop, for real.

08

Sources & further reading

01Claude Code — Overview (doc officielle)The entry point: installation, surfaces (terminal, IDE, desktop, web) and what the agent can do.02Best practices for Claude CodeAnthropic's own patterns: explore then plan then code, give it a way to verify, manage the context window.03CLAUDE.md — How Claude remembers your projectWhere CLAUDE.md files live, how they load and stack, and what belongs in them (or not).04Slash commands referenceThe full list: /init, /memory, /permissions, /clear, /compact, /rewind — the ones you actually use.05Extend Claude with skillsThe SKILL.md format, on-demand loading, and where the line with CLAUDE.md sits.06Connect Claude Code to tools via MCPPlugging in MCP servers (issue tracker, database, monitoring) and the configuration scopes.07Configure permissionsThe permission system: allow/ask/deny rules, modes, and team-wide policies you can check in.

Claude Code isn't magic: it's a fast colleague that needs a frame. The core is the CLAUDE.md — the project's memory. Then skills capitalize your know-how, and superpowers (subagents, MCP, commands) turn it into a team. Small loops, frequent commits, reviewed diffs: that's what takes it from gadget to multiplier.