01 / 10Foundation14 min lesson + 45 min lab

Know What You Are Operating

Install Claude Code, choose the right surface, and complete a first supervised loop without confusing the assistant, the repository, or the running application.

By the end

A working Claude Code installation and a plain-language model of where it runs, what it can see, what it may change, and how you will verify its work.

01

Claude Code is an agentic environment

Claude Code is not merely a chat box that happens to discuss programming. It can inspect files, search a codebase, run commands, edit source, and use connected tools while working toward an outcome. The important shift is that your request can cause changes in a real environment. You are supervising a worker with tools, not collecting an answer to paste somewhere later.

The same product is available through several surfaces, including a terminal, supported IDE integrations, the desktop app, and browser-based sessions. The surface affects where the process runs, which files and credentials are available, and how you review changes. A successful web session is not automatically proof that your laptop changed, and a local edit is not proof that a public deployment changed. Always name the surface and environment before judging a result.

  • Conversation: the instructions and explanations exchanged during one session.
  • Working directory: the folder Claude Code treats as the center of the task.
  • Tools: controlled capabilities for reading, editing, running commands, searching, and integrating with other systems.
  • Repository: a project folder whose history is tracked by Git.
  • Runtime: the process or service that actually executes the application.
02

Install and verify before building

Anthropic currently recommends the native installer for macOS, Linux, and WSL, with Homebrew, WinGet, Linux packages, and npm also documented. Follow the current setup page for your operating system instead of copying an old command from a video. After installation, use the version and doctor commands to distinguish a healthy installation from a shell-path, authentication, settings, or update problem.

Authentication is a separate layer from installation. A binary can be installed correctly while the account, provider, network, or organization policy prevents a session from starting. Never paste an API key into a source file or a prompt. If your organization uses Bedrock, Google Cloud, Microsoft Foundry, or a managed gateway, treat that provider choice as infrastructure configuration rather than something the coding agent should improvise.

03

Start in the canonical project

The directory from which you start Claude Code determines the initial project scope. Before typing `claude`, identify the exact folder that contains the source you intend to change. People often have a downloaded archive, an old clone, a preview worktree, and the real repository on the same computer. All can look plausible. Only one may be connected to the branch and deployment you care about.

Ask the terminal where you are, then ask Git whether the folder belongs to a repository and whether it already contains changes. If you cannot explain the path, repository root, current branch, and dirty files, pause before editing. This is not ceremony. It prevents a technically correct change from landing in the wrong copy of the project.

If you do not have a project yet, use the practice-project command below instead of downloading a random repository. A terminal prompt waits for a command; pressing Return runs it; the lines that follow are output; and a nonzero exit status means the command did not complete successfully. Read one command and its output at a time. The practice folder gives `pwd`, Git, package scripts, and Claude Code a harmless shared environment without pretending you already know a framework.

04

Understand the agent loop

Claude Code works through a loop: receive a goal, inspect context, choose a tool, observe the result, update its plan, and continue. Files and command output enter the conversation context as the loop proceeds. That context is finite, so a focused task with relevant evidence usually performs better than one enormous session containing several unrelated goals.

You remain responsible for the boundary and the finish line. Claude can discover implementation details, but it cannot infer which business risk you are willing to accept, which repository is authoritative, or whether a public side effect is appropriate unless you say so. A reliable first request names the outcome, restricts the scope, asks for inspection before edits, and defines a check that can pass or fail.

05

Complete one supervised loop

Begin with a read-only orientation request. Ask what the project does, which technologies it uses, where it starts, and how its own instructions say to verify changes. Compare the explanation with actual files such as the README, package manifest, build configuration, or application entry point. This teaches you to require evidence instead of accepting confident narration.

For the first edit, choose something narrow and reversible: correct one sentence, add one missing validation message, or update a small test fixture. Ask Claude to show the intended files and verification step before changing anything. Afterward, inspect the diff and run the named check. The goal is not to prove that Claude can produce code; it is to practice the full loop from intent to evidence.

Working reference

Commands and patterns

Install on macOS, Linux, or WSL

curl -fsSL https://claude.ai/install.sh | bash

Anthropic's current recommended native installer. Review the official setup page first, especially on managed machines.

Verify installation health

claude --version
claude doctor

The first command confirms the binary is available; the second reports read-only installation and settings diagnostics.

Create a no-risk practice project

mkdir claude-practice
cd claude-practice
npm init -y
npm pkg set scripts.check='node --version'
git init
npm run check
git status --short

Use this lane when you do not yet have a repository. `npm init` creates a small manifest, `git init` creates local version history, and the check script gives you a known success signal before Claude touches anything.

Confirm the project before launch

pwd
git rev-parse --show-toplevel
git status --short
claude

Record the current path, canonical Git root, and existing changes before starting the interactive session.

When the happy path breaks

Failure modes

01

Symptom

Claude describes or edits a project that looks right, but the expected application never changes.

Likely cause

The session started in an old clone, downloaded copy, sibling repository, or different worktree.

Recovery

Stop editing. Resolve the canonical path, Git root, branch, and deployment source with read-only checks, then restart the task in that directory.

02

Symptom

The `claude` command is missing or the session cannot authenticate.

Likely cause

Installation, shell path, account authentication, provider configuration, and network access are separate possible failures.

Recovery

Run `claude --version` and `claude doctor`, then follow the official setup or installation troubleshooting path that matches the reported layer.

03

Symptom

A first task expands into many files and unfamiliar architectural changes.

Likely cause

The request named an ambition but did not bound the first outcome, exclusions, or verification check.

Recovery

Interrupt the run, return to a small reversible edit, ask for a file-level plan, and require one observable pass/fail receipt.

Hands-on lab

Run a zero-risk orientation session

Open one real project—or create the supplied practice project—without authorizing edits, then build a verified map before asking Claude Code to change anything.

  1. 01Choose an existing project and write down why it is authoritative, or run the no-risk practice-project commands and label it as disposable learning work.
  2. 02Run `git rev-parse --show-toplevel`, `git status --short`, and `git branch --show-current` outside Claude Code.
  3. 03Start Claude Code and ask it to explain the project's purpose, entry point, start command, test command, and deployment configuration without editing files.
  4. 04Require a file path or command as evidence for every answer.
  5. 05Compare at least three claims with the cited files yourself.
  6. 06End the session with a written statement of what is confirmed, what is inferred, and what remains unknown.

Deliverable: A one-page environment orientation note containing the surface, path, repository root, branch, dirty state, runtime command, verification command, and unresolved questions.

Reusable artifact

Claude Code session header

Paste this at the beginning of a consequential task so the environment and proof boundary are explicit.

Surface: [terminal / IDE / desktop / web]
Canonical project path: [absolute path or cloud repository]
Repository and branch: [repo + branch]
Existing changes to preserve: [git status summary]
Environment: [local / preview / production]
Outcome: [one observable result]
Allowed scope: [files, directories, systems]
Forbidden actions: [publishing, secrets, deletion, external messages, etc.]
Verification: [command, test, screenshot, or live observation]
Stop and ask when: [authority or ambiguity boundary]

Before you move on

Receipt checklist

  • `claude --version` and `claude doctor` complete without an unresolved blocker.
  • The canonical project path, Git root, branch, and existing dirty files are recorded.
  • At least three orientation claims are tied to actual files or command output.
  • No edits, secrets, deployments, or external side effects occurred during the orientation lab.

Primary sources

Continue with the source

Home
Book
Blog
Calugaru Labs
GitHub
LinkedIn
Email
Theme