Sign in

Free Claude Code lesson 2 of 3

The agentic stack

Know what is a file, what is a model call, and what is a running process.

Click a layer. See its real responsibility.

U1 · Supplied practical masterclass ↗

A model response is not a filesystem operation

The model can request a tool operation. The host checks permissions, executes it, and returns an observation. The next model turn reasons over that observation.

Modelchooses a tool

Hostchecks and executes

Resultstdout / error / file

Modelchooses next step

U1 · Supplied practical masterclass ↗

Read the three kinds of “workflow”

Prompt workflow: an ordered procedure written in a skill.

Program workflow: code calls a worker, tests its result, retries, or stops.

Event workflow: GitHub starts a job after an event. That job may then execute either of the above.

Only the second and third directly encode control flow outside the model’s judgment.

U1 · Supplied practical masterclass ↗G2 · GitHub: workflow triggers ↗

One feature, three control planes

PlaneExampleFailure you must consider
ReasoningAgent interprets the ticket and edits code.It misunderstands a requirement or overlooks an edge case.
ExecutionShell installs dependencies; tests return an exit status.The command fails, hangs, or uses the wrong environment.
CoordinationScheduler claims ready work and records outcomes.Two workers claim the same task, or successors start before integration.

This three-plane decomposition is a teaching model. Use it to locate a bug: bad instructions, bad execution, or bad coordination?

Trace one turn without hand-waving

Where each piece lives

User goal

Project instructions

Skill / workflow

Tools and agents

Tests and review

A workflow is an ordered policy for doing work. It may be written inside a skill, encoded in a script, expressed as several commands, or coordinated by an external runner. It is not a special file type.

ComponentQuestion it answersTypical homeExecution behavior
CLAUDE.mdWhat should Claude know every session?./CLAUDE.md or ~/.claude/CLAUDE.mdInstructions in context; guidance, not a hard guard.
RuleWhat applies to a path or topic?.claude/rules/Scoped or general instructions.
SkillHow should this recurring task be done?.claude/skills/name/SKILL.mdInstructions and optional supporting assets load when invoked.
SubagentWho should do this bounded task?.claude/agents/name.mdSeparate agent context; may use tools and return a result.
HookWhat must run on an event?.claude/settings.json or plugin hooksHost triggers handler on an event, subject to configuration.
MCPWhich external service can supply tools?.mcp.json or CLI-managed settingsConnection exposes tools; credentials and permission still matter.
PluginHow are extensions distributed?Marketplace / installed packageCan package skills, agents, hooks, and MCP definitions.
Git worktreeWhere can concurrent edits live?Another directory of the same Git repositorySeparate checkout; not a security sandbox.

Where each one costs context is covered in Context budget: what loads when.

U1 · Supplied practical masterclass ↗

Pick the smallest useful extension

What are you trying to make reliable?

Recommended: Use a short CLAUDE.md for facts needed every session; use .claude/rules/ for scoped conventions.

What you want to make reliableSmallest useful extension
A repeatable project conventionUse a short CLAUDE.md for facts needed every session; use .claude/rules/ for scoped conventions.
A multi-step procedureCreate a skill with explicit inputs, steps, evidence, and an exit condition. Add scripts only for deterministic operations.
A command that must run at an eventUse a hook on the relevant lifecycle event. Test its matcher and whether it should warn, block, or simply record.
Access to a tracker or serviceConfigure an MCP server, CLI, or API integration and authenticate it. Then tell the workflow exactly when to read or update the service.
A bounded task in fresh contextDefine a bounded subagent task and an expected report. Add a worktree if another agent edits the same checkout.
Share the whole setup with a teamPackage the tested setup as a plugin or share project files in Git. Document what installation enables and what remains opt-in.

U1 · Supplied practical masterclass ↗

Reading rule: a repository’s README describes intent; its actual SKILL.md, hook files, scripts, and configuration show how it works. “Automatically” in a README may depend on installation, permissions, credentials, or a separate command.

← PreviousNext: Context budget: what loads when →

Lessons 1 to 3 are free. Sign in to open the other 21 chapters and ask the assistant.