Skip to content
20 min read50 min build
Prerequisites:ch01-minimal-coding-loopch02-tool-registrych03-planner-task-graphch04-memory-contextch05-safe-file-editingch06-approvals-sandboxingch07-worktree-isolationch08-execution-lanesch09-supervisor-workerch10-schedulingch11-review-queuech12-handoff
What You Will Build

A SkillLoader that registers, loads, and injects bundled tool+prompt packs into agents at runtime

Why This Matters

Your agent has a fixed set of tools. It can read files, write patches, run commands. But what happens when you need it to deploy a Kubernetes manifest? Or lint a Terraform plan? Or generate SQL migrations?

You could keep adding tools to the agent's core. That path leads to a bloated system prompt, tool name collisions, and an agent that is mediocre at everything because it carries too much context.

Skills solve this differently. A skill is a self-contained pack of tools and domain-specific prompts that gets injected into the agent at runtime — only when needed. The agent starts lean. When a task requires Kubernetes expertise, the k8s-deploy skill is loaded: its tools appear in the registry, its domain prompt is appended to the context. When the task is done, the skill can be unloaded. The agent stays focused.

This is how production systems like Claude Code handle domain-specific capabilities. Skills are not baked in — they are loaded on demand, versioned independently, and composed together.

What You Will Build

A SkillLoader that manages skill packs — registration, loading, injection into the existing ToolRegistry from Chapter 2, and unloading. Each skill pack bundles tools and a domain prompt.

  SkillPack: "k8s-deploy"
  +-------------------------+
  | tools:                  |
  |   - kubectl_apply       |
  |   - kubectl_get_pods    |
  | prompt:                 |
  |   "You are deploying    |
  |    to Kubernetes..."    |
  +----------+--------------+
             |
             v
  +----------+--------------+
  |     SkillLoader          |
  |  register() / load()     |
  +----------+--------------+
             |
             | inject tools + prompt
             v
  +----------+--------------+      +------------------+
  |    ToolRegistry          |      | Agent Context    |
  |  (from Ch2)              |      | system prompt +  |
  |  + kubectl_apply         |      | skill prompt     |
  |  + kubectl_get_pods      |      +------------------+
  +--------------------------+
             |
             v
     Agent uses skill tools
     during execution

Story Mode for this chapter is coming soon

We are crafting a fun, code-free explanation with metaphors and interactive mini-games. In the meantime, switch to Builder Mode to start learning.

What's Next

You have a system that can dynamically expand its capabilities at runtime. Skills keep the agent lean when idle and powerful when needed. But right now, skills are loaded manually — someone decides which skills are needed and passes them to the agent.

In Chapter 14, you will build automations: background workflows that trigger automatically in response to events. When code is pushed, an automation loads the right skills, creates an agent, and runs a task — all without human intervention. Skills become the building blocks of automated workflows.