subagent

Spawn, message, watch, and clean up isolated sub agents via tmux.

5|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/tiancaiamao/ai --skill subagent-tiancaiamao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: subagent
Source: https://github.com/tiancaiamao/ai/tree/main/skills/subagent
Command: npx skills add https://github.com/tiancaiamao/ai --skill subagent-tiancaiamao

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a safe, repeatable way to delegate work to isolated helper agents without mixing their context into the main conversation, making parallel work, validation, and long-running tasks easier to manage.

Core Features & Use Cases

  • Agent delegation: Launch dedicated sub agents for exploration, implementation, review, or verification.
  • Lifecycle control: Track each run from spawn to watch to cleanup so background processes do not linger.
  • Safe coordination: Use a strict run ID and tmux-based workflow to avoid collisions, orphaned sessions, and accidental cleanup of unrelated agents.
  • Use Case: Split a complex coding task into several independent subtasks, let each helper agent work in isolation, then merge the results after monitoring completion.

Quick Start

Use the subagent skill to start a dedicated helper agent, monitor its progress, and explicitly clean it up when the task is finished.

Frequently Asked Questions about subagent

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

FAQPage Schema
How do I run parallel agent tasks without mixing their context into the main conversation?

To run parallel agent tasks without context mixing, you can spawn isolated sub agents that maintain independent context. This skill delegates work to dedicated helper agents for exploration, implementation, review, or verification while keeping the main conversation clean.

How do I clean up orphaned background agent processes and avoid rate limits?

To clean up orphaned background agent processes and avoid rate limits, use explicit kill-based cleanup with strict run ID tracking. This ensures background processes do not linger after parallel execution, monitoring, or validation workflows complete.

Can I use tmux to manage background helper agents for long-running coding tasks?

Yes, you can use tmux to manage background helper agents for long-running coding tasks. This skill uses tmux-backed background serving to safely coordinate isolated sub agents, preventing session collisions and accidental cleanup of unrelated agents.

What is the best way to monitor multiple sub agents working in parallel?

The best way to monitor multiple sub agents working in parallel is through a watch-loop observation mechanism. This skill tracks each run from spawn to watch to cleanup, allowing you to monitor progress and merge results after completion.

How do I split a complex coding task into independent subtasks for parallel execution?

To split a complex coding task into independent subtasks for parallel execution, launch dedicated sub agents for each subtask. Each helper agent works in isolation with its own context, and you merge the results after monitoring completion.