spawn-agent

Delegate scoped implementation, research and bug-fix tasks to Gemini or Codex worker agents via DEFINECOMPOSESPAWNREVIEWREPORT protocol scripts/templates/spawn-agent.sh with adjustable timeout, agent type, and approval modes.

44|7|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/khanhbkqt/spawn-agent --skill spawn-agent-khanhbkqt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spawn-agent
Source: https://github.com/khanhbkqt/spawn-agent/tree/main
Command: npx skills add https://github.com/khanhbkqt/spawn-agent --skill spawn-agent-khanhbkqt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gemini, codex, and includes scripts (resource) components.

What problem does it solve?

The spawn-agent skill lets a master agent delegate implementation, research, and bug-fix work to specialized worker agents (Gemini or Codex) so the main context remains focused on high-level reasoning.

Core Features & Use Cases

  • Orchestrates DEFINE, COMPOSE, SPAWN, REVIEW, and REPORT steps to tackle scoped tasks.
  • Reads templates for complex tasks (implementation, research, bugfix) and executes them via headless agents.
  • Supports multiple workers (Gemini or Codex) with configurable approval modes and timeouts for robust automation.

Quick Start

Run the spawn-agent.sh script with your preferred agent and a prompt to begin delegation.

Frequently Asked Questions about spawn-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I delegate coding tasks to worker agents without polluting the main context?

Agent delegation solves context pollution by spawning scoped worker agents like Gemini or Codex. The orchestrator delegates implementation, research, and bug fixes to isolated sessions while keeping the main context focused on high-level reasoning.

What is the workflow protocol for orchestrating tasks with spawn-agent?

The orchestration workflow enforces a five-step protocol: DEFINE, COMPOSE, SPAWN, REVIEW, and REPORT. This structured process ensures scoped tasks are correctly formulated, delegated to headless workers, and verified before reporting results back to the orchestrator.

Can I use Codex and Gemini as worker agents for codebase experiments?

Yes, you can use both Codex and Gemini as worker agents for codebase experiments. The script supports configurable agent types, allowing you to select either model for implementation and verification tasks across isolated sessions.

How do I start delegating work using the spawn-agent script?

To start delegating work, run the spawn-agent.sh script with your preferred agent type and a prompt. You can configure timeouts and approval modes to automate the execution of implementation, research, or bugfix templates.

Does spawn-agent support templates for complex bug fixes and research?

Yes, spawn-agent supports templates for complex bug fixes and research. It reads predefined templates from the templates directory and executes them via headless agents to ensure structured and robust task automation.

What are the limitations of using agent delegation for context management?

Agent delegation requires managing configurable timeouts and approval modes for headless workers. If a worker agent exceeds the timeout or fails the REVIEW step, the orchestrator must handle the incomplete task without polluting the main context.