Claude Code Mastery: From First Install to Expert Agentic Coding
Use Claude Code safely and well: set it up, control permissions, write CLAUDE.md, extend it with skills, hooks, subagents and MCP, and ship verified changes through git and CI.
What you will learn
- Explain what an agentic coding tool does and set up Claude Code on the right surface
- Choose permission modes and rules that keep your machine and data safe
- Give Claude lasting project knowledge with CLAUDE.md, rules and memory
- Extend Claude Code with commands, skills, hooks and subagents
- Connect external tools through MCP servers and plugins without losing control
- Run a plan, build and verify loop with plan mode, tests and checkpoints
- Ship changes through git and pull requests and automate Claude Code in scripts and CI
- Manage context and cost and avoid the common failure modes of agentic coding
Modules
- What an agentic coding tool is, and getting set up
- Permission modes and safety
- CLAUDE.md, rules and memory
- Commands, skills, hooks and subagents
- MCP servers and plugins
- Plan mode and the verify loop
- Git, pull requests and automation
- Context, cost and expert habits
Course facts
- Level
- Awareness
- Estimated study time
- about 45 minutes
- Final assessment
- 10 questions · Pass mark 80%
- Available in
- English, Français, العربية
- Access
- Free. Optional verifiable certificate
- Last updated
- Published by
- AMAADOR ACADEMY
Who this course is for
Workers, supervisors, managers and specialists whose responsibilities touch this subject.
Prerequisites
Site induction, task-specific competence and authorization remain mandatory where applicable.
Course content
1. What an agentic coding tool is, and getting set up
A chat assistant answers a question and stops. You copy the code, paste it into your editor, run it and report back. An agentic coding tool closes that loop itself: it reads your files, runs commands, edits code, looks at the result and decides the next step, until the task is done or it needs you.
🔎 Gather context 🛠️ Take action ✅ Verify 🔁 RepeatThe agent loop: the model chooses tools, sees the results and continues.
Claude Code is Anthropic's agentic coding tool and the worked example of this course. Similar tools exist from other vendors and the open-source world, for example GitHub Copilot's agent mode, Cursor, OpenAI Codex or Gemini CLI. The habits you learn here transfer to all of them.
What changes for you
- You describe outcomes and constraints, not every keystroke.
- The tool acts on your real machine and repository, so its mistakes are real too.
- Your job moves towards specifying, reviewing and verifying.
| Chat assistant | Agentic tool |
|---|---|
| Sees only what you paste | Reads the project itself |
| You run the code | It runs tests and commands |
| One answer per turn | Many steps per task |
2. Permission modes and safety
Every tool call goes through a permission check. A mode sets the baseline; rules fine-tune it. In the terminal, Shift+Tab cycles default → acceptEdits → plan, and the status bar shows the active mode.
| Mode | What it does | Use it for |
|---|---|---|
| default | Asks before edits, shell commands and network access; reads run freely | Unfamiliar code, first sessions |
| acceptEdits | Also approves file edits and common file commands in the working directory | Work you will review in the diff |
| plan | Researches and proposes; no edits until you approve the plan | Complex or risky changes |
| auto | A separate classifier reviews actions and blocks risky ones | Long tasks with fewer prompts |
| dontAsk | Denies anything that would prompt | Locked-down CI and scripts |
| bypassPermissions | No prompts, no safety checks | Isolated containers or VMs only |
The documentation is blunt about bypass mode: it offers no protection against prompt injection or unintended actions, so use it only in an isolated environment where Claude cannot damage your host. It can only be switched on at launch, for example with --dangerously-skip-permissions, and administrators can disable it.
Rules
In settings you can write allow, ask and deny rules such as Bash(npm test) or Bash(git push *). Deny rules apply in every mode, even bypass. Use /permissions to see and edit them.
Remember: a mode is a speed setting, not a safety net. Start strict, widen only for work you will review, and put true red lines in deny rules.3. CLAUDE.md, rules and memory
Every session starts with a fresh context window. What carries knowledge from one session to the next is CLAUDE.md, a plain Markdown file of instructions that Claude Code loads at the start of each session.
| Scope | Location | Shared with |
|---|---|---|
| Organisation | Managed policy file set by IT | All users |
| You, all projects | ~/.claude/CLAUDE.md | Only you |
| Project | ./CLAUDE.md or ./.claude/CLAUDE.md | The team, via git |
| You, this project | ./CLAUDE.local.md (add to .gitignore) | Only you |
Files above your working directory load at launch; files in subfolders load when Claude works in that folder. They are added together, not overridden, so contradictions confuse the model. Claude Code can also read an existing AGENTS.md.
- Generate — run /init; Claude studies the code and drafts a CLAUDE.md with build and test commands.
- Trim — keep what Claude could not guess: conventions, commands, gotchas, "never do" lines.
- Split — move topic rules to .claude/rules/; rules can be scoped to file paths so they load only when relevant.
- Import — reference other files with @path/to/file.
- Commit — review it like code, in pull requests.
The docs suggest keeping each CLAUDE.md under about 200 lines: longer files use more context and are followed less reliably.
Remember: CLAUDE.md is the onboarding note you would give a new colleague: short, specific and true.4. Commands, skills, hooks and subagents
Type / in a session to see the commands available. Built-in ones you will use every day include /init, /memory, /permissions, /model, /clear, /compact, /context, /usage, /rewind, /resume, /mcp, /hooks, /agents and /plugin.
Skills: your own reusable procedures
A skill is a folder with a SKILL.md file: a short YAML header (name, description) and the instructions. Put it in .claude/skills/<name>/ for the project or ~/.claude/skills/<name>/ for you. Custom commands have been merged into skills; old .claude/commands/*.md files still work.
- You can run it as /name, with arguments passed in as $ARGUMENTS.
- Claude can load it by itself when your request matches its description, unless you set disable-model-invocation: true.
- Only the name and description sit in context until it is used, so long reference material is cheap.
Worked example: a release-notes skill
- Create — .claude/skills/release-notes/SKILL.md with description "Draft release notes from merged PRs".
- Write steps — read git log since the last tag; group by feature, fix, chore; flag breaking changes; output Markdown.
- Protect — set disable-model-invocation: true so it runs only when you ask.
- Use — type /release-notes v2.3.0.
Claude Code skills follow the open Agent Skills standard, which other AI tools also support.
Remember: if you explain the same procedure twice, turn it into a skill.5. MCP servers and plugins
The Model Context Protocol (MCP) is an open standard for connecting AI tools to outside systems: issue trackers, databases, design files, monitoring, documentation. An MCP server exposes tools; Claude Code calls them like its own. Many other AI tools support MCP too.
| Task | Command |
|---|---|
| Add a remote server | claude mcp add --transport http notion https://mcp.notion.com/mcp |
| Add a local server | claude mcp add --transport stdio name -- command args |
| List, inspect, remove | claude mcp list, get, remove |
| Status and sign-in in a session | /mcp |
Scopes
- local (default): you, this project.
- project: written to .mcp.json at the project root and shared through git. Claude Code asks each person to approve these servers before use.
- user: you, all projects.
Put tokens in environment variables, referenced as ${API_KEY} in .mcp.json, never in the committed file.
Choose carefully
The official page warns: verify you trust each server before connecting it, because servers that fetch outside content can expose you to prompt injection. A server's tools run with Claude's access to your environment. Prefer servers from the vendor of the service, review the source of local ones, and give API tokens the narrowest scope possible, for example read-only.
A command-line tool you already have, such as gh or a cloud CLI, is often lighter in context than an MCP server for the same job.
Remember: each MCP server is new code and new data flowing into your agent. Connect what the task needs, not everything you can.6. Plan mode and the verify loop
The most expensive mistake with an agent is letting it start coding in the wrong direction. Plan mode prevents that: Claude reads the code and proposes an approach, but edits stay blocked until you approve the plan. Switch to it with Shift+Tab, or start with claude --permission-mode plan.
- Explore — "Read the payment module and the tests. Do not change anything yet."
- Plan — "Propose a plan to add refunds: files to change, risks, how we will test it."
- Challenge — question the plan. Ask what could break, what it assumed, which simpler option it rejected.
- Approve — accept the plan, or edit it, then let Claude implement.
- Verify — tests, lint, a look at the running app, then the diff.
Writing a good task
| Vague | Specific |
|---|---|
| Fix the login bug | Users with an apostrophe in their email get a 500 on /login. Reproduce it with a test, fix it in auth/validate.ts, keep the public API unchanged. |
| Improve performance | The /orders page takes about 4 s with 10,000 orders. Find the cause, propose two options with trade-offs, do not change the schema. |
Point at files, give an example or a screenshot, and say what "done" means. Specific requests also use fewer tokens, because Claude does not need to scan the whole codebase.
For a one-line change you understand, skip the plan. For anything that touches several files, data or security, plan first.
Remember: the plan is where you catch a wrong idea for the price of a paragraph instead of a rewrite.7. Git, pull requests and automation
Claude Code is good at git: it can read history, create branches, write commit messages, resolve simple conflicts and, with the gh CLI, open pull requests. The rule that keeps this safe is simple: the agent proposes, a human reviews, the pipeline checks.
- Branch — start every task on its own branch, never on main.
- Small commits — ask for one logical change per commit, with a message that says why.
- Review the diff — read git diff or the IDE diff view before every commit.
- Open a PR — let Claude draft the description: what, why, how it was tested, risks.
- CI and human review — merge only after both pass.
What to look for in an agent's diff
| Check | Why |
|---|---|
| Files you did not expect | Scope creep, or edits to generated or config files |
| Changed or deleted tests | The target may have been moved |
| New dependencies | Supply-chain and licence risk |
| Secrets, URLs, debug code | Leaks and leftovers |
| Error handling removed | Silent failures later |
Protect the main branch on your git host so nothing, human or agent, can push to it directly. Put git push under an ask rule so you confirm each push.
Claude Code can also run sessions in separate git worktrees, so parallel tasks do not trample each other's files.
Remember: you sign the commit, so you own the diff. Read it as if a stranger wrote it.8. Context, cost and expert habits
Everything in the session, your prompts, files read, command output, tool lists, CLAUDE.md, sits in a limited context window and is sent again with each request. A bloated context costs more and makes answers worse.
| Command | What it does |
|---|---|
| /context | Shows what is using space |
| /usage | Shows session token use and, on subscription plans, plan usage |
| /clear | Starts fresh; use it between unrelated tasks |
| /compact | Summarises the conversation; add a focus, e.g. "keep the test results" |
| /rename, /resume | Name a session, come back to it later |
| /model, /effort | Pick a model and reasoning effort that fit the job |
Claude Code also caches repeated content and compacts automatically when the window fills up, but you will get better results by managing it yourself.
Habits that save tokens
- Be specific: name the file and the function; vague requests trigger broad scanning.
- Right-size the model: the docs suggest a mid-tier model for most coding and the largest one for hard design and multi-step reasoning.
- Keep CLAUDE.md lean; move specialised procedures into skills, which load only when used.
- Disable unused MCP servers with /mcp; prefer an existing CLI where one exists.
- Send noisy work to a subagent so only the summary comes back.
- Let a hook filter long logs before Claude reads them.
Teams can track spend in the Console or admin analytics and set limits; check your plan's page for current figures, which change.
Remember: one task, one clean context. When you change subject, /clear.The full lesson continues in the interactive course on this page.
Sources and references
- Claude Code documentation: overview and setup — Anthropic
- Claude Code: permission modes — Anthropic
- Claude Code: how Claude remembers your project (CLAUDE.md and memory) — Anthropic
- Claude Code: hooks reference — Anthropic
- Claude Code: connect tools with MCP — Anthropic
- Claude Code: run programmatically (headless mode and Agent SDK) — Anthropic
- Security bulletin AWS-2025-015: Amazon Q Developer extension for VS Code — Amazon Web Services
- s1ngularity supply-chain attack: postmortem — Nx (Nrwl)
Independent educational course. Not affiliated with, endorsed by or sponsored by Anthropic or any other vendor named. Claude and Claude Code are trademarks of Anthropic. Product features, commands and plans change often: facts were checked against the official documentation in November 2026, so always confirm on code.claude.com before relying on a detail. You remain responsible for the code you run and ship and for following your employer's security and confidentiality rules.
All courses · AI & Data - Free courses & certificates | AMAADOR ACADEMY