AI & agents · Automation
agent-spawn
/agent-spawn
Use when launching parallel tmux agents with optional isolated Git worktrees under Oh My Harness.
For whom
- Author
- hoya324 ↗
- Repository
- oh-my-harness ↗
- Licence
- MIT
- Last repository change
- 28.07.2026
Assessment and security
100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
Deprecation
No signals detected. Repository changed on 28.07.2026, without references to retired models or APIs.
Licence
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when launching parallel tmux agents with optional isolated Git worktrees under Oh My Harness.
Original author description
Use when launching parallel tmux agents with optional isolated Git worktrees under Oh My Harness.
How it works
- Resolve inputs
- Confirmation gate
- Isolate and write tasks
- Launch
Original SKILL.md headings · 101 lines, 621 words
SKILL.md preview
---
name: agent-spawn
description: Use when launching parallel tmux agents with optional isolated Git worktrees under Oh My Harness.
---
# Spawn tmux agents
Launch external CLI agents only after validating and confirming the complete plan. This workflow
does not use Codex native collaboration; use `/team-spawn` for that.
## Resolve inputs
Parse a positive integer count (default 2) and a concrete task. Ask necessary scope questions
directly in chat before decomposition. Read `.claude/.omh/harness.config.json`:
- `multiAgent.maxAgents`: reject or explicitly cap a larger request.
- `multiAgent.useWorktree`: default true.
- `multiAgent.tmuxSession`: default `omh-agents`; require `^[a-zA-Z0-9_-]+$`.
- `multiAgent.runtime`: accept only `claude` or `codex`; default `codex` in Codex setup.
Reject an invalid count or empty assignment. Read `.claude/.omh/agents.json`; if it records live or
unapplied agents, stop and ask the user to keep, apply, or explicitly clean them up.
Check `tmux`, the selected runtime executable, and Git when worktrees are enabled. Check the base
branch, existing branches, worktree paths, tmux session, and dirty working tree without changing
them. Do not reuse conflicting names.
## Confirmation gate
Show every assignment, selected runtime, exact count, tmux session, base branch, worktree/branch
paths, shared-directory collision risk, launch command, and cleanup/merge boundaries. For the
`claude` runtime, disclose `--permission-mode bypassPermissions` as permission bypass. Obtain
explicit confirmation before creating worktrees, writing task files, starting tmux, or bypassing
permissions. Cancel without side effects on any answer other than a clear approval.
## Isolate and write tasks
With worktrees enabled, create:
```text
.claude/.omh/worktrees/agent-1 branch omh/agent-1
.claude/.omh/worktrees/agent-2 branch omh/agent-2
```
Create each worktree from the recorded base branch. More than one agent with
`useWorktree: false` must be rejected because every launch would share the checkout and root
`TASK.md`. Permit a single shared checkout agent only for an explicitly non-conflicting assignment.
Preflight `TASK.md` in every target workdir before writing. Prefer abort on any collision. Treat a
tracked or user-owned `TASK.md` as protected: show its exact path, ownership/tracked status, and
content hash as an exact collision disclosure. Never overwrite it without explicit overwrite and
restoration authorization for that exact file.
If overwrite and restoration are authorized, preserve the original content byte-for-byte in a
private recorded backup, store its path and hash in `agents.json`, and restore the original content
before apply or cleanup. Verify the restored hash and retain the backup/state on any mismatch.
Never place task text in a tracked backup or commit it.
Write the complete task text to `{worktree}/TASK.md` with a file-writing operation. Never interpolate
task text, newlines, quotes, substitutions, backticks, or shell metacharacters into a command. The
fixed prompt may name `TASK.md`; the task itself must appear only in `TASK.md`. Do not use shell
redirection, heredocs, or command substitution to create it.
## Launch
Create a detached tmux session, add one pane per agent in its working directory, and tile the panes.
Use one of these fixed commands:
```bash
codex exec --sandbox workspace-write --cd "<worktree>" "Read TASK.md and complete its instructions."
claude --permission-mode bypassPermissions -p "Read TASK.md and complete its instructions."
```
Send only the selected fixed command to each pane. Quote the validated worktree path as data and
never append task text. Opening a terminal application is a separate external action; ask before
doing it, otherwise print `tmux attach -t "<session>"`.
After confirmation, initialize `.claude/.omh/agents.json` before any worktree, tmux session, or
launch with each target in `status: "planned"`. After each successful resource creation and launch,
atomically persist its worktree, branch, pane, and status before proceeding to the next agent:
```json
{
"session": "omh-agents",
"spawned_at": "ISO timestamp",
"task": "summary",
"runtime": "codex",
"baseBranch": "main",
"useWorktree": true,
"agents": [
{
"id": 1,
"status": "running",
"branch": "omh/agent-1",
"worktree": ".claude/.omh/worktrees/agent-1"
}
]
}
```
If launch partially fails, atomically mark the failed target and retain every successfully persisted
resource so `/agent-status`, `/agent-apply`, and `/agent-stop` can recover it. Report created
resources and request explicit cleanup instructions; never silently destroy them. Never merge
automatically. Report `/agent-status`, `/agent-apply`, and `/agent-stop` as next actions.
Versions
The database has no other skills named agent-spawn.
Database snapshot: 13.11.2026 · package version f79e468c87be (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100workmux
Manage terminal agents, git worktrees, and tmux sessions with workmux. Use when the user asks to open or start an agent in a project, check running agents or their progress in a tmux session, or work with workmux, worktrees, or parallel agent workflows. - 95clawteam
Multi-agent swarm coordination via the ClawTeam CLI. Use when the user wants to create agent teams, spawn multiple agents to work in parallel, coordinate tasks with dependencies, broadcast messages between agents, monitor progress via kanban board, or launch pre-built team… - 100spawn
Launch N parallel subagents in isolated git worktrees to compete on the session task. Use when the user runs /hub:spawn or asks to start the competing agents for an initialized AgentHub session. - 100spawn
Launch N parallel subagents in isolated git worktrees to compete on the session task. Use when the user runs /hub:spawn or asks to start the competing agents for an initialized AgentHub session. - 100using-git-worktrees
Git worktree management with tmux integration and task dispatch. Use when creating isolated dev environments, launching parallel feature work, running multiple Claude instances, managing worktrees, dispatching tasks to worktree terminals, or cleaning up after merge. Covers… - 100tmux-agent-comms
Manage AI agents in tmux: spawn sessions, send messages, wait, capture replies, inspect fleets, and tear down safely. Use for tmux-hosted CLI agents. Don't use for SSH, GNU screen, or GUI apps.