Composition
The primitives get powerful when they work together. Here's how our little skill grows into a real system, and a decision tree for choosing the right piece every time.
Lesson 6.1
Composing with nested skills
A skill can call another skill, just by referring to it in plain language. That's how you build orchestration without any special machinery: one skill sequences the work and hands specific steps to others.
## Steps
1. Build the UI using the design-guide skill.
2. Get sign-off from the user before continuing.
3. Commit and open a PR using the git skill.
Each referenced skill still loads by Dynamic Context; the orchestrator stays lean, and the detail lives in the skills it calls. Composition is just skills naming other skills.
Lesson 6.2
Reaching past skills
Two situations call for something other than a skill. Watch our running example hit both.
A subagent, for isolation
To match the house style well, design-guide wants to survey every existing screen and component: hundreds of lines of markup and styles. Pulled into the main window, that's noise you'll never look at again. So it delegates to a subagent: the subagent reads the whole component library in its own context and returns just a tidy summary of what already exists. Your window stays clean; you can even route it to a cheaper model.
A hook, for a guarantee
The team's rule: every UI change must be checked against the guide; no one should be able to forget. A skill can't guarantee that; it's up to the model to invoke. A hook can: fire when a UI file changes and run the contrast/token check deterministically, every time. The harness enforces it, not the model.
Same feature, four primitives: a skill holds the how-to, a command lets you run it on demand, a subagent isolates the noisy library survey, and a hook guarantees the check happens on every UI change. That's composition.
Lesson 6.3 · Interactive
Which primitive?
Here's the decision framework as a tool. Answer the questions for something you actually want to build; it walks you to the right primitive and tells you why.
The same four questions from Module 1, in the order that resolves fastest.
Check
Final check
"Every commit must be lintedLinted: checked automatically for code-style issues and common mistakes., no exceptions, even if the model doesn't think of it." Which primitive?
Your skill needs to skim 300 files to find three relevant ones, then keep working with just those three. Best structure?
1. Skills compose by naming other skills: orchestration with no special machinery.
2. Reach for a subagent to isolate noisy work; a hook to guarantee something every time.
3. Choose with four questions: guarantee? isolate? recurring? trigger yourself?
4. Above all, spend the context budget deliberately.
You can build and compose the four primitives now. One piece is left: connecting your agent to systems outside the chat, CLIs and MCP servers, in Module 6.
Composition, done.
Mark it complete, then give your agent some reach in Module 6.