agentleFS
dylanjbarthdylanjbarth/agent-skills/skills/agent-delegate/SKILL.md

agent-delegate

Skill1 starsChanged 4 months agoMITView on GitHub

Spawn or resume work on Cursor CLI, Codex, or Claude Code from the current session, capture session identifiers for follow-up, and optionally monitor delegated sessions with babysit. Use when delegating a task to another coding agent, spawning a background CLI agent, resuming an external agent session, or cross-agent handoff.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. IamLumiRay/Agent-delegate★ 4same name
    2. anyoneanderson/agent-skills★ 3same 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 repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    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:

    Run from the chosen cwd. Substitute PROMPT and paths.

    line 22
  2. Very specific:

    When the user wants monitoring, use $babysit with a narrow check:

    line 87
  3. Very specific:

    Do not poll with raw sleep in shell.

    line 93
  4. Very specific:

    Default to sandboxed / approval-on modes unless the user requests --force, --yolo, or --dangerously-bypass-approvals.

    line 97
  5. Distinctive:

    Do not rotate credentials or switch accounts.

    line 98
  6. Distinctive:

    Do not commit or push unless the delegated task and user explicitly require it.

    line 99

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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 delegate

Spawn or resume work on Cursor, Codex, or Claude Code via their CLIs. Capture session handles so the user (or $babysit) can monitor progress.

Before spawning

Confirm:

  1. Target agent — cursor, codex, or claude
  2. Prompt — what the delegated agent should do
  3. Working directory — default: current project root
  4. Sandbox / approval — default conservative; only use force/yolo flags when the user explicitly opts in

Invocation templates

Run from the chosen cwd. Substitute PROMPT and paths.

Cursor

cursor agent -p --output-format text "PROMPT"

Resume:

cursor agent ls
cursor agent resume <chatId>
cursor agent --continue

Codex

codex exec "PROMPT"

Resume:

codex resume --last "PROMPT"
codex resume <SESSION_ID> "PROMPT"

Claude Code

Non-interactive:

claude -p "PROMPT"

Background:

claude --bg "PROMPT"

Resume:

claude --resume
claude --resume <session-id>

Set --add-dir when the task needs paths outside cwd.

Handoff block

After spawning, report:

Delegated: <agent>
Command: <exact command run>
Session: <id or resume hint, or "see stdout">
Monitor: <babysit check command, or none>

Babysit checks (read-only)

When the user wants monitoring, use $babysit with a narrow check:

  • Codex — inspect session list / resume picker output; avoid claiming completion without a status signal
  • Cursor — cursor agent ls or resume metadata
  • Claude — background agent status via claude agents when applicable

Do not poll with raw sleep in shell; use the host agent's native wait between checks.

Safety

  • Default to sandboxed / approval-on modes unless the user requests --force, --yolo, or --dangerously-bypass-approvals.
  • Do not rotate credentials or switch accounts.
  • Do not commit or push unless the delegated task and user explicitly require it.

Example

Use $agent-delegate to run this test fix on Codex in the background and babysit until it finishes.

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.