When a Packaged Skill Beats a New Agent (and a Prompt Library)
Four teams need the same escalation note. A prompt library drifts to two versions, a new agent takes three calls, and one owned Skill file serves all four teams in one call. Here is how to pick the pattern and say who decides what.
What you will learn
- Compare augmented LLM, workflow, agent and Skills-based patterns on reuse, governance and risk
- Pick a pattern from a case's constraints and name its delegation boundary in one line
- See why pasted prompt copies drift while one owned Skill file does not
- Avoid the reinvented agent: building a loop for a job a Skill already does
Before you start
- What a Claude Skill is (SKILL.md)
- Workflow or agent: who picks the next step
A team lead has an idea. Four teams (billing, delivery, returns and VIP) all need the same escalation note when a ticket changes team. So let's build a new agent for it.
Maybe. But an architect has four patterns to choose from: augmented LLM, workflow, agent and Skills. A new agent means a loop to build and test, the model picking the steps on every run, wording that can differ per run, and nobody owning the format. Yet this job has a fixed format and an owner. That's a package, not a new agent. In this article you see when the packaged Skill wins.
Sticky notes, a recipe card or a new chef
Think of sharing a recipe in a kitchen.
- Sticky notes. Every desk copies the text. That's a prompt library: when one wording changes, the other copies stay the same.
- A recipe card. One card, one owner, kept in the binder. That's a packaged Skill: every cook reads the same card.
- A new chef who decides each dish on the day. That's a new agent, even when a card already covers the job.
You wouldn't hire a new chef to follow a recipe card.
Four patterns, three constraints
Each pattern answers differently on reuse, governance and risk, and draws the delegation boundary (who decides what) in a different place:
| Pattern | Reuse | Governance and risk | Boundary |
|---|---|---|---|
| Augmented LLM | Per request | Data rules in your code; low risk | Claude answers, your code supplies the data |
| Workflow | One path, run many times | Reviewed code, each step checked | Your code owns the path, Claude fills each step |
| Agent | Lowest | You set limits and hooks; highest risk, a wrong step can act | Claude owns the path, inside your limits |
| Skill | Highest: one file, many teams | An owner and a version | Claude follows the package, its owner writes it |
The decision rule in code
The project is a slice of SupportDesk. It runs against a stand-in: the Anthropic SDK on an httpx mock transport with scripted replies and tool calls, so no API key is needed and the replies show the design, not a real model's quality. patterns.py is a small decision rule:
"""Four patterns, three constraints. choose() picks the pattern; control() says how the risk is held."""
BOUNDARY = {
"augmented LLM": "Claude answers, our code supplies the data",
"workflow": "our code owns the path, Claude fills each step",
"agent": "Claude owns the path, inside our limits",
"skills-based": "Claude follows the package, its owner writes it",
}
def choose(case):
if case["path"] == "open":
return "agent"
if case["reuse"] == "many" and case["governed"]:
return "skills-based"
if case["path"] == "known":
return "workflow"
return "augmented LLM"
def control(pattern, risk):
high = risk == "high"
if pattern == "agent":
if high:
return "turn limit + hook on writes"
return "turn limit"
if pattern == "skills-based":
if high:
return "owner signs off each version"
return "owner edits one file"
if pattern == "workflow":
return "code checks each step"
return "read-only tools"
- If the path is unknown, nobody can write the steps, so you need an agent.
- If many teams reuse know-how that has an owner, package it as a Skill.
- If the path is known, it's a workflow, and your code owns every step.
- Then the risk picks the control that holds it.
Four cases through it:
cases
C-1 augmented LLM | Claude answers, our code supplies the data | read-only tools
C-2 skills-based | Claude follows the package, its owner writes it | owner signs off each version
C-3 workflow | our code owns the path, Claude fills each step | code checks each step
C-4 agent | Claude owns the path, inside our limits | turn limit + hook on writes
| Case | Constraints | Pattern |
|---|---|---|
| C-1 shipping cut-off question | One team, low risk | Augmented LLM |
| C-2 escalation note | Four teams, one owner, costly wording | Skills-based |
| C-3 nightly re-tag | Steps known, nobody watching | Workflow |
| C-4 delivery dispute | Steps unknown, a wrong step can ship a parcel | Agent |
The constraints choose the pattern, and the pattern draws the boundary.
The package: one SKILL.md with an owner
Here is the escalation note as a Skill, skills/escalation-note/SKILL.md:
---
name: escalation-note
description: Write the escalation note on a team change.
metadata:
owner: support-ops
version: "2"
---
Write four lines, in this order.
1. Customer and order.
2. What we already tried.
3. What the next team must decide.
4. Who owns the next step.
Never promise a refund in the note.
- A name Claude can find it by.
- A description that says when to use it. Claude sees that first, and loads the rest only when the task matches.
- An owner and a version, so one person can change it.
- The rule written once for every team: never promise a refund in the note.
The full anatomy of a Skill is covered in authoring a Claude Skill.
Loading it from code
skill_store.py finds the Skill by name, splits the front matter from the body, and makes one call with the body as the system prompt. No loop and no tools, because the path is already written:
"""A packaged Skill: one SKILL.md with an owner. Claude follows the body when the task matches."""
import pathlib
from stand_in import MODEL
ROOT = pathlib.Path(__file__).with_name("skills")
def load(name):
path = ROOT / name / "SKILL.md"
text = path.read_text(encoding="utf-8")
_, front, body = text.split("---", 2)
meta = {}
for row in front.strip().splitlines():
key, _, value = row.partition(":")
meta[key.strip()] = value.strip().strip('"')
return meta, body.strip()
def run(ticket, client, name="escalation-note"):
meta, body = load(name)
r = client.messages.create(
model=MODEL, max_tokens=300, system=body,
messages=[{"role": "user", "content": ticket}],
)
return meta, r.content[0].text
One file per Skill, found by its name, so adding a Skill never changes the loader.
A library drifts, a Skill does not
Now the same note, carried three ways. library.py pastes the text into four teams and then the owner fixes the wording in one copy:
"""A prompt library: one text file that every team pastes into its own prompt."""
import pathlib
TEAMS = ["billing", "delivery", "returns", "vip"]
TEXT = (pathlib.Path(__file__).with_name("prompts") / "escalation.md").read_text(encoding="utf-8")
def paste():
return {team: TEXT for team in TEAMS}
def fix_one(copies, team, text):
copies[team] = text
def versions(copies):
return len(set(copies.values()))
The recorded run:
library
teams 4 | fix reached 1 | versions in use 2
skill
escalation-note v2 | owner support-ops | teams 4 | versions in use 1
new agent for C-2: calls 3 | same job by the skill: calls 1
With the library, the fix reached one team, so two versions are in use and the notes can differ. With the Skill, there is one file, version 2, owned by support-ops, and one version in use for all four teams. The new agent took three calls where the Skill needed one. Those call counts come from the stand-in's scripted tool plan, so they show the shape, not a measured cost.
When a library is enough, and when a Skill earns its place
| A prompt library is enough when | A Skill earns its place when |
|---|---|
| One team uses the text | Many teams share the know-how |
| It's plain text | Files or scripts ship beside the text |
| A stale copy costs little | It needs an owner and versions |
| Claude should load it only when the task matches |
Start with the library. Package a Skill when the reuse needs an owner. Where the package sits for prompt caching is a separate decision.
Skills is one building block among seven
primitives.py lists the blocks an architect can reach for, with their status as the docs give it today:
"""The building blocks an architect can reach for. Status is what the docs say today."""
PRIMITIVES = [
("tools", "Claude picks, our code runs", ""),
("MCP", "a standard plug for tools and data", ""),
("subagents", "a lead hands work to a helper", ""),
("hooks", "our code runs at fixed points", ""),
("Skills", "a package Claude loads on a match", ""),
("agent teams", "sessions that message each other", "experimental"),
("dynamic workflows", "an agent writes a program of agents", "beta"),
]
primitives: 7 | beta or experimental: 2
Per the lecture, agent teams are experimental in Claude Code and dynamic workflows are in beta in Managed Agents. For choosing between tools, Skills and MCP for one capability, see built-in tool, custom tool, Skill or MCP.
The trap: the reinvented agent
The job is an escalation note with a fixed format and one owner, and a new agent gets built anyway. Three symptoms:
- It takes three calls where the Skill needs one.
- The path is the model's, on every run.
- The format lives in a prompt nobody owns.
The repair is small. Ask first whether a package already does the job. Reuse the Skill and name its owner. Build an agent only when the path is open. When a scenario gives you reuse, governance and risk, pick one pattern, name all three, and justify the boundary in one line. The agent-versus-workflow side of this choice is in workflow or agent.
Quick recap
| Question | If yes |
|---|---|
| Is the path open, unknown until run time? | Agent, with a turn limit (and a hook on writes when risk is high) |
| Is the know-how reused by many teams and does it need an owner? | Skill, with an owner who signs off each version |
| Is the path known? | Workflow, code checks each step |
| None of these, one answer per request? | Augmented LLM with read-only tools |
The project files for this lesson are in the community, free to join.
Try it yourself
Add a fifth case: a refund-reason code that three teams must apply the same way, where a wrong code only mislabels a report. Write its path, reuse, governed and risk values, predict what choose() and control() return, and write the boundary in one line.
Related course on Udemy
Claude Certified Architect - Professional (CCAR-P) Exam Prep
Architecting with Claude: design, models, context, integration, evals, governance and stakeholders.View on Udemy ↗: Claude Certified Architect - Professional (CCAR-P) Exam Prep (paid course, opens in a new tab)Related posts
The Claude Messages API: Your First Call, Field by Field
One request in, one Message out. The four fields of a Messages API call (model, max_tokens, system, messages), how to read content blocks, stop_reason and usage, and why every turn resends the history.
Claude Tool Use: How tool_use and tool_result Work in the Messages API
Follow one order question through Claude's tool round trip: define a tool, read the tool_use block, run your own function and send a matching tool_result back, including parallel calls and is_error.
Claude Client SDKs Wrap One REST API: Raw HTTP, Python, TypeScript and Async Calls Compared
Every Claude client SDK wraps the same REST request: a POST to /v1/messages with a JSON body. See it built by hand, through the Python and TypeScript SDKs, as typed errors, and as async calls that wait together.
Anthropic SDK Timeouts, Retries and Error Classes: Configure the Client Once, Then Give 429, 529, 400 and Timeouts Their Own Move
Configure the Anthropic SDK client (timeout, max_retries, with_options, async, pagination), see which errors it retries by itself, then repair a retry wrapper so a 429, a 529, a 400 and a timeout each get the move the docs support.
