agentleFS
milanglaciermilanglacier/pi-multi-agent-skill/skills/multi-agent/SKILL.md

multi-agent

Skill9 starsChanged 16 days agoMITView on GitHub

Start other pi agents and delegate work to them. Use it when a task benefits from a multi-agent workflow, such as splitting work across agents, running it in parallel or in the background, or keeping a side task out of your own context.

9 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions9 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 9

    1. samchon/typia★ 6ksame name
    2. samchon/nestia★ 2.2ksame name
    3. MasihMoafi/skills★ 8same name
    4. memi-design/design-skills★ 7same name
    5. liwuhou/skills★ 1same name
    6. mmNalaka/nm-skills★ 1same name
    7. matheus3006/my-claude-skills★ 0same name
    8. olympus-terminal/claude-skills★ 0same name
    9. SKY-lv/multi-agent★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write prompts that are self-contained: give the goal, the relevant paths and what the answer should contain.

    line 49
  2. Very specific:

    If your harness has a tool that runs a shell command in the background, run the foreground run command with it.

    line 55
  3. Very specific:

    Never put the command in the background with &.

    line 65
  4. Distinctive:

    Run only as many jobs at once as the task needs.

    line 67
  5. Very specific:

    When a background tool of your harness runs the foreground command and the tool has its own timeout, pass a shorter --timeout, leaving a …

    line 76

“Common” is measured: kept by at least 6 in 10 of the 5 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

Multi-agent

This skill starts other agents and manages each one as a named job. An agent does not see your conversation unless you start it with --fork, and you see only its final message.

SKILL_DIR below is the directory that contains this SKILL.md. Every command has the form:

python3 "$SKILL_DIR/scripts/multi_agent.py" <command> ...

Pick a profile

A profile sets an agent's system prompt, model, thinking level and tools. Run this once per session to see the available profiles:

python3 "$SKILL_DIR/scripts/multi_agent.py" profiles

There are two built-in profiles. general-purpose (the default) has your tools and settings. Explore is a read-only search agent. Pass a profile with --profile NAME.

Run an agent

For a short single task, run it in the foreground. The command blocks until the agent finishes and prints its result:

python3 "$SKILL_DIR/scripts/multi_agent.py" run --profile Explore "Where is the retry policy for HTTP calls defined?"

Pass a prompt longer than one line through - and a heredoc:

python3 "$SKILL_DIR/scripts/multi_agent.py" run --name auth-review - <<'EOF'
Read src/auth/ and list every place that ...
EOF

Write prompts that are self-contained: give the goal, the relevant paths and what the answer should contain. When the task builds on your conversation so far, add --fork instead: the agent starts from a copy of it.

For a long task, or several tasks in parallel:

  • If your harness has a tool that runs a shell command in the background, run the foreground run command with it. The job then stops when your session ends. The command prints multi-agent: started job NAME first; use that name for steer and abort. If the tool can wake you on each output line, turn that off and wait for the command to exit. If the tool has its own timeout, see "Timeouts" below.
  • Otherwise, or when the work must continue after your session ends, add --background. The command prints the job name and returns at once. A background job runs until it finishes or reaches its timeout (one hour by default). Tell the user the job's name.
  • Never put the command in the background with &; use --background.

Run only as many jobs at once as the task needs.

Timeouts

  • A foreground run or resume has no timeout unless you pass --timeout S. It stops when the agent finishes or when the command ends, for example when your tool call is cancelled or your session ends.
  • A --background job stops after one hour unless you pass --timeout S. --timeout 0 removes the limit.
  • When a background tool of your harness runs the foreground command and the tool has its own timeout, pass a shorter --timeout, leaving a grace period so the job stops the agent and records its result before the tool kills it. If you disable the tool's timeout instead, the job runs until the agent finishes or your session ends.

Wait for a result

python3 "$SKILL_DIR/scripts/multi_agent.py" wait NAME --timeout 120

Exit code 2 means the job is still running; run the same command again in a new tool call. Wait for one job per tool call and do not chain several wait commands in one call: a message that steers you arrives only after your current tool call returns.

The output is the agent's final message followed by a --- multi-agent --- footer. The footer is for you. Report the agent's findings to the user in your own words.

Exit code 0 means the job ended with status done; 1 means it ended another way (failed, aborted, timeout, killed, died), and the output says why.

Correct or continue a job

python3 "$SKILL_DIR/scripts/multi_agent.py" steer NAME "Skip the tests directory"
python3 "$SKILL_DIR/scripts/multi_agent.py" abort NAME
python3 "$SKILL_DIR/scripts/multi_agent.py" kill NAME
python3 "$SKILL_DIR/scripts/multi_agent.py" resume NAME "Now check the callers too"
  • steer adds a message that the agent reads before its next step.
  • abort stops the agent and keeps its last message as the result.
  • kill stops a job that does not respond to abort.
  • resume continues a finished job's conversation with a new prompt.

kill --all stops every running job of the current project. Use it only when the user asks.

Inspect jobs

python3 "$SKILL_DIR/scripts/multi_agent.py" list
python3 "$SKILL_DIR/scripts/multi_agent.py" status NAME
python3 "$SKILL_DIR/scripts/multi_agent.py" peek NAME

peek shows the job's recent tool calls.

References

The references/ directory next to this file has the details. Read a file only when you need it:

  • commands.md: every command and option, output formats and exit codes.
  • lifecycle.md: statuses, how a run stops, foreground and background lifetime, timeouts, dialogs and nesting.
  • profiles.md: writing a profile, where profiles are looked up, and how the model, tools and system prompt are chosen.
  • state.md: where jobs and conversations are stored, and the agent's environment.
  • usage.md: token and cost report.
  • troubleshooting.md: error messages and what to do about them.

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.