Back to blog
Cloud & DevOpsbeginner

Claude Code for Beginners: The Complete 2026 Guide

Learn Claude Code from scratch β€” installation, CLAUDE.md setup, Plan Mode, context management, custom commands, hooks, pricing, and 6 power-user tips that make you dangerous with AI-assisted engineering.

LearnixoApril 16, 202612 min read
Claude CodeAI ToolsAnthropicDeveloper ProductivityClaudeAI CodingTerminalWorkflow
Share:𝕏
Anthropic Claude

Claude Code β€” Agentic AI for Engineers

Launched February 2025. Reached $1 billion in annualized revenue by mid-2025. Not autocomplete β€” a reasoning partner that reads your entire codebase and executes multi-step changes.

What Is Claude Code?

Claude Code is Anthropic's terminal-native agentic coding assistant. Unlike GitHub Copilot (which autocompletes your next line), Claude Code reasons about your entire project, plans an approach, executes multi-file changes, runs your tests, and iterates β€” all from your terminal.

It has a 200,000-token context window β€” large enough to hold 50+ files simultaneously. When you ask it to "add JWT auth to the API", it doesn't guess. It reads your project structure, finds the relevant files, understands your conventions, then makes all the changes correctly.


Claude Code vs The Competition

| Feature | Claude Code | GitHub Copilot | Cursor | ChatGPT | |---|---|---|---|---| | Context window | 200k tokens | ~8k tokens | ~10k tokens | 128k tokens | | Approach | Agentic reasoning | Autocomplete | Multi-file edit | Conversational | | Reads full codebase | βœ… Yes | ❌ No | ⚠️ Partial | ❌ No | | Runs shell commands | βœ… Yes | ❌ No | ❌ No | ❌ No | | Executes tests | βœ… Yes | ❌ No | ❌ No | ❌ No | | Best for | Architecture & debugging | Quick completions | Refactoring | Brainstorming | | Needs IDE plugin | ❌ Terminal only | βœ… VS Code, JetBrains | βœ… VS Code fork | ❌ Browser |

The right mental model: Use Claude Code for complex reasoning and architecture. Use Copilot for fast boilerplate. Use ChatGPT for exploration. They're not competitors β€” they're different tools for different jobs.


Installation

Windows

Bash
# Step 1 β€” Install Node.js (LTS) from nodejs.org, then verify:
node -v
# v22.x.x

# Step 2 β€” Install Claude Code globally
npm install -g @anthropic-ai/claude-code

# Step 3 β€” Launch
claude

On first launch you'll be asked to:

  1. Choose a colour theme (dark/light/auto)
  2. Sign in with your Anthropic account
  3. Trust the current directory (say yes for your project)

macOS / Linux

Bash
# Option A β€” Homebrew (macOS)
brew install --cask claude-code

# Option B β€” Official installer (macOS/Linux)
curl -fsSL https://claude.ai/install.sh | bash

Three Ways to Access

πŸ’» CLI (Recommended)

Run claude in your terminal. Fastest, lowest overhead. Best for deep coding sessions.

πŸ–₯️ Desktop App

Separate window alongside your editor. More memory use but good for multi-window setups.

☁️ Cloud / Mobile

Browser at claude.ai or Android app. Useful for reviewing code remotely, not for full sessions.


CLAUDE.md β€” How You Onboard Claude to Your Project

Claude

CLAUDE.md is the most impactful thing you can do. It loads automatically at the start of every session, survives context compaction, and eliminates the need to re-explain your project every time.

Create this file at the root of your project:

MARKDOWN
# Project: Clinic Appointment System

## What
- .NET 9 Web API + EF Core 9 + PostgreSQL
- React 19 frontend (TypeScript, TanStack Query)
- Kafka for event-driven communication
- JWT auth (JJWT 0.12) β€” stored in httpOnly cookies only

## Project structure
src/
β”œβ”€β”€ Api/           β†’ Controllers, middleware, DI registration
β”œβ”€β”€ Application/   β†’ CQRS handlers (MediatR), DTOs, validators
β”œβ”€β”€ Domain/        β†’ Entities, domain events, value objects
β”œβ”€β”€ Infrastructure/β†’ EF Core, Kafka, email, external services
└── Tests/         β†’ Unit + integration (Testcontainers)

## Build & run
dotnet build                     # build all
dotnet test                      # run tests (requires Docker for DB)
npm run dev                      # start frontend

## Coding standards
- Package by feature, never by layer
- Use primary constructors (.NET 9+)
- All public methods need XML doc comments
- No magic strings β€” use constants or enums
- Cancellation tokens on all async methods
- FluentValidation for all commands

## Hard rules
- Never use var β€” always explicit types
- Never push to main directly β€” always branch + PR
- Never commit commented-out code
- Never use Console.WriteLine β€” use ILogger

What to include in CLAUDE.md

| Section | What to put | |---|---| | What | Tech stack, key libraries, auth approach | | Structure | Folder layout with 1-line descriptions | | Commands | Build, test, run, migrate commands | | Standards | Naming, patterns, things to always/never do | | Rules | Git workflow, testing requirements, forbidden patterns |

Keep it under 200 lines. Longer files cause instruction adherence to drop as the context fills up.


Plan Mode β€” Think Before You Code

Plan Mode is Claude Code's most underused feature. It restricts Claude to reading only β€” no writes, no edits, no shell commands β€” just analysis, questions, and a written plan.

# Activate Plan Mode
Press: Shift + Tab  (twice)
Windows alternative: Alt + M

In Plan Mode Claude can:

  • βœ… Read files and grep code
  • βœ… Browse documentation
  • βœ… Ask clarifying questions
  • βœ… Write a detailed implementation plan
  • ❌ Create or modify files
  • ❌ Run shell commands

When to use Plan Mode

πŸ—οΈ New feature across multiple files

Get the plan first. Know which files will change before any change happens.

πŸ” Unfamiliar codebase

Let Claude explore and explain before touching anything.

πŸ›οΈ Architectural changes

Migrations, refactors, adding new layers β€” plan it out first.

πŸ€” Not sure of approach

Ask Claude to propose three approaches and trade-offs before picking one.


Context Management

Claude's 200k window is large, but long sessions accumulate noise β€” old questions, discarded approaches, irrelevant context. Here's how to stay sharp:

Bash
/clear    # reset conversation history, CLAUDE.md is reloaded automatically

Rules of thumb:

  • Start a fresh session for a new feature β€” don't carry baggage from the last task
  • For very large codebases, load files on-demand with @filename instead of asking Claude to read everything upfront
  • Use subagents for isolated tasks (e.g. "use the Explore agent to find all places we handle auth") β€” they run in separate context windows and report back
  • Keep CLAUDE.md under 200 lines β€” link to external docs rather than pasting them inline

Custom Slash Commands

Store reusable prompts as .md files in .claude/commands/ and call them with /project:name:

.claude/
└── commands/
    β”œβ”€β”€ review.md         β†’ /project:review
    β”œβ”€β”€ pr.md             β†’ /project:pr
    β”œβ”€β”€ test.md           β†’ /project:test
    └── migrate.md        β†’ /project:migrate

Example β€” PR generator:

MARKDOWN
# .claude/commands/pr.md
Generate a pull request description for the current branch.

Staged changes:
!`git diff --cached`

Commits since main:
!`git log main...HEAD --oneline`

Write:
1. A concise title (under 70 chars)
2. Summary bullet points (what changed and why)
3. A test plan checklist
4. Any breaking changes or migration notes

Invoke it: /project:pr

Example β€” Code review:

MARKDOWN
# .claude/commands/review.md
Review the following changes as a senior engineer.

Diff:
!`git diff main...HEAD`

Check for:
- Logic bugs and edge cases
- Missing error handling  
- Security issues (SQL injection, auth bypass, hardcoded secrets)
- Missing tests
- Non-idiomatic patterns for this codebase

Label each finding: βœ… Good / ⚠️ Warning / ❌ Blocker

Hooks β€” Automate at Every Step

Hooks run shell commands automatically at specific Claude Code lifecycle events. Configure them with /hooks or by editing .claude/settings.json:

JSON
{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Write|Edit",
        "hooks": [
          {
            "type": "command",
            "command": "dotnet build --no-restore 2>&1 | tail -5"
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "echo 'βœ… Claude finished. Review changes with: git diff'"
          }
        ]
      }
    ]
  }
}

| Hook event | When it fires | Example use | |---|---|---| | PreToolUse | Before Claude uses a tool | Validate, log, gate | | PostToolUse | After a tool completes | Run linter, build, format | | Stop | When Claude finishes a task | Send notification, run tests |


Pricing

| Plan | Cost | Claude Code | Messages per 5h window | |---|---|---|---| | Free | $0 | ❌ No | β€” | | Pro | $20/mo | βœ… Yes | ~45 messages | | Max 5x | $100/mo | βœ… Yes | ~225 messages | | Max 20x | $200/mo | βœ… Yes | ~900 messages |

Rate limits use a 5-hour rolling window β€” no overage fees, just a wait until the window resets. For daily professional use, Pro ($20) is enough. For intensive architecture sessions or team use, Max 5x is the sweet spot.


6 Power-User Tips

🎯

1. Be specific like a senior engineer

❌ "Add auth" β†’ βœ… "Add JWT authentication using JJWT 0.12. Tokens go in httpOnly cookies, not localStorage. Refresh token rotation. Add a /api/auth/login, /api/auth/refresh, and /api/auth/logout endpoint. Follow the existing controller pattern in AppointmentController."

πŸ’Ύ

2. Commit after every Claude change

Treat each completed Claude task like a save point. If the next request introduces a regression, git reset --hard HEAD gets you back immediately. No commit = no safety net.

πŸ”

3. Review every line Claude writes

Claude may add packages you didn't ask for, create helper utilities that already exist, or write valid-but-non-idiomatic patterns. You own the code. Read the diff before committing.

πŸ—ΊοΈ

4. Plan before you execute

For any change touching more than 2 files β€” use Plan Mode first. A 2-minute planning phase prevents a 20-minute revert.

πŸ“‹

5. Invest in your CLAUDE.md

Every pattern you document once means you never have to re-explain it. Add things to CLAUDE.md the moment you correct Claude β€” if you had to say it once, it belongs in the file.

πŸ’ͺ

6. Push back assertively

If Claude proposes an approach you don't like β€” say so directly. "Don't use that pattern. Use the repository pattern instead, consistent with how AppointmentRepository works." Claude responds well to clear direction.


Common Problems & Fixes

npm permission error on install

Bash
# Configure a global npm dir that doesn't need sudo
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install -g @anthropic-ai/claude-code

Claude doesn't understand the project

Bash
# 1. Create CLAUDE.md (see above)
# 2. Explicitly ask Claude to explore first:
"Before we start, read the project structure and summarise 
what this codebase does, the key files, and the patterns it uses."

Claude keeps refactoring things you didn't ask it to touch

Add to CLAUDE.md:

MARKDOWN
## Hard rules
- Only modify files directly related to the requested task
- Do not refactor, rename, or reformat code outside the scope of the request
- Do not add new dependencies unless explicitly asked

Session getting confused after a long task

Bash
/clear    # resets conversation, CLAUDE.md reloads fresh

For very long tasks, start a new session and paste in a 3-sentence summary of where you left off.

Privacy & data

Claude Pro and Max: your code is sent to Anthropic's servers but not used to train models. Enterprise Teams option available for stricter data handling requirements. Claude Code does not work offline.


What to Learn Next

πŸ“ .claude/ Folder

Master every file β€” rules, skills, agents, docs, worktrees. Read the guide β†’

πŸ€– Skills & Agents

Build reusable workflows and isolated subagents for specialised tasks.

πŸ”— MCP Integration

Connect Claude Code to databases, APIs, and external tools via Model Context Protocol.

πŸͺ Hook Automation

Auto-lint, auto-build, auto-notify β€” wire up actions to every Claude event.


Claude

The Big Shift

Claude Code isn't autocomplete with a bigger context window. It's a reasoning partner that understands your architecture, respects your conventions, and executes multi-step changes the way a senior teammate would. The developers getting the most out of it aren't the ones who give it the biggest prompts β€” they're the ones who've invested in a tight CLAUDE.md, use Plan Mode before complex changes, and commit frequently. Start there.

Enjoyed this article?

Explore the Cloud & DevOps learning path for more.

Found this helpful?

Share:𝕏

Leave a comment

Have a question, correction, or just found this helpful? Leave a note below.