Skip to main content

Claude Code How-To: Install, Workflow, CLAUDE.md, Skills, Subagents, MCP & Hooks

· 14 min read
AI Playbook author

Claude Code is easy to misread as "chat that writes files." It isn't. It is an AI coding agent with an agentic loop, a context window, tools, and a permission system — you steer it through Explore → Plan → Code → Commit, then harden the workflow with CLAUDE.md, skills, subagents, MCP, and hooks.

1. What Claude Code actually is

From Claude Code 101 and Claude Platform 101: chat answers a question and the thread ends. An agent sends structured requests, chooses tools, observes results, and loops until the goal is done — under a context window and permission rules.

PieceRole
Agentic loopAct → observe → decide → repeat until done or blocked
Context windowEverything Claude can "see" this session (files, tool results, your messages)
ToolsRead/edit files, run shell, search, Git, MCP servers, built-ins
PermissionsWhat runs without asking vs what needs approval
Project memoryCLAUDE.md, Skills, hooks — durable instructions across sessions

How it differs from chat-based AI:

  • Works inside your repo (not a paste-in playground)
  • Proposes and applies edits under a permission mode you choose
  • Can run tests, Git, and tools as part of completing a task
  • Is customisable with project memory, skills, subagents, MCP, and hooks

Interfaces (same agent, different surfaces) — see Claude Code docs:

  • Terminal CLI (claude)
  • VS Code / JetBrains extensions
  • Claude Desktop / Claude web (claude.ai/code)
  • CI: GitHub Actions / GitLab, headless / routines (covered in Claude Code in Action)

Who it is for: new developers learning AI-assisted workflows, and experienced engineers who want an agent in the daily loop — not only autocomplete.


2. Prerequisites

NeedNotes
Terminal + editor comfortBasic shell and a code project
AccountClaude Pro, Max, Team, or Enterprise, or Console API key with credits
Enterprise cloud (optional)Amazon Bedrock, Google Vertex / Cloud, or Microsoft Foundry
Windows tipPrefer Git for Windows so the Bash tool works; WSL does not need it

Fluency context (optional but useful before heavy agent use):


3. Install and first login

Official path: Install · Quickstart.

macOS / Linux / WSL:

curl -fsSL https://claude.ai/install.sh | bash

Windows PowerShell:

irm https://claude.ai/install.ps1 | iex

Windows CMD:

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Package managers

# Homebrew (stable; does not auto-update — brew upgrade claude-code)
brew install --cask claude-code

# WinGet
winget install Anthropic.ClaudeCode

Linux package managers (apt / dnf / apk) are also documented under setup.

Verify:

claude --version

Log in and start

cd /path/to/your/project
claude

On first run you authenticate in the browser. Alternatives: ANTHROPIC_API_KEY, /login, or org cloud gateway / Bedrock / Vertex. Credentials persist after the first successful login.

Useful shell entry points:

CommandWhat it does
claudeInteractive session
claude "task"One-shot task in the project
claude -p "query"Print answer and exit
claude -cContinue most recent conversation here
claude -rResume a previous conversation

Inside a session: /help, /clear, /exit (or Ctrl+D twice).


4. Mental model: agentic loop + permissions

Agentic loop

You set a goal
→ Claude reads / searches / plans
→ Calls tools (edit, shell, MCP, …)
→ Observes results
→ Continues or asks you
→ Done (or blocked by permissions / context)

Claude Platform 101 teaches the same loop for API apps; Claude Code is that loop pre-wired for a codebase.

Permission modes (Shift+Tab to cycle)

ModeBehaviourBest for
DefaultReads freely; asks before edits and many commandsFirst sessions, shared components
Accept edits (acceptEdits)Auto-applies file edits; still confirms risky commandsScoped tasks with review of the final diff
PlanInvestigate and propose only — no editsUnfamiliar repos, large changes, design review
Bypass / auto (advanced)Minimal prompts or background safety checksSandboxes, throwaway repos, trusted CI — not day-one

Start in Plan on any repo you did not write. Graduate to Default, then Accept edits only when the plan and test net are solid.


5. Core workflow: Explore → Plan → Code → Commit

This is the spine of Claude Code 101.

Explore

Ask Claude to map the system before changing it:

what does this project do?
what technologies does this project use?
where is the main entry point?
explain the folder structure around auth/

Plan

Switch to Plan mode (Shift+Tab), then:

Plan how to add rate limiting to the public API.
Do not edit files yet. List files you would touch and risks.

Read the plan. If it touches unexpected files, ask why. Rework the plan until you would bet your own name on it.

Code

Leave Plan mode. Give a crisp execution prompt:

Implement the approved plan for API rate limiting.
Follow existing patterns in middleware/.
Add tests. Do not change unrelated modules.

Review the diff. Prefer small vertical slices over "rewrite the service."

Commit

Commit after each logical change — not after a three-hour mega-session:

commit my changes with a descriptive message

A clean commit is your rewind point when the agent drifts.

Rule of thumb by codebase risk:

SituationMode / stance
Greenfield + good testsAccept edits OK after a short plan
Shared libraries / auth / paymentsPlan only; human reviews every diff
Legacy, no testsExplore deeply; tiny edits; never bypass permissions
New clone/init → edit CLAUDE.md before any feature work

6. Context management

The context window is finite. Claude Code 101 emphasises staying productive with:

CommandUse when
/contextYou want to see what is filling the window
/compactThe session is long but you still need continuity — summarise and keep working
/clearThe topic is done; start a fresh task without baggage

Claude Code in Action goes further: direct compaction so summaries keep what matters, and the rewind menu to course-correct long sessions without starting from zero.

Practical habits:

  1. One goal per session when possible.
  2. Compact before the model gets "foggy," not after it invents APIs.
  3. Clear between unrelated features.
  4. Prefer subagents for research dumps that would pollute the main thread (next sections).

7. CLAUDE.md — project memory that sticks

CLAUDE.md is a README for the agent: conventions, commands, architecture constraints, and "never do this."

Scopes

LocationScope
~/.claude/CLAUDE.mdYour personal defaults across projects
./CLAUDE.md or ./.claude/CLAUDE.mdShared project rules (commit it)
./CLAUDE.local.mdLocal overrides (usually gitignored)
Nested CLAUDE.mdLoads when Claude works in that subtree

Bootstrap:

/init

Then edit ruthlessly. Claude Code in Action stresses a lean file Claude actually follows — not a novel.

What to put in

  • How to build, test, lint, and run
  • Package / module boundaries
  • Naming and error-handling conventions
  • Forbidden actions (e.g. no force-push, no production secrets, no drive-by refactors)
  • Links to deeper docs (keep the file short; point elsewhere)

What to leave out

  • Long tutorials Claude can discover by reading code
  • Duplicate of Skills you will trigger on demand
  • Vague slogans ("write clean code")

8. Skills — teach once, trigger automatically

From Introduction to agent skills: Skills are reusable markdown procedures (SKILL.md) Claude applies when the task matches the skill description.

Skills vs other customisation:

MechanismJob
CLAUDE.mdAlways-on project constitution
SkillsOn-demand procedures (release, migrate, review checklist)
HooksDeterministic enforcement (format, block commands, gate on tests)
SubagentsIsolated workers with their own context

Build a skill

  1. Create a skill directory with SKILL.md frontmatter (name + description that matches real user phrasing).
  2. Use progressive disclosure — short frontmatter/description in context; detail files loaded when needed.
  3. Optionally restrict tools with allowed-tools.
  4. Optionally add scripts that run without stuffing the context window.

Share

  • Commit skills in the repo for the team
  • Distribute via plugins
  • Enterprise: managed settings org-wide

Troubleshoot: skill never triggers → rewrite the description to match how people ask; priority conflicts → narrow descriptions; runtime errors → check tool allowlists and script paths.


9. Subagents — keep the main context clean

From Introduction to subagents: a subagent gets its own context window, does focused work, and returns a summary — your main conversation stays sharp.

Use /agents to create specialists (code reviewer, docs writer, test author, security pass).

Design patterns that work:

  • Structured output format (findings, files touched, open risks)
  • Explicit obstacle reporting ("blocked on missing env X")
  • Limited tool access (reviewer may not need write)

When to use: large research, parallel investigation, noisy log diving, specialised review.

When not to: tiny one-file edits (overhead > value), or tasks that need the full conversational history already in the main thread.


10. MCP — connect Claude Code to real systems

Claude Code 101 and Introduction to MCP treat MCP as how you attach external tools and data without hand-rolling every schema.

Three primitives:

PrimitiveControlExample
ToolsModel-controlledCreate ticket, run query
ResourcesApp-controlledRead-only docs, configs
PromptsUser-controlledPrebuilt workflows

Transports (MCP Advanced Topics):

  • stdio — local servers launched by the client
  • Streamable HTTP / SSE — remote servers, sessions, scaling trade-offs

In Claude Code, wire MCP servers in settings, verify with the MCP Inspector mindset (list tools → call one → confirm permissions), then use them in normal prompts ("use the Linear MCP to…").

Deeper playbook material: MCP overview, Build an MCP server, Build an MCP client.


11. Hooks — rules that cannot be skipped

Hooks are deterministic controls: format on save-equivalent events, block dangerous commands, notify, or gate turns on real test results.

Use hooks when prose in CLAUDE.md is not enough ("please run tests" is advisory; a hook that fails the turn if tests fail is policy).

Typical uses from Claude Code 101 / In Action:

  • Enforce formatter / linter
  • Block rm -rf, force-push, or prod credential paths
  • Require green unit tests before accepting a multi-file change
  • Notify the team channel when a long routine finishes

Combine: CLAUDE.md (intent) + Skills (procedure) + Hooks (enforcement).


12. Daily prompts that work

Be specific:

Fix the login bug where users see a blank screen after wrong credentials.
Reproduce from the auth tests if possible.

Break large work:

1. Add the user_profiles table migration
2. Add GET/PATCH /api/profile
3. Add the profile edit page
Stop after each step for review.

Code review:

Review my uncommitted changes. Focus on security, missing tests, and API contract breaks.

Git:

create a branch feature/rate-limit and open a PR summary when tests pass

13. From solo prompts to trusted long runs

Claude Code in Action is the next course after 101. Capstone ideas:

ThemePractice
SteerPlan mode, compaction, rewind, hands-on vs goal/loop autonomy
ConfigureLean CLAUDE.md, skills, permission mode per job, hooks
AutomateRoutines on Anthropic infra, headless CLI in your pipeline, GitHub Action + managed code review
VerifyReview unsupervised work in proportion to how little you watched; gate on tests; package a trusted setup as a plugin for the team

Verification principle: the less you watched, the more you must verify — tests, diff review, and staging smoke beats vibes.


14. Anthropic Academy map (Claude-centric path)

All courses below are free on Anthropic Academy (Skilljar). You need a Skilljar login for progress tracking; a Claude account is separate if you want to use the product.

Start here (product & fluency)

CourseWhy
Claude 101Everyday Claude: projects, artifacts, skills, connectors, research
AI Fluency: Framework & Foundations4D collaboration skills
AI Capabilities and LimitationsMental model of model behaviour

Claude Code track (this article)

CourseWhy
Claude Code 101Install → EPCC → CLAUDE.md → subagents → skills → MCP → hooks
Introduction to agent skillsDeep dive on SKILL.md
Introduction to subagentsDelegation and context hygiene
Claude Code in ActionLong sessions, automation, verify & plugins

Platform & API (build products on Claude)

CourseWhy
Claude Platform 101API → agent loop → tools → thinking → MCP → managed agents (TypeScript demos)
Building with the Claude APIFull Python path: prompts, tools, RAG, caching, MCP, agents
Claude with Amazon BedrockSame stack on AWS Bedrock
Claude on Google CloudSame stack on Vertex / Google Cloud

MCP specialist

CourseWhy
Introduction to Model Context ProtocolTools, resources, prompts in Python
MCP: Advanced TopicsSampling, notifications, roots, stdio vs Streamable HTTP

Audience adaptations of AI Fluency

CourseAudience
AI Fluency for educatorsFaculty / instructional design
Teaching AI FluencyInstructor-led teaching & assessment
AI Fluency for studentsLearners & career planning
AI Fluency for nonprofitsMission-driven orgs (with GivingTuesday)
AI Fluency for small businessesSMB operations
AI Fluency for buildersProduct / engineering builders (with CodePath)
AI Fluency for pK–12 EducatorsPath: educator + train-the-trainer

Suggested order for an engineer:

Claude 101 (optional)
→ AI Fluency Foundations + Capabilities (optional)
→ Claude Code 101
→ Skills + Subagents
→ MCP Intro
→ Claude Code in Action
→ Platform 101 or Claude API / Bedrock / Vertex
→ MCP Advanced

15. Checklist: first productive week

  1. Install Claude Code; claude --version; log in.
  2. Open a real repo; ask "what does this project do?" in Plan mode.
  3. Run /init; trim CLAUDE.md to build/test commands and hard constraints.
  4. Ship one tiny bugfix via Explore → Plan → Code → Commit.
  5. Add one Skill for a procedure you repeat weekly.
  6. Add one hook that runs tests or blocks a dangerous command.
  7. Connect one MCP server you already trust (docs, tracker, or DB read-only).
  8. Create one subagent for code review; use it on your next PR.
  9. Enrol in Claude Code 101; schedule In Action after a week of daily use.


Distilled from Anthropic Academy Skilljar course outlines (Claude Code 101, Claude Code in Action, agent skills, subagents, MCP, Platform/API/Bedrock/Vertex, and AI Fluency paths) plus current Claude Code documentation. Course pages remain the source of truth for video lessons and certificates.

Discussion

Comments

Share feedback or questions about this page. No account required.

Loading comments…