cat:spawn-subagent

Launch a Claude Code subagent in an isolated git worktree.

101|2|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/cowwoc/cat --skill cat-spawn-subagent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cat:spawn-subagent
Source: https://github.com/cowwoc/cat/tree/main/plugin/skills/spawn-subagent
Command: npx skills add https://github.com/cowwoc/cat --skill cat-spawn-subagent

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Launch a Claude Code subagent in an isolated git worktree to execute a task without user supervision. This approach ensures deterministic execution, strict context isolation, and clear governance over how tasks are executed within a project.

Core Features & Use Cases

  • Isolated subagent execution: Launch a Claude Code subagent in a separate git worktree to complete a task without exposing its internal reasoning to the main agent.
  • Hook inheritance and policy enforcement: Subagents automatically inherit project hooks and must comply with mandatory rules defined in the prompt.
  • Deterministic governance: Fail-fast prompts, explicit file paths, and exact commit/STATE.md updates are carried out in the same commit.

Quick Start

Prepare PLAN.md describing the task, then spawn a subagent using the Task tool. The subagent will run in its own worktree and return a structured summary of results, including STATE.md updates in the same commit.

Frequently Asked Questions about cat:spawn-subagent

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

FAQPage Schema
How do I run an isolated Claude Code subagent in a git worktree?

To run an isolated Claude Code subagent in a git worktree, prepare a PLAN.md describing the task and spawn the subagent using the Task tool. The subagent executes in a separate worktree with lock-guarded governance and returns a structured summary.

How does subagent governance enforce deterministic git workflow execution?

Subagent governance enforces deterministic git workflow execution by using fail-fast prompts, explicit file paths, and requiring STATE.md updates within the same commit. Project hooks are inherited automatically to maintain mandatory policy compliance.

Can I use a git worktree to isolate agent context from the main project?

Yes, you can use a git worktree to isolate agent context from the main project. This skill launches a Claude Code subagent in a separate worktree, ensuring strict context isolation without exposing internal reasoning to the main agent.

What is the best way to automate unsupervised coding tasks with Claude?

The best way to automate unsupervised coding tasks with Claude is spawning a subagent in an isolated git worktree. This approach provides deterministic execution, lock-guarded state updates, and token tracking without requiring user supervision.

Do I need to commit STATE.md updates separately when using a subagent worktree?

No, you do not need to commit STATE.md updates separately. The subagent governance enforces exact commit and STATE.md updates within the same commit to ensure atomic state transitions and deterministic project tracking.