PTENES
MODULE 1.2

🛡️ Fundamentals and Setup: from Zero to Your First Command

The hands-on lesson. You install Claude Code, understand the difference between the model and the environment, learn to protect your context, and give your first command that creates real files on your computer.

6
Topics
~75
Minutes
Beginner
Level
Practice
Type
0% 0 of 6
MODEL the brain · the intelligence goes into the ENVIRONMENT the armor · IDE 📁 reads and creates files ⚙️ runs commands 🔌 connects tools Context window context rot — performance declines as the conversation grows · golden rule: one task, one window

Detailed content

1

🛡️ Model vs. Environment — Iron Man’s Armor

Claude Code brings AI to inside your computer, instead of just chatting with it on a website. Think of it this way: the the model is Tony Stark (the brain, the intelligence) and the the environment is the Iron Man suit — the body that lets the brain read files, run commands, and actually work with things.

What it is:

The model is the intelligence; the environment (or IDE) is where that intelligence acts—reading, executing, and creating things on your machine.

Why learn:

Without this concept, everything feels like confusing magic. With it, you understand why the same AI runs in different places and why choosing the environment matters.

Key concepts:

Model · environment · IDE · "one task, one window".

✓ The model (Tony Stark)

  • ✓It’s the brain: it reasons, writes, and decides.
  • ✓Alone, it’s brilliant, but it can’t act in the world.
  • ✓You can switch models without switching environments.

✓ The environment (the armor / IDE)

  • ✓Gives the model “form”: reads and creates files.
  • ✓Runs commands and connects other tools.
  • ✓There are several “suits of armor”—you can switch whenever you want.

💡 Don’t get stuck on the term "IDE"

IDE stands for “integrated development environment.” For now, think of an IDE simply as "the place where the assistant works". Nothing else.

2

💻 Installing Claude Code

Time to take AI out of the browser and put it on your machine. Installation is a prerequisite for everything: without installing, there’s no practice. An important note before you begin — Claude Code requires paid plan; the free plan doesn't include it.

What it is:

Download and install the official Claude Code app and connect your account.

Why learn:

It’s the required starting point. Everything that follows assumes the app is installed and you’re logged in.

Key concepts:

Installation · sign in with your Claude account · paid plan required.

1

Visit the official website

Open claude.com/claude-code — the official installation source.

2

Download for your system

Choose the Windows, macOS, or Linux version. It works on all three.

3

Install and open the app

Follow your system’s standard installer and open the app.

4

Sign in with your Claude account

Use the same account as the site and confirm that it has paid plan.

3

🧭 The Interface Inside

Before giving commands, get to know the screen. Knowing where each button is prevents you from getting stuck right at the start: conversation history, model selector, permission mode, usage indicator, and context window.

What it is:

A tour of the screen: conversation panel, model selector, plan usage indicator, and context window.

Why learn:

Finding the controls is what gets you past "I don't even know where to start."

Key concepts:

Conversation panel · model selector · usage indicator · context window · microphone · attach files.

🔎 Where to look first

  • •Project history usually sits on one side of the screen.
  • •The model selector and permission mode are near the typing box.
  • •The plan and context usage indicator appears next to the message field.
4

🔐 Permission modes

The permission mode controls how much freedom you give the assistant — how much it can do on its own without asking you. It’s your safety lock: too much freedom too soon is a recipe for surprises.

What it is:

How much the assistant acts on its own, from most cautious to boldest.

Why learn:

It’s the difference between experimenting with peace of mind and accidentally messing up important files.

Key concepts:

Four modes: ask before acting · accept edits · plan mode · ignore permissions.

✓ Safe to get started

  • ✓Ask first: confirms every edit and every command. Ideal for unfamiliar projects.
  • ✓Accept edits: edits on its own, but still asks before running sensitive commands. Recommended for getting started.
  • ✓Plan mode: doesn't execute; it thinks and proposes a plan first.

✗ Dangerous for beginners

  • ✗Ignore permissions: doesn't ask anything. Powerful and dangerous.
  • ✗Use only in an isolated environment, when you know exactly what you're doing.
  • ✗Never on a "real" computer with important data.

💡 Pro tip

Start at "accept edits". It's safe enough to build fluency without having to approve every step, while still protecting you on the most sensitive commands.

5

🧠 Context Window and “Rot”

Imagine a brilliant person with an extremely high IQ, but with amnesia. The context window is how much of the conversation the model can remember accurately. The longer the conversation, the worse it remembers — a phenomenon called "context rot" (context rot). Hence the golden rule: one task, one window.

What it is:

The limit on how much of the conversation the model remembers well—and why long conversations reduce quality.

Why learn:

Managing context separates those who get reliable results from those who receive “confidently wrong” answers.

Key concepts:

Context window · tokens · context rot · hallucination · "one task, one window".

📊 In practice: watch out for hallucinations

  • •The model can hallucinate (make things up with conviction) between ~1% and ~10% of the time.
  • •It performs worse in long conversations—the fuller the window, the greater the risk.
  • •Protect your context: start a new conversation for each task.

Quick context hygiene

/context     # vê quanto da janela já foi usada
/compact     # resume a conversa, preservando o essencial
/clear       # zera tudo e começa do zero (refresh total)
6

⌨️ Slash commands and plan mode

Slash commands are commands you type with / that control the conversation and context — your everyday hygiene tools. And for larger tasks, there's the plan mode: the assistant reasons and proposes a plan before before running anything.

What it is:

Quick commands to clean up, summarize, measure, and switch things—plus a mode that plans before acting.

Why learn:

Save time and tokens, and plan mode reduces errors and rework on difficult tasks.

Key concepts:

/clear · /compact · /context · /model · /cost · /init · /memory · plan mode · declared intent.

Essential everyday commands

/clear     apaga a conversa e começa do zero
/compact   resume a conversa preservando o essencial
/context   mostra quanto da janela já foi usada
/model     troca o modelo em uso
/cost      mostra uso de tokens e custo da sessão
/init      pede para o assistente conhecer a pasta/projeto
/memory    abre e edita os arquivos de memória (CLAUDE.md)

🗺️ The trick that works in plan mode

Always state your real intent. Something like: "My stated intention is X. I’m asking you for this because what I want to be true is ___." Making your intent explicit greatly improves the response.

Going deeper (optional): /compact vs /clear

Use /clear when you switch tasks completely — you want a clean slate. Use /compact when you're still on the same task, but the conversation has gone on too long: it summarizes what matters (decisions and objective) and frees up space without losing the thread. Small difference, big impact on quality.

Self-check (optional): you finished a task and are about to start another, very different one. Which command should you use?

✏️ Exercises

1. Installation complete (easy)

Install Claude Code and sign in. Criterion: the app opens connected to your account, and you can send a message.

2. First file (easy)

Ask the AI to create a folder with two files .md (as in the guided example). Criterion: the folder and both files exist on the computer and have content.

3. Context Hygiene (medium)

Start a conversation, run /context, then /clear, and run /context again. Criterion: you see the context drop to near zero after the /clear.

4. Plan mode (medium)

Enable plan mode and ask for a plan to "organize my Downloads folder"—without executing it. Criterion: the assistant returns a step-by-step plan without changing anything.

5. Declared intent (medium)

Redo exercise 4, including "My stated intention is...". Criterion: the plan visibly aligns more closely with what you want.

⌨️ Ready-to-use prompts

Now you can run these for real. They cover everything from the first file to plan mode and context hygiene. The complete collection is in the Library → Prompts.

Your first command (creates files)

Create a folder called "cafe-gelado" on my desktop and write two
.md files inside: "por-que-cafe-e-otimo.md" and "por-que-cafe-nao-e-otimo.md".
Three short sentences in each.

Plan mode, no execution

My Downloads folder is a mess. Without running anything yet, give me a
step-by-step PLAN to organize it by file type. I’ll approve it before you take action.

Declared intent (canonical)

My stated intention is: I want to understand, not just receive something ready-made.
Explain what the Claude Code "context window" is in 3 simple sentences,
as if I had never programmed before.

Original (EN):

My stated intention is ___. I'm asking you to do this because the thing I want
to be true is ___.

Get familiar with a project

Familiarize-se com esta pasta (rode a inicialização) e me diga, em 5 bullets,
para que serve este projeto e quais são os arquivos mais importantes.

⚠️ Common errors

  • ✗Thinking the free plan is enough. That’s not enough — Claude Code requires a paid plan. Without one, you can install it but can’t use it.
  • ✗Let the conversation turn into a monster. Mixing ten tasks into one window leads to context rot. Use /clear between tasks.
  • ✗Start with “ignore permissions.” On a real computer, that means asking it to delete or mess something up. Start with "accept edits".
  • ✗Blindly trust. The model can hallucinate. Review important results—especially in long conversations.
  • ✗Fill the CLAUDE.md of text. More than ~200 words starts to clutter the context. Keep it short and direct.

✅ Module summary

✓
Model x environment — the model is the brain (Tony Stark); the environment/IDE is the armor that lets it act.
✓
Installation and paid plan — download it from the official site, sign in with your account, and confirm the paid plan.
✓
Permissions and context — start with "accept edits" and protect the context window from degradation.
✓
Slash commands and plan mode — /clear, /compact, /context, and planning before acting, with the intention stated.

Completion checklist

  • ☐ Claude Code is installed and connected to my account (paid plan).
  • ☐ I understand the difference between the model (Tony Stark) and the environment/IDE (the armor).
  • ☐ I can locate the model selector, permission mode, usage indicator, and context window.
  • ☐ I created my first folder and files by asking AI.
  • ☐ I used /context, /clear, and /compact at least once.
  • ☐ I tried plan mode with a stated intent.
  • ☐ I know that “one task, one window” is the golden rule.

Next module:

1.3 — Memory system: how CLAUDE.md gives the assistant lasting context