PTENES
TRACK 3

🟣 Context & Commands

What separates people who tinker from those who deliver: actively managing context and mastering advanced session commands.

6 modules ~50 minutes Intermediate
CONTEXT WINDOW useful noise: reads, searches, attempts... ↯ gets saturated /compact AFTER summary + focus room to think /context how much have I used? /clear new, clean task /btw · /fork without cluttering the thread

Learning path map

Detailed content

🟣 What It Is

A context window is the session’s working memory—and it’s finite. Every file read, search, command output, and failed attempt takes up space in it. When it fills up, Claude has less room to reason about the main task.

💡 Why learn

In long sessions, quality seems to drop—but it's not the model that gets worse; it's the context that gets cluttered. Anyone who masters /clear e /compact keeps Claude sharp for hours. It's the most underrated skill in Claude Code.

🔑 The 3 Context Commands

CommandWhat it doesWhen
/contextShows how much of the window is in useTo decide when to act
/compactSummarizes the conversation without losing the thread~70% full, same task
/clearClears the context completelySwitched tasks

Context hygiene: keep the CLAUDE.md lean, avoid dumping huge files into the conversation, and give /clear when changing topics. Clean context = better answers.

🟣 What It Is

In addition to clearing context, Claude Code has commands to control the flow without cluttering the main conversation: parallel questions, branching paths, running on its own in a loop, and automatic permission mode.

💡 Why learn

Long tasks require context management actively. Instead of asking a secondary question that fills the window, use /btw. Instead of risking a path and derailing the thread, ask a /fork.

🔑 The Commands

CommandWhat for
/btwOne-turn parallel question — without breaking your flow, but with all the context
/forkBranch the session to explore another path without losing your place
/loopRuns a task at intervals on its own for up to a few days
/scheduleSchedules runs (e.g., review PRs every 30 min)
/buddy"Pair programming" mode: reasons alongside you and teaches you instead of just executing
auto-modeRisk classifier: safe actions go through, risky ones are flagged
# forkar uma sessão pelo CLI:
claude --resume <session-id> --fork-session
# rodar a tarefa em loop:
/loop a cada 30 min, verifique novos PRs e resolva comentários

⚠️ Several of these are skills/commands you install (some from the community, popularized on the channel: /btw /buddy). The context ones (/clear /compact) e o --fork-session are native.

🟣 What It Is

Claude Code recognizes trigger words that increase the reasoning budget (extended thinking). The "stronger" the word, the more tokens Claude spends thinking before taking action.

💡 Why learn

A difficult problem — architecture audit, major refactor, tricky debugging — gets much easier when you deliberately ask Claude to think more deeply. But reasoning costs tokens; use it only when it’s worth it.

🔑 The Two Levels

🟠 MegaThink

~10,000 reasoning tokens

Triggers: think hard, think deeply, megathink

Medium/large refactors, design documents, structured planning

🔴 UltraThink

~32,000 reasoning tokens

Triggers: ultrathink, think harder, think very hard

Full architecture audits, in-depth multistep planning

💡 Tip: say "ultrathink" when you want a deep, multistep plan; "think hard" for detailed refactors. Leave it without a trigger for everything else—it’s faster and cheaper.

🟣 What It Is

Commands that help you improve your own usage of Claude Code: learn the fundamentals, measure how you work, and discover where to improve.

💡 Why learn

The biggest lever isn’t a standalone command; it’s the improvement loop: measure → adjust rules and hooks → repeat. Those who do this stay months ahead of those who just “use” it.

🔑 The Real Levers

🧹 /clear + /compact

The 2 biggest levers: clear context when switching tasks, compact when you pass ~70% of the /context. Always a sharp session.

🧭 opusplan

Opus plans, Sonnet executes (/model opusplan). Quality in planning, low cost in execution.

⚙️ /config + hooks

Adjust output styles and permissions in /config; automate the agent cycle with hooks in the settings.json.

🗺️ /ultraplan (community)

Deep planning + extended reasoning before touching the code — a popular custom skill on the channel.

Continuous improvement loop: measure how you work (your logs stay in ~/.claude/projects) → turn what you've learned into rules in the CLAUDE.md and hooks → save it in a second brain (track 6) → repeat.

🟣 What It Is

One competency map to find your way around: the pillars of effective Claude Code use and the levels every user moves through—from “improved chat” to “agent orchestrator.”

💡 Why learn

Without a roadmap, you stay stuck at level 1 without realizing it. Knowing the next step (e.g., "I don’t use subagents yet") turns random use into deliberate progress.

🔑 The 5 Levels (Ladder)

1

Conversation — use it like a chat in the terminal, with targeted edits

2

Context — CLAUDE.md, /clear and /compact, plan mode

3

Extension — skills, MCP, hooks, custom commands

4

Parallel — subagents, worktrees, several Claudes at the same time

5

Orchestration — agent teams, scheduled automations, Cowork (track 6)

Context
Memory
Permissions
Skills/Agents
Verification
Automation

The 6 pillars that support every level.

🟣 What It Is

A collection of rarely used resources — including the famous thread from Boris Cherny, creator of Claude Code, with his 15 favorite hidden features. This is where the "real leverage" is.

💡 Why learn

Most people have never used hooks, worktrees, or the mobile app. These features aren’t just for show: they’re what separates people who run one Claude for those who run it dozens in parallel.

🔑 Creator Highlights

ResourceWhat it does
Mobile app"Code" tab in the Claude app (iOS/Android) — full sessions from your phone
/loop + /scheduleRun automatically at intervals — track PRs, code review (skills)
HooksDeterministic logic in the agent cycle (SessionStart, PreToolUse, Stop...)
git worktreeMultiple Claudes in parallel, each on a branch/worktree — no conflicts
--fork-sessionResume by branching: claude --resume <id> --fork-session
.claude/commandsCustom slash commands — automate recurring team workflows
--add-dirAccess multiple repositories without switching sessions
/agentsSubagents with their own prompts and tools (.claude/agents/) — track 6
/mcpConnects external tools via MCP servers — Track 5
claude -pHeadless mode (print) — run Claude in scripts and pipelines

🌐 Boris’s #1 tip: give Claude a way to verify its own results — the Chrome extension for web coding. “If you don’t give it a browser, the visual result probably won’t be good.”

← Previous: T2 Building from Scratch Next: T4 Skills →