Skip to content
D-CSIL™

AI Guide · 2026-11-20 · 1:04 PM CT

Claude Code, safely: install to first verified fix in five steps

Paul Derrington, Jr.

By Paul Derrington, Jr.

CEO | Chief Engineer | Research Engineer | Editor, D-CSIL

5 min read

Follow @PaulDerrington on X

Key Takeaways

Claude Code is Anthropic's terminal coding agent. Depending on its permissions, it can inspect project files, propose edits and run commands. This guide uses a short CLAUDE.md, plan mode before edits, and a test you can check yourself.

A hand typing on a backlit keyboard in dim light
Photo: Soumil Kumar / Pexels

Step 1 — Check the plan, then install

You need three things before you start: a terminal, a code project, and a way in. Anthropic's quickstart lists a Claude subscription (Pro, Max, Ultra, Team, or Enterprise), a Claude Console account, or access through a supported cloud provider. Claude Academy's install lesson is blunt about the free plan: it does not include Claude Code.

On macOS, Linux, or WSL, run: curl -fsSL https://claude.ai/install.sh | bash. On Windows PowerShell, run: irm https://claude.ai/install.ps1 | iex. Homebrew (brew install --cask claude-code) and WinGet (winget install Anthropic.ClaudeCode) also work, but Anthropic notes those two do not auto-update by default; native installs update in the background. When the installer finishes, open a new terminal and run claude --version. A working install prints a version number followed by (Claude Code). If your shell says claude is not found, the install directory — ~/.local/bin on macOS and Linux — is not on your PATH yet.

Step 2 — Start inside your project and sign in

Start Claude Code from the project folder, not your home folder. The starting directory gives the session its project context; it is not a security boundary. What Claude Code can read, change or run depends on its permissions and sandbox settings. On first use, follow the sign-in prompts for your account. If you already use an Anthropic API key, follow Anthropic's account and key-handling guidance; never paste the key into the chat or commit it to the project.

The prompt shows the version, the current model, and the working directory. Type /help for the available commands, /login to switch accounts later, and /resume to continue a previous conversation. Two shell forms are worth knowing on day one: claude -c continues the most recent conversation in the current directory, and claude -p "explain this function" runs a one-off query and exits.

Step 3 — Run /init, then cut CLAUDE.md down

Inside the session, run /init. Claude Code analyzes the codebase and generates a starting CLAUDE.md; if one already exists, it suggests improvements instead of overwriting it. CLAUDE.md is the instruction file Claude reads at the start of every session. The project file lives at ./CLAUDE.md or ./.claude/CLAUDE.md and is shared with your team through version control. Your personal file lives at ~/.claude/CLAUDE.md, and private per-project notes go in CLAUDE.local.md, which you add to .gitignore.

Then edit the generated file down. Anthropic's target is under 200 lines per CLAUDE.md file: longer files consume more context and reduce adherence. Keep only what Claude cannot work out from the code — the exact build and test commands, places where the code misleads, and decisions that were never written in the repo. Be concrete enough to verify: "Use 2-space indentation" instead of "Format code properly," and "Run npm test before committing" instead of "Test your changes." Run /context all and check the file appears under Memory files. One limit to know: Anthropic treats CLAUDE.md as context, not enforced configuration — Claude usually follows it, but nothing guarantees it. A rule that must never bend belongs in a hook or a deny rule, not in prose.

Step 4 — Plan before it touches anything

A permission mode sets what Claude can do in a session without asking you first. Press Shift+Tab during a session to cycle modes; the status bar shows the active one. For unfamiliar code, start in plan mode: claude --permission-mode plan. In plan mode Claude reads files and explores, then produces a plan — it does not edit your source files until you approve. Ask for the files it would touch, the order of the changes, and how you would roll back.

If you want to review edits and commands yourself, use Manual mode (called default in configuration). Accept Edits automatically approves file edits and some filesystem commands. Auto mode lets Claude act without routine approval prompts; a classifier reviews actions that reach it. Anthropic documents Auto as the built-in starting mode for interactive terminal and VS Code sessions in v2.1.283 or later, subject to configuration and availability. Check the mode indicator before proceeding.

Step 5 — Give it a check, then make it show the evidence

For a first fix, pick a small, observable UI bug. For example: “In the sample app, clicking Clear filters leaves the results count unchanged. Find the component that updates the count, add a regression test for the reset, and make the smallest fix that passes it.” This identifies the symptom and gives you a concrete way to verify the change.

Then give Claude a check that comes back pass or fail: a test file, a build's exit code, a linter, or a script that diffs output against a fixture. Anthropic's reasoning is plain — without a check, Claude stops when the work looks done, and you become the test suite. With one, it makes the change, runs the check, reads the output, and fixes what broke before running it again. Put the exact check command in CLAUDE.md so every session has it, and ask for evidence: the command it ran and its output, not just a claim that tests pass. Git work is conversational too — ask it to show status or prepare a commit and review what it proposes. When you switch to an unrelated task, run /clear so the new task starts with a clean context instead of paying for the old one on every turn.

Disclaimer: Derrington Collaborative AI is my personal business, operated independently of and outside my official U.S. Government position and duties. The views and opinions expressed on this site and on any and all of my social media accounts are my own. They do not reflect the official policy or position of the Department of the Army, the Department of Defense, or the U.S. Government. Mention of any company, product, or service does not constitute an official endorsement.