Pular para o conteúdo
← Back to Skalablog

Published article

Claude Code Setup Explained: Install, Permissions, Memory

Software EngineeringClaude CodeClaudeAnthropic

If your agent stops mid-task to ask approval, forgets your project conventions, and burns weekly quota on documentation edits, the problem is configuration rather than the model. Claude Code setup explained properly covers permission modes, a Claude.md memory file, and context hygiene. Those three levers decide whether the tool feels autonomous or obstructive.

What Claude Code Is and Why the CLI Still Leads

Claude Code is an agent, not an assistant: it executes end-to-end actions in your repository instead of returning a list of steps for you to run yourself. Claude Code is Anthropic agentic coding tool, and it began as a terminal program before spreading to a VS Code extension, desktop app, and mobile app.

The practical difference matters when you delegate work. ChatGPT, OpenAI's assistant, can explain how to package and deploy a Python application, but a person still has to run those commands. An agent creates the files, runs the build, and reports back with the result or a URL. The speaker in the source video uses Argo CD, an open-source GitOps tool for Kubernetes, as a test repository and asks the agent to explain the project goal without supplying any context; Claude Code reads the source tree and answers.

Why did the CLI become the default choice for this audience? Terminal-native work fits how DevOps engineers already operate, and the agent inherits your shell, your repository, and your Git history without switching windows. The video's presenter recommends the CLI over the desktop and mobile apps for organizational use, because project-level configuration and team-shared settings are easier to control there.

Git integration comes for free in that setup. Claude Code can stage and commit changes through ordinary Git commands, which is exactly why permission modes exist: once the agent can run shell commands, the blast radius of one bad instruction grows.

Installing Claude Code and the Plan You Actually Need

Installing Claude Code takes one curl command on macOS, Linux, or WSL, but the account requirement is the part beginners misread. The Claude Code quickstart lists a terminal and an active subscription as prerequisites; on Windows the recommendation is to work inside WSL rather than native Windows.

A free Claude account unlocks the Claude assistant in the browser, not the agent. The video's presenter states this explicitly, and the pricing distinction still holds: browser chat is free, while Claude plans gate the coding agent behind paid tiers. Treat the monthly price and quota figures as something to confirm on the current pricing page rather than as fixed numbers, because Anthropic changes plan limits over time.

One structural difference between the paid tiers is usage capacity, and that capacity is measured in tokens. The presenter explains tokens with a rough rule of thumb that three-quarters of a word equals one token, which is close enough for estimating cost but not a precise conversion.

There are free routes to running the tool, but the presenter is candid about the trade-off: pointing Claude Code at third-party or open models through a router changes the coding experience, and in his assessment it does not match Anthropic own models. Treat that as a first-hand report from the speaker, not a measured benchmark. The same pattern applies to any tool claiming full parity through a proxy.

Permission Modes: Manual, Plan, Edit, and Auto

Claude Code ships with four permission modes, and the default is the most restrictive one: manual mode asks for approval before any write, while accept-edits mode auto-approves file edits but still prompts before shell commands. You cycle between them with Shift+Tab in the terminal.

The reason a coding agent needs this gate is simple. Once the tool can run shell commands, one malformed instruction can remove files, so Anthropic ships a confirmation step by default rather than trusting the prompt. In manual mode, reads pass without prompting and writes stop for review.

The four modes behave differently on the same request:

How to Write Claude.md and Manage Context

Claude.md is the memory file that tells Claude Code how your repository works, and you generate a first draft by running /init inside a project. The memory documentation describes the file hierarchy; in practice the file records project structure, build and test commands, the coding style the organization expects, and known limitations.

The video's presenter demonstrates this on Argo CD, which already contains a committed Claude.md. He notes that an existing Claude.md does not stop the agent from working, but that supplying one lets it work with fewer exploratory reads. That is a plausible mechanism rather than a measured speedup, and no numbers back it in the source material.

Context and tokens are separate concepts that the source video sometimes blurs. Context is everything the agent can currently see: your messages, the files it read, the commands available to it. Tokens are the units the model bills and reasons in. Long sessions accumulate context, and the presenter's advice is to run /clear between distinct tasks rather than inside one, since clearing wipes the agent's working memory, not just your screen.

For sessions you want to keep, /compact summarizes instead of discarding. Compaction reduces context but is lossy: the compacted summary is not a reversible encoding of the original text. If you need the exact earlier wording, you still need the transcript or the repository history.

Hooks, MCP Servers, Skills, and Plugins Compared

Hooks, MCP servers, skills, and plugins solve four different problems, and conflating them is the most common source of confusion in Claude Code setup. Hooks run deterministic shell commands at lifecycle points, MCP servers connect the agent to external tools, skills are markdown instructions that shape how a task is done, and plugins bundle the other three for distribution.

Hooks are the security-relevant layer. The presenter describes a scenario where an API token leaks into a prompt or a repository file, and the hooks reference documents the event types that can intercept this: pre-tool-use can block a command before it runs, user-prompt-submit can inspect a message before the model sees it, and post-tool-use is a natural place for formatters and linters.

MCP, the Model Context Protocol, is how the agent reaches tools it was never trained on, such as Jira, Kubernetes, or a database. The presenter's argument for a protocol over ad-hoc APIs is that a shared standard keeps each tool from inventing its own integration surface. You list configured servers with Claude mcp list and add one with Claude mcp add, and the MCP documentation covers transport options and server management.

Skills and plugins sit above that layer. A skill is a markdown file in a skills directory, so a Kubernetes installation skill that pins version, worker count, and CNI plugin becomes a repeatable instruction set rather than a re-explained prompt. A plugin packages skills, hooks, commands, and MCP configuration into one install.

How the Four Extension Mechanisms Differ

The table below separates the four mechanisms by when they run and what they change, which is the distinction the source video demonstrates but never lays out in one place.

MechanismWhat it isWhen it actsWhat it controls
HooksShell commands bound to agent eventsBefore or after tool use, on prompt submit, on stopSecurity checks, formatting, notifications
MCP serversStandard protocol servers exposing external toolsOn demand, when the agent calls a toolAccess to Jira, Kubernetes, databases
SkillsMarkdown instruction files in a skills directoryWhen the agent matches a task to a skillHow a task is performed step by step
PluginsBundles of skills, hooks, commands, MCP configAt install timeDistribution to a team or customer

Two caveats belong next to that table. The source video says some teams are moving away from MCP toward skills, which is a handful of examples rather than an ecosystem-wide shift, so treat it as an observation about packaging preferences. And MCP servers from third parties execute with whatever access you grant them: the documentation describes how to add a server, but adding one does not make the resulting deployment compliant with any regulatory regime. The application and the organization still own that.

Session Commands and Headless Automation

Six commands cover most day-to-day terminal work: /model switches the active model, /usage reports quota consumption, /init generates Claude.md, /login authenticates an account, /help lists built-in commands, and /permissions edits allow and deny rules. The slash-command set is larger, and /help is the authoritative list for your installed version.

Beyond interactive use, the CLI reference documents non-interactive execution, which the source video calls headless mode. That matters because piping a task into the tool from a script is how the agent fits into CI rather than sitting in a terminal waiting for a human.

Interrupting the agent uses Escape, and pressing Escape twice opens a history of the session that you can navigate with the arrow keys to restore an earlier state. Ctrl+C twice exits, and Claude --resume reopens a previous session. These are the mechanics behind the video's guidance to clear context between tasks and resume when you return.

What the Source Video Gets Right and What Needs Rechecking

The video's core thesis holds up: configure permissions, memory, and context before trusting an agent with a repository, because those three levers determine whether the tool is useful or dangerous. Its weakness is version drift. Spoken model names, context-window figures, and per-million-token prices move faster than a recorded tutorial, and the presenter himself hedges the numbers as approximate.

Several claims in the recording should be treated as dated or speaker-reported rather than current fact. Specific model identifiers and their per-million-token rates need to be checked against the current pricing page before you budget for them. Context-window sizes quoted as 256K or 1M tokens for particular models are the kind of number that changes with each release. And any claim that agents are "replacing" one tool with another across the ecosystem needs more than a few examples.

The correction that matters most for readers is the plan boundary. The free tier applies to the assistant, not the agent. If you follow the tutorial expecting a free CLI, you will hit an authentication wall and conclude the install guide was wrong. It was not; the billing gate is simply upstream of the install command.

FAQ

  • Can you use Claude Code for free? Not on Anthropic own models through the standard path. A free Claude account unlocks the browser assistant, while the coding agent needs a paid plan or an alternative provider configured through a router. The free routes exist but change the agentic experience.
  • What does Claude.md actually do? It supplies standing guidance the agent reads when relevant, covering project structure, build and test commands, coding style, and known pitfalls. Running /init creates a first draft, and you can edit the file directly whenever the agent repeatedly gets something wrong.
  • What is the safest permission mode? Manual mode, which is the default. It reads files without asking but stops before every write. Accept-edits mode is the next step up, auto-approving edits while still prompting for shell commands such as Git operations.
  • What is the difference between /clear and /compact? /clear discards the session context entirely, which is why it belongs between distinct tasks rather than inside one. /compact summarizes the existing context to reduce its size, which keeps continuity at the cost of losing exact earlier wording.
  • Do MCP servers replace APIs? They standardize how the agent reaches tools rather than replacing the underlying APIs. A tool still exposes its own service; MCP gives the agent one consistent way to call it. List configured servers with Claude mcp list.
  • How do hooks improve security? A pre-tool-use hook can block a dangerous command before it runs, and a user-prompt-submit hook can inspect a message before the model sees it, which is where credential leaks get caught. Hooks add guardrails; they do not prove your deployment is compliant with any regulation.
  • What is a Claude Code skill? A markdown instruction file, typically stored in a skills directory, that tells the agent how to perform a specific task. Pinning a Kubernetes version, node count, and CNI plugin in one file makes that setup repeatable across a team.
  • What does a plugin bundle? Skills, hooks, slash commands, and MCP configuration in one installable package, which is how a vendor ships a complete integration instead of asking users to wire up each piece separately.
  • When should you switch models mid-session? Model choice trades cost against capability, so routine documentation work rarely needs the most expensive model. Switch with /model, and check /usage regularly if quota exhaustion would disrupt a later task.

From Agent Setup to Published Article

The work in this article is mostly configuration: choosing a permission mode, writing memory files, deciding what the agent may touch. That kind of setup knowledge travels poorly in chat but holds up well in writing, which is why the source tutorial exists in the first place. Developers who record walkthroughs like this one often have the same problem the presenter solved with a GitHub repository: the explanation lives in a 68-minute video that nobody can skim.

If you have that problem, Skalablog turns a YouTube video into a draft article you can edit before publishing. Paste the URL, let it transcribe, and generate a structured post from material you already recorded.

Skala blog

Source video