fork-terminal-skill
Fork a terminal session to a new terminal window. Use this when the user requests 'fork terminal' or 'create a new terminal' or 'new terminal: <command>'.
When & Why to Use This Skill
The Fork Terminal Skill is a high-performance productivity utility designed to streamline developer workflows by enabling the creation of new terminal sessions directly from an AI conversation. It allows for the seamless execution of raw CLI commands or the launching of specialized agentic coding tools like Claude Code, Gemini CLI, and Codex CLI in independent windows. By supporting parallel task execution and context-aware session forking, this skill significantly reduces context switching and enhances multi-tasking efficiency in complex software engineering environments.
Use Cases
- Parallel Background Processing: Launch long-running operations such as 'ffmpeg' media encoding, 'curl' data transfers, or 'npm' builds in a new terminal window without interrupting your current session.
- Multi-Agent Orchestration: Initialize a dedicated Claude Code or Gemini CLI agent in a separate window to handle specific sub-tasks or bug fixes while maintaining the primary conversation flow.
- Context-Aware Problem Solving: Fork a terminal that automatically summarizes and carries over the current conversation history to a new agent, ensuring the new session has full context of the project's state.
- Isolated Environment Testing: Quickly spin up a new terminal to run experimental Python scripts or CLI-based diagnostic tools in a clean environment to avoid workspace clutter.
- Workflow Automation: Use natural language to trigger complex terminal setups, such as 'new terminal: docker-compose up', allowing for hands-free environment management.
| name | Fork Terminal Skill |
|---|---|
| description | Fork a terminal session to a new terminal window. Use this when the user requests 'fork terminal' or 'create a new terminal' or 'new terminal: <command>'. |
Purpose
Fork a terminal session to a new terminal window Using one agentic coding tool or raw cli commands.
Follow the Instructions, execute the Workflow, and refer to the Cookbook for decision-making.
Variables
ENABLED_RAW_CLI_COMMANDS: true ENABLED_GEMINI_CLI: true ENABLED_CODEX_CLI: true ENABLED_CLAUDE_CODE_CLI: true AGENTIC_CODING_TOOLS: claude-code, gemini-cli, codex-cli
Instructions
- Based on the user's request, follow the
Cookbookto determine which tool to use.
Fork Summary User Prompts
- IF: the user requests a fork terminal with a summary. This ONLY works for our agentic coding tools
AGENTIC_CODING_TOOLS. The tool must be enabled as well. - THEN:
- Read, and REPLACE the
.claude/skills/fork-terminal/prompts/fork_summary_user_prompt.mdwith the history of the conversation between you and the user so far. - Include the
Next User Requestsection. - This will be what you pass into the prompt parameter for the agentic coding tool.
- IMPORTANT: To be clear, don't update the file directly, just use it as your prompt when creating the agent.
- Read, and REPLACE the
- EXAMPLES:
- "Fork terminal use claude code to summarizing our conversation so far"
- "Spin up a new terminal to with gemini cli agent summarizing our conversation so far"
- "Create a new terminal to with codex cli agent with summary"
Workflow
- Understand the user's request.
- READ:
.claude/skills/fork-terminal/tools/fork_terminal.pyto understand our tooling. - Follow the
Cookbookto determine which tool to use. - Execute using:
uv run .claude/skills/fork-terminal/tools/fork_terminal.py '<command>'- Always use
uv run, neverpython3directly (requires Python 3.10+ for type union syntax)
- Always use
Cookbook
If the request is for an agent you should follow the agent specific instructions even if we are requesting the agent to do a simple CLI command. For example, if the user requests "Create a new terminal to download a file with curl using claude code" you should follow the Claude Code Agent instructions.
Raw CLI Commands
- IF: the user requests a non-agentic coding tool AND
ENABLED_RAW_CLI_COMMANDSis true. - THEN: Read and execute:
.claude/skills/fork-terminal/cookbook/cli-command.md - EXAMPLES:
- "Create a new terminal to with ffmpeg"
- "Create a new terminal to with curl"
- "Create a new terminal to with python"
Claude Code Agent
- IF: the user requests a claude code agent AND
ENABLED_CLAUDE_CODE_CLIis true. - THEN: Read and execute:
.claude/skills/fork-terminal/cookbook/claude-code.md - EXAMPLES:
- "Fork terminal to with claude code"
- "Create a new terminal to using claude"
- "Spin up a new terminal to with claude agent"
Gemini CLI Agent
- IF: the user requests a gemini cli agent AND
ENABLED_GEMINI_CLIis true. - THEN: Read and execute:
.claude/skills/fork-terminal/cookbook/gemini-cli.md - EXAMPLES:
- "Fork terminal to with gemini cli"
- "Create a new terminal to using gemini cli"
- "Spin up a new terminal to with gemini cli agent"
Codex CLI Agent
- IF: the user requests a codex cli agent AND
ENABLED_CODEX_CLIis true. - THEN: Read and execute:
.claude/skills/fork-terminal/cookbook/codex-cli.md - EXAMPLES:
- "Fork terminal to with codex cli"
- "Create a new terminal to using codex cli"
- "Spin up a new terminal to with codex cli agent"