agentleFS
sammasaksammasak/claude-code-skills/skills/agent-orchestration/SKILL.md

agent-orchestration

Skill1 starsChanged 28 days agoMITView on GitHub

Use when dispatching work to background or parallel subagents, defining custom subagents, or choosing between local agent dispatch and running Claude on another machine (herdr).

24 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use mcp-builder and code-review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    mcp-builder

    Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 22 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Don't re-delegate your whole assignment to one subagent: when you're already the agent assigned to a task — use subagents for sub-tasks …

    line 48

“Common” is measured: kept by at least 6 in 10 of the 22 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

agent-orchestration

Local dispatch: the Agent tool

The Agent tool spawns a subagent in the current session. subagent_type: "fork" forks the caller — full conversation context, same model, shares the prompt cache — and is the right default whenever intermediate output isn't worth keeping in the parent's context. Any other subagent_type (or omitting it) starts a fresh agent with zero memory of the conversation; brief it like a colleague who just walked in.

Parallel dispatch: independent tasks go in a single message with multiple Agent tool calls — that is what makes them run concurrently. Sequential calls across separate messages block on each other.

Custom subagents: define reusable ones at .claude/agents/<name>.md. Frontmatter controls model, tools, and permissions:

---
name: my-agent
model: sonnet            # explicit model always — see assigning-subagent-models
tools: [Bash, Read, Grep]
---
System prompt / instructions for this agent go here.

The homelab's built-in agents (verify-deployment.md, validate-k8s.md, code-reviewer.md, k8s-debugger.md, nix-explorer.md, meta-reviewer.md, skill-optimizer.md) come from ~/claude-code-skills/agents/ and are symlinked into ~/.claude/agents by Home Manager — edit them in that repo, push, then just bump skills + just switch in ~/nixos-config; never edit the linked file directly.

Every spawn needs an explicit model — see the assigning-subagent-models skill for the effort-tier ladder. Don't leave a subagent to silently inherit the parent's model.

Remote dispatch: running on another machine

For work that needs a different host (not just isolation — an actual remote machine), use herdr, the terminal workspace manager, to open a session on that host and run claude there. herdr sessions on the existing hosts are the only remote pattern; there is no VM-provisioning layer.

Decision Matrix

NeedPattern
Independent research/review tasksMultiple Agent calls in one message
Output not worth keeping in contextsubagent_type: "fork"
Reusable specialised role.claude/agents/<name>.md definition
Isolated filesystem for a taskisolation: "worktree" on the Agent call
Work must run on a specific other machineherdr session on that host

Known Gotchas

  • A forked agent's tool output isn't yours until it reports back. Never fabricate or predict a fork's results — wait for the completion notification.
  • isolation: "worktree" only helps inside a git repo — it creates a git worktree, auto-cleaned if the agent makes no changes; otherwise the path/branch are returned.
  • Don't re-delegate your whole assignment to one subagent when you're already the agent assigned to a task — use subagents for sub-tasks you'd otherwise have to context-switch out of, not as a proxy for the whole job.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.