Guide · Intermediate · 10 min
Claude Code reference guide: installation, subscriptions and API access, commands, CLAUDE.md, MCP, subagents, and best practices
Install Claude Code, choose subscription or API billing, configure CLAUDE.md, MCP, and subagents, and manage permissions, testing, and costs with clear checks.

Claude Code is Anthropic’s coding agent: it works with a project’s files and tools and can carry a task through analysis, edits, and verification. To use it effectively, choose a billing method, install the client, define instructions and permissions, and review changes before integrating them. This guide covers that setup and a repeatable workflow, with information verified on October 24, 2026.
Understand what you are installing
Claude Code can read code, propose changes, and use a terminal to check its work. Distinguish between the client installed on your computer and the model service it connects to: having the program installed does not mean you have a model running locally.
Its practical value lies in connecting project understanding with action. You can request a fix, have files modified, and run the relevant checks within the same session. That requires being able to recognize a risky command, an unrelated change, or an inadequate test.
The article How coding agents work explains this loop and its limits. Here, the goal is to prepare an environment where you can inspect results, resume work, and account for costs.
Before you begin, make sure you have:
- a terminal and a supported operating system;
- an Internet connection and an account authorized to use the service;
- a project whose necessary contents you are allowed to share;
- a backup or version history that lets you restore the previous state;
- the project’s build and testing tools.
Check that last requirement before starting. If your application already fails without the agent’s involvement, record the baseline result. It will help you distinguish existing problems from regressions introduced by the changes.
Choose between a subscription and API billing
Individual subscription access is available through Claude. As of October 24, 2026, the official pricing page lists Pro at $20 per month when paid monthly, or $200 billed annually, with Claude Code included. Max starts at $100 per month. These prices exclude applicable taxes and remain subject to the plan’s terms and limits.
Do not treat a subscription as a guarantee of a particular workload capacity. How much work you can complete depends on the tasks, context, and available models. Including Claude Code in a plan does not mean usage is unlimited.
| Criterion | Individual subscription | API billing |
|---|---|---|
| Access | Account with a compatible plan | Configured Claude Console access |
| Budget | Recurring payment, with usage limits | Usage billed under API terms |
| What to check first | Available plan and usage allowance | Organization, billing, and access |
| Monitoring | Subscription usage and any additional charges | API account spending and limits |
| Practical fit | Interactive work within a subscription allowance | Work requiring separate usage tracking |
To compare the costs of these access options, measure representative tasks. Record processing time, the rework required, and reported usage. A price per token is not enough to predict the cost of a complete fix.
API credits, additional usage charges, and benefits associated with particular plans have their own terms. Check what is actually enabled in your account before treating an API credit balance as part of your subscription allowance.
1. Install the client and check that it works
The following commands come from the official installation documentation, consulted on October 24, 2026. It specifies, among other requirements, an Internet connection and at least 4 GB of RAM. Check its list of supported systems before installing on an older computer or a particular Linux distribution.
On macOS, Linux, or WSL:
curl -fsSL https://claude.ai/install.sh | bash
In Windows PowerShell:
irm https://claude.ai/install.ps1 | iex
These commands download and run an installer. Use the official address and follow your organization’s rules for running downloaded scripts.
Next, open a new terminal window and check the client:
claude --version
The version shown identifies your actual installation. When troubleshooting, avoid copying a version number from an old tutorial: record the one your own installation returns.
According to the documentation, the native installation updates automatically. For a team, agree on an update policy and record the version whenever you investigate a reproducible issue. A difference in behavior may come from the client, but it may also come from repository instructions, permissions, or the remote service.
Install the project’s dependencies separately. Successfully starting Claude Code does not establish that your compiler, test database, or development environment works.
2. Sign in and define the first task
Move into the project directory before launching the client. The official command-line reference documents how to start an interactive session:
claude
Follow the sign-in flow. To explicitly choose a Claude Console login with API billing, the documentation provides this command:
claude auth login --console
Check which account is active before starting a lengthy task. On a computer used for multiple organizations, a technically successful login can still put you in the wrong billing environment.
Begin with an inspection request that allows no changes. For example:
Repérez le point d’entrée de l’application et les vérifications existantes.
Expliquez comment reproduire le problème décrit.
Ne modifiez aucun fichier.
Signalez les informations qui vous manquent.
This step mainly checks whether you and the agent share an accurate understanding of the project. Verify the paths it cites and ask which files support each important conclusion.
Then define an observable outcome: the behavior to fix, the permitted scope, the expected checks, and any actions requiring approval. The guide Working effectively with a coding agent develops this approach.
For your first change, choose a narrowly scoped fix. A broad migration combines too many uncertainties to quickly distinguish a setup problem from a misunderstanding of the request.
3. Use commands in the right place
Terminal commands launch the program or resume a session. Commands beginning with a slash are entered inside Claude Code. The official interactive command list remains the reference for availability in your environment.
| Interactive command | Purpose | What to check |
|---|---|---|
/plan | Enter plan mode before making a change | Proposed assumptions and scope |
/init | Prepare project instructions | Accuracy of the conventions identified |
/memory | Review and refine instructions | Which files are actually being used |
/permissions | Inspect permissions | Scope of retained permissions |
/context | Inspect context usage | Information that is no longer needed |
/compact | Summarize the conversation | Constraints that must be explicitly retained |
/usage | Check usage | Remaining allowance before continuing |
/mcp | Inspect MCP connections | Servers, authentication, and status |
To continue the most recent conversation in the current directory, run this in your terminal:
claude -c
Resuming preserves continuity, but you still need to check what has changed in the meantime. A colleague may have edited the files, or a remote dependency may have changed.
For an unrelated task, start a fresh session with a brief account of the current state. Accumulating different requests makes it harder to identify which decisions still apply.
Before compacting the context, write a handoff note covering the objective, relevant files, accepted decisions, completed checks, and unresolved problems. This record will also help if you need to move to another session.
4. Write a short, verifiable CLAUDE.md
CLAUDE.md holds persistent instructions for the agent. The documentation on memory and instructions distinguishes shared project rules in ./CLAUDE.md or ./.claude/CLAUDE.md from personal preferences in ~/.claude/CLAUDE.md.
Use /init to prepare a starting point, then review it. A convention inferred from existing code may be outdated, accidental, or limited to a particular subdirectory.
Here is an editorial example to adapt:
# Règles de travail
- Avant de modifier, identifier le comportement attendu et son emplacement.
- Préserver les changements déjà présents dans le répertoire de travail.
- Utiliser les vérifications définies par le projet.
- Signaler une vérification impossible et sa cause.
- Demander une validation avant publication ou modification distante.
- Terminer par les fichiers modifiés, les tests et les limites restantes.
Add repository-specific commands after verifying them. A precise instruction, such as the path to a relevant test suite, is more useful than a general request for quality.
Keep out secrets, copied documentation, and contradictory rules. Instruction files provide context; they are not an access control mechanism. Sensitive restrictions must also be enforced through permissions or the environment.
For larger projects, the documentation supports rules in .claude/rules/. Organize them by topic when that makes maintenance easier. If the repository already contains AGENTS.md, check the current loading rules before duplicating instructions: the presence of both formats does not mean every file will automatically be read together.
5. Set permissions before granting more autonomy
An instruction expresses your intent; a permission determines which actions the client allows. The permissions documentation describes tool-specific rules and different approval modes. Some permissions can persist, so inspect their scope before choosing an option that suppresses later approval requests.
Apply the principle of least privilege: start with the access required for the task, then expand it when a specific need arises. A local fix does not automatically justify production credentials or publishing rights.
When a command is proposed, check:
- which files and directories it affects;
- whether it uses network access;
- which credentials or variables it may use;
- its side effects and whether they can be reversed.
Do not mistake plan mode for a fully isolated environment. If you need to run unfamiliar code, also provide protections at the operating system and account levels.
The guide to securing AI agents explains these protections. In your daily workflow, clearly separate preparation from release: a reviewed change may be ready to integrate without authorizing automatic publication.
Evaluate test scripts as well. Their names do not guarantee that they are harmless: they may install dependencies, contact services, or modify data. Even a familiar command needs to be understood in the context where it will run.
6. Add MCP for a specific need
MCP connects the agent to external tools and sources. The Claude Code MCP documentation distinguishes, among other options, remote HTTP servers from local processes using the stdio transport.
To demonstrate the syntax without requiring a particular service, here is the official generic example:
claude mcp add --transport http example https://mcp.example.com/mcp
This is an illustrative address. Replace it with the official endpoint for your chosen server, then inspect the connection with /mcp.
Configuration can be local to your use of a project, personal, or shared with the project. Project-scoped configuration uses .mcp.json, among other files. Review this file before accepting it in a repository received from a third party.
Choose a first server that supports a specific task, such as consulting an authorized documentation source. Check its publisher, permissions, authentication, and the data it receives. The MCP server directory helps you find relevant listings; installation instructions should come from the server’s publisher.
A document returned by a server remains external data. It may contain a prompt injection, even when the connection itself works correctly.
Establish a simple rule: reading a ticket or document does not authorize the agent to follow instructions inside it to send secrets, change permissions, or run a command unrelated to your request.
7. Configure specialized subagents
A subagent receives a distinct assignment and works within its own context. The official subagent documentation supports definitions in .claude/agents/ for the project and ~/.claude/agents/ for the user.
You can ask Claude to prepare a definition, then review it. Specify the assignment, permitted tools, and expected output. For example, a reviewer can look for regressions without having permission to edit files.
As of October 24, 2026, the documentation states that /agents displays a reminder directing you to ask Claude or edit the files. Older tutorials that consistently show an interactive setup wizard therefore no longer describe every current client.
Delegation helps with tasks that can be separated: locating a section of code, analyzing a failure, or identifying edge cases. It makes work more complicated when several agents modify the same files simultaneously.
Require an actionable report: finding, location, evidence, and uncertainty. A general opinion about code quality does not give you enough information to decide what to fix.
A subagent also consumes resources. Compare its contribution with the extra coordination involved: writing instructions, waiting, reading the report, and resolving contradictions. Start with a clearly defined specialization before organizing several tasks in parallel.
Verify the result and control the real cost
Request a coherent, limited change, then inspect the diff before adding another request. You should be able to explain how each modified file contributes to the expected outcome.
Organize validation around behavior:
- Observe or reproduce the original problem.
- Verify the result after the change.
- Check related behavior that could be affected by a regression.
- Examine any dependencies, permissions, or data that may be affected.
A passing test provides evidence about what it covers. It does not prove that the entire change is correct. Conversely, any check that could not be run should be reported, along with the reason and its effect on confidence in the result.
To control costs, focus on reducing avoidable rework. Provide an example input, the expected result, and essential constraints from the start. Ask for a targeted search before a broad exploration of the repository.
Record abandoned attempts too. A session that repeats the same hypothesis without new evidence needs redirection: summarize the failure, request another explanation, and set a stopping condition. Compare alternatives using the same task; our AI agent directory provides listings to help broaden that comparison.
Common problems
The command is not recognized. Open a new terminal, then check the installation and executable search path using the documentation. Reinstalling repeatedly without identifying the underlying problem can make diagnosis more confusing.
Sign-in selects the wrong account. Check the organization and billing method before resuming. Never share an API key or login code in a public troubleshooting report.
Instructions seem to be ignored. Check which files are being used, look for contradictions, and simplify the rules. Replace vague guidance with a verifiable outcome.
An MCP server remains unavailable. Separate the possible causes: an incorrect endpoint, authentication, network access, or a missing local process. Test one connection at a time.
Changes spread beyond the requested scope. Interrupt the task, review the diff, and restate the boundaries. Ask for an explanation of unexpected file changes before continuing.
Tests still fail. Compare the results with the baseline. An incomplete environment, an unavailable service, or missing test data requires a different diagnosis from a code regression.
Checklist before keeping the changes
- The account, organization, and billing method are identified.
- The project’s original state can be restored.
- Instructions describe verifiable rules.
- Permissions match the task.
- External connections serve an explicit need.
- Every modified file has been reviewed.
- Checks cover the expected behavior.
- Checks that could not be run and remaining uncertainties are recorded.
- Usage and rework have been reviewed.
- Any remote publication requires an explicit decision.
Related pages
Frequently asked questions
Can I use Claude Code without a subscription?
You can use API billing through Claude Console instead of an individual subscription. This requires configured access and billing; installing the software does not give you a free allowance of computing resources.
Can I use Claude Code without knowing the terminal?
The documentation also offers a desktop interface. To work on a software project, you still need to be able to review changes, understand errors, and verify the result, or have someone qualified handle that validation.
Should I put all my documentation in CLAUDE.md?
Focus on rules that affect the agent’s decisions: constraints, known pitfalls, and required checks. Extensive documentation can be consulted as needed; putting it in general instructions does not guarantee that it will be applied correctly.
Can a subagent guarantee an independent review?
A subagent provides a separate working context, but it may share the main agent’s blind spots. Use its report to guide human review and testing, rather than treating it as certification that the change is correct.
Do I need MCP to get started?
No. Start with your project’s files and tools, then add a connection when you have a specific need. Each additional server brings access permissions, configuration, and possible points of failure.