home / skills / sounder25 / google-antigravity-skills-library / 09_multi_agent_delegation

09_multi_agent_delegation skill

/09_multi_agent_delegation

This skill creates isolated swarm sub-workspaces and prepares task-specific prompts and context for parallel worker agents to execute immediately.

npx playbooks add skill sounder25/google-antigravity-skills-library --skill 09_multi_agent_delegation

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
1.2 KB
---
name: Agent-Swarm Spawner
description: Prepares isolated sub-workspaces for parallel agent execution. Copies context and generates specific mission instructions for "Worker" agents.
version: 1.0.0
author: Antigravity Skills Library
created: 2026-01-16
leverage_score: 5/5
---

# SKILL-009: Agent-Swarm Spawner

## Overview

Complex tasks require parallel execution. This skill orchestrates "Swarming" by creating isolated sub-directories (`./.swarm/task_01`) initialized with all necessary context (`MISSION.md`, `WORKSPACE_PROFILE.json`), allowing a secondary agent to pick up the task immediately.

## Trigger Phrases

- `spawn agent for <task>`
- `create subtask <name>`
- `delegate <task>`

## Inputs

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `--task-name` | string | Yes | - | Name of the sub-task (e.g. "audit-auth") |
| `--instructions` | string | Yes | - | specific goal for the worker |
| `--context-files` | string[] | No | - | Additional files to copy to swarm dir |

## Outputs

1. `./.swarm/<task_name>/MISSION.md`: The prompt for the worker agent.
2. `./.swarm/<task_name>/`: An isolated workspace ready for the agent.

## Implementation

See `spawn_agent.ps1`.

Overview

This skill prepares isolated sub-workspaces so parallel "Worker" agents can execute tasks safely and deterministically. It creates a ready-made swarm directory with mission instructions and context files so each worker can start immediately. It is designed for PowerShell-based agent workflows and emphasizes safety gates and impasse detection.

How this skill works

The spawner makes a new subdirectory (./.swarm/<task_name>) and copies specified context files and workspace metadata into it. It generates a MISSION.md that contains the worker-specific instructions, success criteria, and guardrails. The resulting workspace is isolated so the worker runs with deterministic inputs and the orchestrator can monitor outcomes and handle failures.

When to use it

  • Splitting a large project into parallel subtasks for faster completion
  • Delegating time-boxed audits, tests, or reviews to independent agents
  • Running adversarial or sandboxed experiments that must not affect the main workspace
  • Creating repeatable worker environments for CI or batch processing
  • Isolating risky operations behind safety gates before merging results

Best practices

  • Provide concise, measurable instructions and explicit success criteria in --instructions
  • Include only necessary context files to keep worker workspaces minimal
  • Use descriptive, unique task names to avoid directory collisions
  • Attach stop conditions and post-action checks in MISSION.md to prevent loops
  • Monitor worker outputs and run failure postmortems for any impasses

Example use cases

  • Spawn an agent to perform an auth audit on a specific module with a focused MISSION.md
  • Create multiple workers to parallelize test-case generation and validation
  • Delegate a security fuzzing task in an isolated swarm directory to limit side effects
  • Run independent code refactors per component and collect results centrally
  • Launch adversarial reviewers to probe a change set without exposing the main workspace

FAQ

What files are included in the swarm workspace?

By default it copies workspace metadata and any files you list via --context-files; the spawner also creates MISSION.md and a workspace profile for the worker.

How do I prevent workers from interfering with each other?

Each worker gets its own ./ .swarm/<task_name> directory and a minimal context copy. Use unique task names and limit shared resources to avoid collisions.