fork-session

Spawn isolated Claude sessions in git worktrees via tmux panes.

Updated Oct 15, 2021
One-click install
npx skills add https://github.com/toqoz/config --skill fork-session
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fork-session
Source: https://github.com/toqoz/config/tree/main/home/agents/skills/fork-session
Command: npx skills add https://github.com/toqoz/config --skill fork-session

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the issue of context switching and task interruption by allowing you to offload side tasks into a completely separate, isolated execution environment without blocking your current workflow.

Core Features & Use Cases

  • Asynchronous Detours: Launch a fresh Claude session in a new git worktree to handle side concerns while the parent agent continues the main task.
  • Tmux Integration: Automatically splits your terminal into a new pane, pre-filling the environment with the necessary git worktree and agent launch commands.
  • Use Case: If you are in the middle of a complex refactor and realize you need to quickly investigate a separate bug, use this skill to spawn a new session to handle the bug fix independently.

Quick Start

Ask the agent to fork the current task into a separate session to handle the side concern regarding the new feature implementation.

Frequently Asked Questions about fork-session

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

FAQPage Schema
How do I branch a task into a separate session without interrupting my current workflow?

To branch a task asynchronously, this skill spawns an independent Claude session within an isolated git worktree, allowing the parent agent to continue the main task while the detour session handles the side concern independently.

What is the best way to run parallel development tasks using git worktrees?

The best way to run parallel development tasks using git worktrees is to automate tmux pane splitting and environment initialization. This creates isolated execution contexts across separate worktree directories, enabling stable parallel development without context switching.

Do I need tmux and the claude-code CLI to spawn a new session in a git worktree?

Yes, you need tmux and the claude-code CLI to spawn a new session in a git worktree. The skill manages side-detour workflows by automating tmux pane splitting and requires these dependencies to maintain stable execution contexts across separate directories.

How does asynchronous task branching work for side detours in software engineering?

Asynchronous task branching for side detours works by offloading side tasks into a completely separate execution environment. It automatically splits your terminal into a new pane, pre-filling the environment with the necessary git worktree and agent launch commands for independent execution.

Can I investigate a separate bug while in the middle of a complex refactor?

Yes, you can investigate a separate bug while in the middle of a complex refactor by forking the current task into a new session. This spawns a fresh session in a new git worktree to handle the bug fix independently without blocking the main refactor.

When should I avoid using git worktrees for asynchronous task branching?

You should avoid using git worktrees for asynchronous task branching if your environment lacks git, tmux, or the claude-code CLI, as these are required to maintain stable execution contexts across separate worktree directories and automate the pane splitting process.