Sonith Manakkat

Claude AI, part 11 of 128 min read9 visuals

Claude Code and AI agents for builders, and how to use them safely

What Claude Code is, how an agent loop works, which permissions protect you, how skills, subagents, hooks and MCP fit in, and a safe working routine.

  • An agent is Claude in a loop with tools
  • Permissions are your safety rail, so widen them slowly
  • Review changes and keep work in version control

Share on LinkedIn

Share
Reading level

Chat answers a question. An agent does a job. Claude Code is Anthropic's agent for software work, and it changes how people build apps. This closing part of the series explains what it does in plain language, how the pieces from earlier parts (context, CLAUDE.md, skills) fit together, and how to keep control while it works. Written for builders and curious beginners alike.

What is Claude Code?

Anthropic describes Claude Code as an agentic coding tool that reads your codebase, edits files, runs commands and integrates with your development tools. A codebase is the folder of files that make up a piece of software.

  • TerminalThe full-featured command-line version
  • Code editorsVS Code and the JetBrains family
  • Desktop appA standalone app, with visual diffs
  • BrowserAt claude.ai/code, with no local setup
Where Claude Code runs, according to Anthropic.

Most of these need a Claude subscription or an Anthropic Console account. You describe what you want in plain language; Claude Code plans the approach, writes code across several files and verifies that it works. For a bug, paste the error and it traces the cause.

Expert viewSurfaces share one engine

Anthropic's overview says each surface connects to the same underlying Claude Code engine, so your repository's CLAUDE.md files, settings and MCP servers work across all of them. Sessions are not tied to one surface: you can move work between them, for example start on the web and pull it into your terminal, and the docs describe Remote Control for continuing a session from a phone or another browser.

The agent loop

UnderstandPlanChangeCheckrepeat
An agent loops: understand, plan, change files, check the result, and repeat.

A good agent reads the relevant files, makes a plan, changes things, then checks the result, for example by running the tests. If the check fails it goes round again. That loop is why agents finish bigger jobs than a single chat answer, and why review matters more: more happens between your request and the result.

YouClaude CodeYour projectGoalRead filesPlanOKMay I edit?Yes or noEdit and testResultsReport123456789
  1. You to Claude Code Your goal and constraints, and a request to plan first.
  2. Claude Code to Your project File reads and searches inside the project do not ask.
  3. Claude Code to You It tells you its plan and waits.
  4. You to Claude Code (reply) You approve the plan, or adjust it.
  5. Claude Code to You Editing a file or running a command shows a permission prompt.
  6. You to Claude Code (reply) Choose yes, yes and do not ask again, or no.
  7. Claude Code to Your project The changes are made and the tests are run.
  8. Your project to Claude Code (reply) If a test fails, it goes round the loop again.
  9. Claude Code to You (reply) A summary of what changed and what was checked.

Takeaway. You approve the plan and each risky action, then review what was done.

One task with an agent. Reads inside your project run freely. Edits and commands ask first in the default mode.

What can it do?

  • Tests and choresWrite tests, fix lint errors, update dependencies, write release notes
  • Features and bugsDescribe the change in plain language and it works across files
  • GitStage changes, write commit messages, create branches and open pull requests
  • Connect toolsThrough MCP, an open standard for linking AI tools to outside services
  • Parallel agentsSeveral agents at once, with a lead agent coordinating
  • Scheduled tasksRun Claude on a schedule for work that repeats
From Anthropic's overview.

How the earlier pieces fit together

CLAUDE.mdalways-on rules (part 7)Skillson-demand know-how (part 8)MCPconnections to outside toolsSubagentsisolated workers with their own contextHooksautomation that always runs
Each extension plugs into a different part of the loop.
Expert viewContext cost by feature

Anthropic's extension guide gives the loading rules: CLAUDE.md loads in full each session; skills load descriptions at start and bodies when used; MCP loads tool names with schemas on demand; subagents get a fresh, isolated context and return a summary; hooks cost nothing unless they return output. It adds practical advice: use a subagent when a side task would flood your conversation with output you will not reuse, write a hook when you want something to happen every time without asking, and capture a playbook as a skill the third time you paste it into chat.

New to MCP? MCP vs API explains how it differs from an ordinary API and how to try a server safely.

Permissions: your safety rail

Claude Code uses a tiered permission system, according to Anthropic's documentation.

Kind of actionExampleAsks first (default manual mode)?
Read-onlyFile reads, searchingNo, inside your project
Shell commandsRunning a build or testYes, apart from a built-in set of read-only commands
Editing filesWriting or changing a fileYes
Fetching the webReading a pageYes, apart from a set of pre-approved documentation sites

When it asks, the prompt shows what Claude is about to do, and one of your options is "yes, and don't ask again" for that kind of action. You can also write allow and deny rules and share them with your team.

Every approval you grant widens what the agent can do on its own. Widen it slowly, for tasks and places you trust.

Expert viewEnforcement versus instructions

Anthropic's documentation describes permission modes that change what asks and what does not, and says in the memory and extension guides that CLAUDE.md is context, not enforced configuration. To block an action regardless of what Claude decides, use a PreToolUse hook. A hook that rejects an unsafe command is enforcement; an instruction saying "never do that" is a request. Also treat any external content (web pages, files from unknown sources, tool results) as potentially hostile: text inside it can try to steer an agent, called prompt injection. Anthropic says Opus 5.5 is more resistant to it than its predecessor, which is progress, not a guarantee.

  1. 1Does a deny rule match?Yes Blocked. No prompt, and an allow rule cannot override it.No keep going
  2. 2Does an ask rule match?Yes You are asked, even if a narrower allow rule also matches.No keep going
  3. 3Does an allow rule match?Yes It runs without asking.No keep going
  4. 4OtherwiseThe default for that kind of action applies: reads inside the project run, while edits and shell commands ask.

Takeaway. Deny beats ask, ask beats allow, so write deny rules for what must never happen.

How a permission check resolves. Rules are checked in this order, and the first match decides.

A safe working routine

Building by describing and accepting without reading is often called vibe coding; Vibe coding explained covers where it works and the checks that keep it safe.

  1. Use version controlKeep the project in git so every change can be reviewed and undone
  2. Start smallOne focused change, not the whole app
  3. Ask for a planThen approve it before changes begin
  4. Read the changesReview the diff like a colleague's pull request
  5. Run the testsAnd ask for tests for new behaviour
  6. Keep secrets outNo passwords, keys or private data in prompts or readable files
  7. Distrust outside contentPages and files can contain hidden instructions
  8. Commit oftenAlways keep a clean place to return to
Eight habits.
Clean commitClaude editsYou read thediffTests passCommittedReverted12345
  1. Clean commit to Claude edits Start from a committed state, then ask for one small change.
  2. Claude edits to You read the diff Read the diff like a colleague's pull request.
  3. You read the diff to Tests pass Run the tests and ask for tests of new behaviour.
  4. Tests pass to Committed Commit often to keep a place to return to.
  5. You read the diff to Reverted Return to the clean commit instead of patching blindly.

Takeaway. Version control turns every agent change into something you can review and undo.

A safe path for a code change. My own routine, built from the habits above.

Prompts that work well with an agent

Text
Goal: add a "mark as paid" button to the invoice screen.
Constraints: follow the existing code style; do not change the database format.
First, read the relevant files and tell me your plan. Wait for my OK.
After the change, run the tests and tell me what you checked.
Expert viewGoing further

Beyond interactive use, Anthropic's documentation shows Claude Code driven from scripts and CI: piping logs into it, running it non-interactively with claude -p, and using GitHub Actions or GitLab CI/CD for code review and issue triage. It also describes an Agent SDK for building your own agents powered by Claude Code's tools, with full control over orchestration, tool access and permissions, and dynamic workflows that run many subagents from a script Claude writes. Free self-paced courses are available at Claude Academy.

Frequently asked questions

Do I need to be a programmer to use Claude Code?

It helps. You do not need to write every line, but you need to read and judge the result, or have someone who can.

Can it break my project?

Any tool that edits files can. Version control and review are your protection.

Is it only for code?

It is designed for software work. The idea of an agent with tools reaches beyond it.

Sources

Last checked: 2026-10-21. These are official pages. Check them for anything that may have changed since.

  1. Claude Code overview
  2. Configure permissions in Claude Code
  3. Extend Claude Code (features overview)
  4. How Claude remembers your project
  5. Introducing Claude Opus 5.5
  6. Prompting best practices, official documentation

Back to all articles