Spawn Agent logo

Spawn Agent

Community
khanhbkqt
spawn-agent

Spawn worker agents (Gemini CLI or Codex CLI) to keep main context clean. Use for implementation, codebase research, context gathering, or any scoped work that would pollute the orchestrator's context.

Overview

Publisherkhanhbkqt
Repositoryspawn-agent
Skill namespawn-agent
Stars
44
Forks
6
Bundled files
7
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by khanhbkqt on GitHub. Read the source before you install it.

Installation

Install the Spawn Agent AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/khanhbkqt/spawn-agent/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/khanhbkqt/spawn-agent.git \
  .claude/skills/spawn-agent
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Spawn Agent in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Spawn Agent on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Spawn Agent is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Spawn Agent

Orchestration & Delegation pattern: The main agent acts as the orchestrator (plan, delegate, review). Worker agents (Gemini/Codex) execute specific tasks and report results.

When to Use

Use when:

  • Implementation task has a clear scope (fix bug, add function, refactor file)
  • You need to research/query the codebase without polluting the main context
  • The task is independent and doesn't need intermediate human review
  • You want to keep the main context clean for high-level reasoning

Do NOT use when:

  • Task requires interactive discussion with the user
  • Scope is too broad (refactoring an entire module)
  • Multiple files with complex inter-dependencies need coordination
  • Task needs browser interaction or external API calls

Choosing an Agent

AgentCLIStrengthsBest for
GeminigeminiFast, good at codebase understanding, reads project contextResearch, context gathering, quick implementations
Codexcodex execStrong reasoning, sandboxed execution, code review capabilityComplex implementation, refactoring, bug fixing

[!TIP] Choose the agent based on the task — don't stick to one CLI. Each has its own strengths.

Delegation Protocol

Step 1: DEFINE — Clearly define the task

Before spawning, the orchestrator must determine:

  • Goal: What should the task achieve?
  • Scope: Which files/directories are involved?
  • Agent: Is Gemini or Codex more suitable?
  • Constraints: What must NOT be modified?
  • Expected output: What result is expected (code changes, summary, list)?

Step 2: COMPOSE — Write the prompt file using a template

Choose the appropriate template and fill it in. Save to .agent/spawn_agent_tasks/<name>.md.

[!NOTE] Create the directory if it doesn't exist: mkdir -p .agent/spawn_agent_tasks Add .agent/spawn_agent_tasks/ to .gitignore if you don't want to track task files.

Template Selection Guide
Task typeTemplateKey sections
Complex implementationtemplates/implementation-task.mdArchitecture context, File Map, Step-by-step, Conventions, Acceptance criteria
Codebase researchtemplates/research-task.mdWhere to look, Questions to answer, Output format
Bug fixtemplates/bugfix-task.mdBug description, Suspected location, Fix approach

[!IMPORTANT] Headless worker = no Q&A. The worker agent cannot ask clarifying questions. The more detailed the template, the more accurate the output. Each missing section = one point where the agent may go wrong.

Quick inline prompt (for simple tasks)
markdown
# Task: <short name>
## Goal: <one sentence describing the objective>
## Files: <files to modify>
## Constraints: DO NOT modify files outside <scope>
## When done: Summarize changes made and any issues found.

Step 3: SPAWN — Call the worker agent

bash
# Gemini — implementation task
spawn-agent.sh --gemini --auto-edit --timeout 300 \
  -f .agent/spawn_agent_tasks/<name>.md

# Codex — implementation task
spawn-agent.sh --codex --auto-edit --timeout 300 \
  -f .agent/spawn_agent_tasks/<name>.md

# Gemini — research (yolo is fine for read-only research)
spawn-agent.sh --gemini --yolo --timeout 120 \
  -f .agent/spawn_agent_tasks/<name>.md

# Quick task — any agent
spawn-agent.sh --codex --yolo --timeout 60 \
  -p "Fix typo 'recieve' -> 'receive' in auth.service.ts"

Approval modes (mapped per agent):

ModeFlagGeminiCodex
Auto-edit--auto-editauto_editauto-edit
Full auto--yoloyolofull-auto
Safest--safedefaultsuggest

Step 4: REVIEW — Read the output

Output is saved to .agent/spawn_agent_tasks/output-<timestamp>.log.

bash
cat .agent/spawn_agent_tasks/output-*.log | tail -100

Verify:

  • Did the task achieve the goal?
  • Are there changes outside the defined scope?
  • Are there errors/warnings that need handling?

Step 5: REPORT — Summarize for the user

  • ✅ Success: summarize changes
  • ❌ Failure: root cause + next steps
  • ⚠️ Partial: what was completed, what still needs to be done

Anti-Patterns

❌ Delegating too broadly: "Refactor the entire backend" ✅ Specific scope: "Refactor auth.service.ts to extract token logic into token.service.ts"

❌ No constraints: Agent may modify files outside scope ✅ Set boundaries: "DO NOT modify files outside packages/backend/src/auth/"

❌ Not reading output: Spawning and assuming success ✅ Always review: Read output, verify changes, check errors

❌ Delegation chain: Spawn A → output feeds spawn B → ... ✅ Orchestrator controls flow: Read result A, decide next step, then spawn B if needed

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Spawn Agent AI skill do?

Spawn worker agents (Gemini CLI or Codex CLI) to keep main context clean. Use for implementation, codebase research, context gathering, or any scoped work that would pollute the orchestrator's context.

Why use Spawn Agent on TypingMind?

Because you install it once and use it with any model. Spawn Agent is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Spawn Agent in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/khanhbkqt/spawn-agent/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Spawn Agent?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Spawn Agent?

As many as you like. As long as a model supports skills, you can use Spawn Agent with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Spawn Agent AI skill free?

Yes. It is published on GitHub by khanhbkqt under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇