Loading lesson…
Skills are most powerful when combined. Chain them, wrap them, or refuse the temptation entirely. Recursion risks, cost and latency tradeoffs, and the rules for keeping composed workflows debuggable. Across OpenClaw, Claude Code, and broader agentic-framework discussions, the recurring lesson on composition is that it always looks cheaper than it is.
A single skill solves one workflow. Real work — shipping a feature, reviewing a release, onboarding a customer — is a chain of workflows. Composing skills is how an OpenClaw soul handles the chain. Done right, composition turns a portfolio of small skills into a force multiplier. Done badly, it produces fragile, expensive, and unobservable behavior.
| Pattern | What it looks like | When to use |
|---|---|---|
| Chain | Skill A's output feeds into Skill B as input | Linear workflow with clear handoff points |
| Wrap | A parent skill calls child skills as procedures within its body | When you need orchestration logic the children should not see |
| Branch | Parent picks one of several skills based on a condition | Decision-tree workflows (e.g., bug vs feature vs docs) |
| Recurse | A skill invokes itself or a peer that may call back | Almost never — see warnings below |
The simplest composition is a chain. The user asks for X, the soul fires Skill A, captures its output, and the user (or the soul, with explicit instruction) feeds the result into Skill B. Each skill stays simple and atomic. The chain lives in the conversation, not inside any one skill — which means you can debug it, replay any step, and swap pieces without rewriting.
A wrapper skill is a skill whose procedure mostly calls other skills. The 'release' skill might call `run-tests`, then `bump-version`, then `release-notes`, then `tag-and-push`. The wrapper holds the order, the conditions, and the rollback logic. The wrapped skills stay general-purpose; the wrapper encodes a specific workflow.
A skill that invokes itself, or a pair that mutually invoke each other, is a recursion hazard. Without explicit base cases the soul keeps spawning sub-tasks until it exhausts its context, its tokens, or your patience. OpenClaw allows recursion, but the responsibility for stopping it is yours. Most apparent uses of recursion are better expressed as a loop in the procedure — 'repeat steps 1-3 until the test suite passes' is finite and visible; 'invoke yourself with the failing test' is not.
| Composition style | Token cost | Latency | Debuggability |
|---|---|---|---|
| Inline single skill | Low | Low | High — one trace |
| Conversational chain | Medium | Medium | High — every step visible |
| Wrapper skill | Medium-high | Medium | Medium — wrapper trace, child detail buried |
| Recursive composition | Unbounded | Unbounded | Low — easy to lose the thread |
The big idea: chains are usually enough; wrappers earn their keep when orchestration logic is real; recursion is almost always a bug. Compose only when the workflow's stability and your team's tolerance for failure modes both justify the cost.
8 questions · take it digitally for instant feedback at tendril.neural-forge.io/learn/quiz/end-openclaw-skills-composing-creators
What is the main idea of "Composing Skills: When To Chain, When To Wrap, When NOT To"?
Which concept is most central to "Composing Skills: When To Chain, When To Wrap, When NOT To"?
Which use of AI fits this topic best?
What should a careful learner remember about "Chains in conversation are debuggable; chains inside skills are not"?
You want to use AI after this lesson. What is the safest next step?
How should AI output about chaining be treated?
Name one way to verify an AI answer about chaining.
Which action would help you apply "Composing Skills: When To Chain, When To Wrap, When NOT To" responsibly?