- Home
- Skills
- Agents & Orchestration
- Sub-Agent Setup
More screenshots
Works with the AI Agents you already use
Sub-Agent Setup
Operational rules for Claude Code sub-agents that prevent git conflicts, stalled runs, and wasted tokens.
$9.99
Sub-Agent Setup
Example session with this skill installed
Use the sub-agent setup rules to plan how I should run three sub-agents on this
repo: one to refactor the billing module, one to update its tests, and one to
write the migration notes. Two of them write files and commit. Tell me which
ones need a worktree, which run in the foreground, and what each report should
look like.
- Read your context and instructions
- Compiled the sub-agent setup
Sample output for the request above, not a live run.
Summary
Three sub-agents, two of them writing and committing. Run all three in isolated worktrees and run them in the foreground, since you're watching the session.
| Agent | Job | Isolation | Mode | Report shape |
|---|---|---|---|---|
| Billing refactor | Refactor the billing module | Worktree | Foreground | Branch, commit, changed files, open questions |
| Test update | Update tests for the new billing module | Worktree, from the refactor's branch | Foreground | Pass/fail count, failing tests |
| Migration notes | Write migration notes (one file, no code changes) | Worktree | Foreground | One-page notes file |
Why each choice
Billing refactor and test update both write files and commit, so each gets its own worktree. This stops one agent's staged changes from landing in the other's commit.
- The test update starts from the refactor's branch, not
main, so it tests the new code. - Migration notes writes a file, so it also gets a worktree, even though it doesn't commit code.
- Foreground for all three. Foreground avoids a stalled run if a completion notice is missed.
Follow-ups
If the test agent reports a failure in billing, send the fix to the same agent with SendMessage. Don't spawn a new one, since a new spawn starts with none of the context and repeats the whole job.
Next steps
- Merge the billing refactor first, then the test update, so the tests run against the new code.
- Read
git diff --cached --statbefore any push from the shared checkout. - Review the migration notes last, after both code changes are merged.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop wasting tokens and time on failed sub-agent runs. Unplanned spawns can cause git index conflicts, stalled background runs, and repeated work with no context. This skill gives you the rules to decide when to spawn, which isolation to use, when to run in the foreground, how to send follow-ups, and how to get a clean report back.
What it does
- Decides when a task needs a sub-agent instead of a single tool call.
- Uses worktree isolation for any agent that writes or commits.
- Runs in the foreground in unattended sessions, so runs don't stall.
- Sends follow-ups to the same agent with
SendMessage, instead of a new spawn. - Sets a fixed output shape so the parent can read the result quickly.
Use cases
- Splitting a refactor across directories with worktree isolation.
- Running a build-and-test pass and a separate verification pass on code changes.
- Background documentation while the parent handles logic.
- Migrations that need isolated build and test loops.
Known limitations
Doesn't fix a weak task plan. Needs git worktree support for full isolation. Written for multi-agent setups in Git repositories.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scanned
Verified clean 15 days ago
- Passed all security checks, Safe to install