一键导入
fork-terminal
Fork terminal sessions to spawn parallel AI agents or CLI commands in new terminal windows. Supports git worktrees for isolated parallel development.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Fork terminal sessions to spawn parallel AI agents or CLI commands in new terminal windows. Supports git worktrees for isolated parallel development.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Local code review using CodeRabbit CLI. Use when user wants to review changes before committing or pushing.
UI/UX design intelligence. 57 styles, 96 palettes, 50 font pairings, 25 charts, 11 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Search and apply design best practices.
Use when the user asks for a "second opinion", "third opinion", "what does GLM/Gemini think", or wants another model to weigh in on code, design, or review. Routes to the consult plugin's CLI which calls z.ai (GLM-5.2) or Gemini directly via API.
Automatically assist with Bambu Lab X1Plus 3D printer operations via the bambu CLI. Covers status checks, file transfer, print control, calibration, filament management, camera analysis, diagnostics, and SSH commands.
Auto-triggered skill for managing UniFi network devices, clients, sites, and diagnostics via the unifi CLI.
Triggers when user mentions Cloudflare, DNS records, tunnels, R2, Workers, zero-trust, etc. Provides knowledge of the cf CLI.
| name | fork-terminal |
| description | Fork terminal sessions to spawn parallel AI agents or CLI commands in new terminal windows. Supports git worktrees for isolated parallel development. |
| triggers | ["fork terminal","fork a terminal","spawn a new terminal","open new terminal","fork terminal use claude","fork terminal use codex","fork terminal use gemini","fork terminal run","run in new terminal","parallel agent","spawn agent","new terminal window","fork terminal in worktree","spawn worktree","parallel worktree","worktree spawn","fork in worktree","work in parallel on","spawn worker in worktree","spawn workers","tournament mode","tournament to","tournament with","compete claude vs gemini","compete claude vs codex","race to solve","have claude gemini codex compete","spawn tournament","visual tournament","visual mode tournament","watch all clis","split pane tournament","tmux visual","show all clis running"] |
This skill enables forking terminal sessions to new windows using various AI coding tools or raw CLI commands.
| Tool | Trigger Pattern | Default Model |
|---|---|---|
| Claude Code | "fork terminal use claude code..." | opus (bare alias, auto-tracks latest) |
| Codex CLI | "fork terminal use codex..." | gpt-5.2-codex |
| Gemini CLI | "fork terminal use gemini..." | gemini-2.5-pro |
| Raw CLI | "fork terminal run..." | N/A |
fork_terminal(command) using the Python toolMatch the user's language against these patterns:
cookbook/claude-code.mdcookbook/codex-cli.mdcookbook/gemini-cli.mdcookbook/cli-command.mdprompts/fork_summary_user_prompt.mdpython3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/fork_terminal.py "<full_command>"<command> --help first to understand options (if needed)python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/fork_terminal.py "<command>"Default (interactive) — no bypass flags:
# Fork with Claude Code (interactive, user reviews each action)
python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/fork_terminal.py "claude --model opus"
# Fork with Codex CLI (interactive)
python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/fork_terminal.py "codex exec -m gpt-5.2-codex"
# Fork with Gemini CLI (interactive REPL)
python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/fork_terminal.py "gemini --model gemini-2.5-pro"
# Fork with raw CLI
python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/fork_terminal.py "npm run dev"
Security Warning (opt-in only): The
--dangerously-*flags and-y -p(yolo headless) mode bypass safety prompts. Only add them when you explicitly need autonomous/unattended execution in a trusted environment.
Note: The
coordination.pylock file path usesfcntl(Unix-only) and the terminal-window path uses AppleScript. These features do not work on Windows.
Worktree mode creates git-isolated workspaces for parallel development. Each worker gets its own branch and worktree directory.
Use worktree mode when:
AskUserQuestion tool:
cookbook/worktree.mdpython3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/spawn_session.py \
--task "<task description>" \
[--branch "<branch-name>"] \
[--base "<base-branch>"] \
[--count <1-4>] \
[--model <opus|haiku>] \
[--mode <interactive|autonomous>] \
[--terminal <auto|tmux|window>]
# Single worker
python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/spawn_session.py \
--task "implement user authentication"
# Multiple workers
python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/spawn_session.py \
--task "write API tests" \
--count 3
# From specific base branch
python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/spawn_session.py \
--task "fix bug in login" \
--base develop \
--branch "fix/login-bug"
Worktree mode automatically detects the terminal environment:
After spawning worktree workers:
/fork-terminal:list - Show active worktrees and workers/fork-terminal:remove --path <path> - Clean up a worktreeTournament mode spawns multiple AI CLIs (Claude, Gemini, Codex) to compete on the same task in separate worktrees. After all workers complete, the main session reviews solutions and creates a combined branch with the best parts.
Use tournament mode when:
AskUserQuestion:{
"questions": [{
"question": "Where should the tournament workers run?",
"header": "Terminal",
"options": [
{"label": "tmux (Recommended)", "description": "Background sessions - more reliable, no visible windows"},
{"label": "Warp/Terminal", "description": "Visible windows - watch workers in real-time"}
],
"multiSelect": false
}]
}
cookbook/tournament.mdpython3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/tournament.py spawn \
--task "<task description>" \
[--clis claude,gemini,codex] \
[--base <base-branch>] \
--terminal <tmux|window>
/fork-terminal:status/fork-terminal:review| Command | Description |
|---|---|
/fork-terminal:status | Check tournament progress |
/fork-terminal:review | Review completed solutions |
/fork-terminal:list | List all worktrees |
/fork-terminal:remove | Clean up worktrees |
# Spawn tournament
python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/tournament.py spawn \
--task "implement user authentication" \
--clis claude,gemini,codex
# Check status
python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/tournament.py status \
--tournament "<tournament-id>"
# Generate review report
python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/tournament_review.py report \
--tournament "<tournament-id>"
# Create combined branch
python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/tournament_review.py combine \
--tournament "<tournament-id>"
Visual tournament mode runs multiple AI CLIs side-by-side in tmux split panes so you can watch them all simultaneously. Unlike regular tournament mode (which uses separate worktrees), visual mode runs all CLIs in the current project.
Use visual mode when:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/visual_tournament.py \
--task "<task or prompt>" \
[--clis claude,gemini,codex]
~/.fork-terminal/visual/<id>/<cli>.txtCtrl+B then D to detach (CLIs continue running)tmux attach -t <session> to view again| Shortcut | Action |
|---|---|
Ctrl+B D | Detach (CLIs continue in background) |
Ctrl+B [ | Scroll mode (q to exit) |
Ctrl+B z | Zoom current pane (toggle) |
Ctrl+B o | Switch between panes |
# Run all CLIs to review code
python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/visual_tournament.py \
--task "Review this codebase for security issues"
# Run specific CLIs
python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/visual_tournament.py \
--task "Analyze the authentication flow" \
--clis claude,gemini
# Don't auto-attach (run in background)
python3 ${CLAUDE_PLUGIN_ROOT}/skills/fork-terminal/tools/visual_tournament.py \
--task "Review the API endpoints" \
--no-attach