⏳ This skill is pending AI review.
Scores will appear once the review pipeline completes.
returns
Return policy and how to start a return. Load when a customer wants to return or send back an item, or asks whether they can.
Choose how to use this skill
You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.
1. Native installer
This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.
Do not guess an installer command or replace an existing version without reviewing the diff.
2. Complete package recommended
Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.
No complete ProSkills package is published for this listing yet.3. Prompt-only
Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.
Need only the instruction file?
Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.
No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.
// RATINGS
Not yet listed on ClawHub or SkillsMP
// README
Single agent loop kit
A starter kit for moving a multi-agent system (a router or orchestrator in front of specialist subagents) toward one agent loop that loads skills and tools on demand. It is the companion to the article Building agents: When to fold subagents into your main agent loop.
Reference implementation. Not maintained and not accepting contributions.
The kit does not assume a single loop always wins. It measures. Every change is scored on the same eval before and after, and a subagent only goes away when the numbers say its replacement holds.
The idea
- Measure. Find the evals you already have, fill the gaps, and score the system as it is today. If you have none, the kit builds one with you.
- Combine. Merge the subagents that always run together.
- Fold. Turn each remaining subagent into a skill and tools in the main agent, one at a time, and compare. Keep the ones that earn their own context, and call them as tools.
Then keep it healthy: one small team owns the system prompt and the shared eval, and each domain team owns its skills.
Try it in ten minutes
examples/support-desk is a small, runnable support agent with a router and six subagents,
built so that each subagent has a known right answer. Follow
examples/support-desk/RUNBOOK.md to watch Claude Code
audit it, fold one subagent and print the before and after numbers.
Start with the free check. It needs no API key and spends nothing. From wherever you put the kit (downloaded as a zip, unzip it first):
cd single-agent-loop-kit/examples/support-desk
KIT_MODEL=fake python3 evals/run_eval.py --variant smoke
You should see nineteen lines ending in 19 tasks ran on the offline stand-in model, 0 harness errors. The plumbing works. The stand-in follows keyword rules, so that run is not scored.
Scores come from the real run in the runbook.
Use it on your own system
-
Copy the skill into your agent repo:
git clone https://github.com/anthropics/single-agent-loop-kit cp -r single-agent-loop-kit/skill <your repo>/.claude/skills/single-agent-loop -
Open Claude Code in your agent repo and say:
Run the single-agent-loop skill. -
It audits first and stops to show you a verdict for each subagent: fold, merge, call as a tool, or keep. Correct anything it got wrong.
-
It then works the plan one change at a time. Each change gets its own eval run and a comparison, and you decide whether it stays.
It stops at the same points every time: after the audit, before any paid run, after the baseline, and after each change. Each stop is a short check-in with what it found, what it recommends and one question for you. Before a paid run, that includes a token estimate.
You do not need an eval to start. If you have none, or none that tests the whole system, it asks for a safe way to run your system on a test request and for some real requests, drafts about ten tasks, and has you correct what done means for each before it runs them.
The skill reads whatever orchestration code is in the repo, so it is not tied to a
framework. It keeps its notes in single-loop/ in your repo.
What's in the box
| Path | What it is |
|---|---|
skill/SKILL.md | The front door. Short, and points at one step file at a time |
skill/steps/00-audit.md | Inventory every subagent and give each a verdict |
skill/steps/01-baseline.md | Reuse your evals, fill gaps or build one if you have none, score today's system |
skill/steps/02-merge.md | Merge two subagents that always run together |
skill/steps/03-fold.md | Fold a subagent into a skill and tools |
skill/steps/04-as-tool.md | Keep a subagent, but call it as a tool with a structured result |
skill/steps/05-upkeep.md | Shrink the prompt, prune skills, settle ownership |
skill/scripts/coupling_map.py | From a trace export: which subagents carry the traffic and which run together |
skill/scripts/compare.py | Two eval runs side by side: task completion, latency, model calls, tokens, cost |
skill/scripts/chain_coverage.py | Checks the eval has a task for every chain of subagents production uses, so a dropped handoff cannot go unseen |
skill/scripts/estimate.py | A token estimate for the next eval run, from one already measured, and the estimate next to the actual afterwards |
skill/templates/ | Inventory, plan, skill, tool spec, subagent response schema, contribution rules, skill loader |
reference_loop/loop.py | A small single agent loop to read and copy from: parallel tool batches, skills on demand, tool search, budgets, a write gate, an optional verifier |
examples/support-desk/ | The runnable example, before (app/) and after (single_loop/) |
examples/support-desk/example-run/ | What two real runs look like: the plan, a baseline, one fold, one subagent called as a tool, and the comparisons |
It leans on tools you already have
The steps hand off to these Claude Code commands instead of rebuilding them:
| Command | Used for |
|---|---|
/claude-api build-eval | Building or extending the eval in step 1 |
/claude-api hillclimb | Tuning a skill or tool description when a fold comes up short |
/claude-api prompt-audit | Finding instructions written for older models, in step 5 |
/claude-api cost-optimize | Trimming spend once the design has settled |
/skill-creator | Drafting and auditing skills (/plugin install skill-creator@claude-plugins-official) |
/skill-doctor | Seeing what each skill costs and how often it is used |
The eval runner in the example writes the same results layout /claude-api build-eval
uses, so /claude-api hillclimb and its report work on it directly.
When you don't need this kit
- You have no subagents yet. Start with one loop. Read
reference_loop/loop.pyand add tools and skills as testing shows you need them. - Your subagents earn their context. Parallel research across fresh contexts, independent verification, or work that reads far more than the main agent needs afterwards are good reasons to keep a subagent. The audit will tell you so.
- Your system cannot be scored yet. Having no eval is fine: the baseline step builds one with you. But it needs two things only you can give. A way to run the system on a test request outside production, and someone who can say what a correct outcome is for the common requests. If either is missing, sort that out first. Without a score, a migration is a matter of opinion.
Cost
The audit reads code and costs what a Claude Code session costs. Eval runs call your model for every task, rep and version, so the skill asks before every paid run and gives a token estimate based on runs it has already measured. Start with ten tasks and two or three reps.
Tests
python3 -m unittest discover tests
They need no API key. They cover the scripts, the reference loop, and an offline run of both versions of the example.
What has run on a real model
Two runs of the example, by one person on one model, both recorded as they came out in
examples/support-desk/example-run/: the audit, a
twelve-task baseline and the returns fold, then a seventeen-task baseline and diagnostics
called as a tool. Each write-up says what
// HOW IT'S BUILT
// FILES
2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.
examples/support-desk/single_loop/skills/returns/SKILL.md1.0 KB03a4179fe20cupstream ↗
--- name: returns description: Return policy and how to start a return. Load when a customer wants to return or send back an item, or asks whether they can. --- # Returns Start a return with `start_return`. The tool checks the policy itself and refuses when an order does not qualify, so there is no separate eligibility step. The policy, so you can explain an outcome: - Items can be returned within 30 days of delivery. - Final sale items cannot be returned. - An order that has not been delivered cannot be returned yet. There are no exceptions. If a customer asks for one, say plainly that you can't and which rule applies. Pick the closest reason from what the customer already said: `too_small`, `too_large`, `changed_mind`, `defective`, `other`. Only ask when they gave no hint. When a return depends on something else, such as "send it back if my other order is late", settle that question first with the right tool, then act on the answer. Once the return exists, give the customer the RMA id and the label link.README.mdupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
Plain-text copy, no login: /skill-bundles/anthropics-single-agent-loop-kit-examples-support-desk-single-loop-skills-return.md