PTENES
TRACK 1

🟢 Basics & Installation

From zero to your first project. Install Claude Code on any system, sign in, master the essential commands, plan mode, and CLAUDE.md.

8 modules ~55 minutes To get started from scratch
1 · Git Git Bash (Windows) 2 · Node.js LTS 18+ · includes npm 3 · npm i -g @anthropic-ai/claude-code ✳ claude log in + run in the terminal $ claude › create an endpoint... ✓ edited app.py ✓ ran the tests ⏎ approve? (y/n)

Learning path map

Detailed content

🟢 What It Is

O Claude Code is Anthropic’s coding agent that runs in your terminal. It’s not autocomplete or chat: it reads your project, plans, edits files, runs commands and tests, use git and browses the web — always asking for your approval. You speak Portuguese; it executes.

💡 Why learn

Unlike pasting code from a chat, Claude Code works inside the actual repository — understands the full context via CLAUDE.md, respects your stack and runs on any system. It's the foundation for everything in the upcoming tracks.

🔑 Where You Can Use It

WhereBest forDetail
Terminal (CLI)Speed + controlmacOS, Windows, Linux. The main way
VS Code / JetBrainsView diffs in the IDEOfficial extension, same engine as the CLI
Web / DesktopDelegate and run in parallelclaude.ai/code and desktop app (Mac/Windows)

The agent’s cycle: reads → plans → edits → runs/tests → shows the diff → you approve. Understanding this loop is what separates those who “play around” from those who produce.

🟢 What It Is

Installation via npm. Prerequisites: Node.js 18+ and, on Windows, Git Bash. Sign-in is through subscription (Pro/Max via browser) or through API key by Anthropic.

💡 Why learn

An outdated Node version causes silent failures. On Windows, Claude Code won’t run without Git Bash—it’s the #1 mistake beginners make. Following the right order avoids 90% of installation problems.

🔑 Step by Step (The Right Order)

🟩 Windows
# 1. Instale o Git (inclui o Git Bash) → git-scm.com/download/win
# 2. Instale o Node.js LTS → nodejs.org
# 3. Confira:
node -v
npm -v
# 4. Instale o Claude Code:
npm install -g @anthropic-ai/claude-code
# 5. Rode:
claude

If you get a Git Bash error: setx CLAUDE_CODE_GIT_BASH_PATH "C:\Program Files\Git\bin\bash.exe" and reopen the terminal.

🍎 macOS
brew install node
npm install -g @anthropic-ai/claude-code
claude
🐧 Linux / WSL
sudo apt update && sudo apt install -y nodejs npm
npm install -g @anthropic-ai/claude-code
claude
Login (first time)
# Dentro do claude, rode:
/login        # abre o navegador → conta Pro/Max (recomendado)

# OU, via API key (pague por uso):
setx ANTHROPIC_API_KEY "sk-ant-..."   # Windows
export ANTHROPIC_API_KEY="sk-ant-..." # macOS/Linux

💡 Tip: have a Claude Pro or Max subscription? Use /login with OAuth — no API key needed, and usage is included in your plan.

🟢 What It Is

You run claude inside the project folder and type your request in natural language. It proposes edits like diffs that you approve or reject. @ references files and # saves something to memory.

💡 Why learn

The fear that “it’ll mess up my code” goes away when you understand the approval loop: nothing changes without you seeing the diff. Esc stops immediately if it takes the wrong direction.

🔑 Key Concepts

cd meu-projeto
claude                          # abre o modo interativo
claude "corrija o bug do login" # pedido direto
claude -p "resuma o README"     # print mode: responde e sai (scripts)
@src/app.py— references a file
# sempre use pnpm— saves to memory
Esc— interrupts the agent
Shift+Tab— switches the permission mode

🟢 What It Is

Commands that start with / control the session (not the project). Type / and see the list. The most commonly used manage the context — the scarcest resource in a session.

💡 Why learn

/clear e /compact are what keep the session fast and inexpensive. Without them, the context fills up, Claude slows down, and "forgets" the beginning. (Track 3 explores this in more depth.)

🔑 The Essentials

CommandWhat it does
/helpLists all commands
/clearClears the context — start a fresh task
/compactSummarizes the conversation to free up context without losing the thread
/contextShows how much of the context is being used
/costCurrent session spending/usage
/modelSwitch the model (Opus / Sonnet / opusplan)
/resumeResumes a previous session
/initGenerates the project’s CLAUDE.md (module 1.6)
/agentsCreates and manages subagents (track 6)

🟢 What It Is

Pressing Shift+Tab you switch between session modes. In plan mode (plan mode), Claude investigates and proposes a plan — but doesn't edit anything until you approve.

💡 Why learn

For large or risky tasks, letting it “start editing” is a recipe for rework. Planning first aligns the path. The preset opusplan uses Opus (more powerful) to plan and Sonnet (cheaper/faster) to execute — quality where it matters, savings elsewhere.

🔑 The 3 Modes (Shift+Tab Cycles)

⌨️ Normal

Ask for approval before every edit/command

⚡ Auto-accept

Applies edits without asking (acceptEdits)

🗺️ Plan

Only investigates and proposes — doesn’t edit

/model opusplan   # Opus planeja, Sonnet executa

🟢 What It Is

O CLAUDE.md is a file at the project root with the permanent context: how to run, conventions, rules, what not to do. The command /init generates one for you by analyzing the repo. The folder .claude/ stores settings, commands, agents, and skills.

💡 Why learn

Without CLAUDE.md, Claude starts from scratch each session and repeats the same mistakes. With it, Claude follows your stack and style from the first prompt. It’s the 5-minute investment that improves all the following sessions.

🔑 Memory Hierarchy

1

~/.claude/CLAUDE.md — your own rules, apply in all the projects

2

./CLAUDE.md — project rules (goes into git, the whole team uses it)

3

./CLAUDE.local.md — yours only, not version-controlled

# Projeto X
- Stack: Next.js + TypeScript + pnpm
- Rodar: `pnpm dev` · Testar: `pnpm test`
- Convenção: componentes em PascalCase, sem default export
- NUNCA commitar direto na main

Shortcut: type # sua regra in the session to attach something to CLAUDE.md right away.

🟢 What It Is

By default, Claude asks for permission before editing files or running commands. You define lists of allow / deny e o mode permission. The command /permissions manages everything.

💡 Why learn

Permissions are your seat belt. Allow safe commands (e.g., npm test) reduces clicks; but never use bypass on machines with sensitive data or in production.

🔑 Permission Modes

ModeBehaviorRisk
defaultAsk before every sensitive actionLow
acceptEditsAccepts automatic file editsIntermediate
planJust plan; don't change anythingNone
bypassPermissionsDoesn’t ask for anything (--dangerously-skip-permissions)High ⚠️
/permissions          # abre o gerenciador
# em .claude/settings.json:
# "permissions": { "allow": ["Bash(npm test)"], "deny": ["Bash(rm -rf *)"] }

⚠️ Don’t: run --dangerously-skip-permissions on your personal machine just to “go faster.” Use this only in disposable containers/VMs.

🟢 What It Is

You use Claude Code through subscription (Pro/Max — included usage) or through API (paid per token). /cost shows the session's spending. The choice of model has the biggest impact on cost and speed.

💡 Why learn

Using Opus for everything is expensive and unnecessary. Sonnet handles day-to-day work; Opus is for what’s difficult; opusplan combines the two. Along with /compact e /clear, you control the cost.

🔑 Models — When to Use Each

ModelUse for
OpusHard tasks, architecture, tricky debugging
SonnetEveryday use — fast and capable, best value
HaikuSimple, inexpensive tasks at high volume
opus[1m]1-million-token context (huge repos)
/cost                       # gasto da sessão
/model sonnet               # troca pro Sonnet
claude --model "opus[1m]"   # abre com contexto de 1M

💡 Money-saving tip: start the task with /clear, use opusplan and run /compact when the /context exceed ~70%.

← Home Next: T2 Building from Scratch →