project-spawn
Project Spawn
Overview
Transfer context from the current conversation to a new session in a different project directory. This enables seamless context handoff when pivoting from a general session to focused project work.
Platform Support
- Claude Code:
claudeCLI - Codex:
codexCLI
The handoff workflow is identical on both platforms.
Workflow
Step 1: Resolve Target Project
Determine the target project directory:
- If explicit path/name provided: Use directly
- If project name provided: Search for matching directories in common locations (
~/repos/,~/projects/, etc.) - If no target specified: Detect from recent conversation context or ask the user
Step 1b: Handle Non-Existent Directory
If target directory doesn't exist, ask user:
"Directory
<path>doesn't exist. Want me to create it?"
- Create folder only
- Create folder + init git repo
- Create folder + init git + create GitHub repo (public)
- Create folder + init git + create GitHub repo (private)
- Cancel
Create as requested before proceeding to Step 2.
Step 2: Extract Relevant Context
Analyze the last 5-10 messages for content relevant to the target project:
- Tasks or work items discussed
- Specific files, scripts, or features mentioned
- Decisions made or questions raised
- Any errors or issues identified
- Uncommitted changes noted
Focus only on information relevant to the target project, not the entire conversation.
Step 3: Create Handoff Document
Write PROJECT_HANDOFF.md to the target project directory:
# Project Handoff - [DATE] [TIME]
## Context
[Why this handoff is happening - what triggered the pivot]
## Discussion Summary
[Relevant context extracted from conversation]
## Specific Tasks/Questions
- [Actionable items identified]
## Files/Areas Mentioned
- [Specific files or code areas referenced]
## Suggested Starting Point
[What to do first in this session]
Step 4: Launch Session
~/.claude/skills/project-spawn/scripts/spawn_session.sh "<project-path>" "<session-name>" [--agent claude|codex]
Options:
| Flag | Description |
|---|---|
--agent claude|codex |
Which AI agent to launch (default: auto-detect from environment) |
The script will:
- Create a new tmux session named after the project
- Change to the project directory
- Start the AI agent with initial prompt to read the handoff
Platform-specific launch commands:
- Claude Code:
claude - Codex:
codex
Step 5: Confirm to User
Report:
Spawned: <session-name>
Directory: <project-path>
Handoff: PROJECT_HANDOFF.md created
To attach: tmux attach -t <session-name>
Quick Reference
Invocation: /spawn <project-name-or-path> or /spawn (auto-detect)
Session naming: Uses repo folder name (e.g., my-project)
Handoff location: <project-dir>/PROJECT_HANDOFF.md
Examples:
# Spawn with auto-detected agent
/spawn my-project
# Use Codex instead of Claude
/spawn my-project --agent codex
Setup
chmod +x ~/.claude/skills/project-spawn/scripts/*.sh
Resources
scripts/
spawn_session.sh- Creates tmux session and launches AI agent with handoff context
More from buddyh/claude-code-skills
alexa-cli
Control Amazon Echo/Alexa devices via the `alexacli` CLI. Use when the user asks to speak/announce on Echo devices, send voice commands to Alexa, control smart home devices, list Alexa devices, or trigger routines.
10agent-comms
Send messages to other Claude Code or Codex sessions via tmux. Hand off complex debugging context, get second opinions, share detailed technical findings across sessions.
7todoist-cli
Manage Todoist tasks via the `todoist` CLI. Use when the user asks to add tasks, complete tasks, list today's tasks, search tasks, manage projects/labels/sections, or interact with Todoist in any way.
6transcribe-and-analyze
Transcribe audio and video from URLs (YouTube, direct media links) using WhisperKit locally. Optionally analyze transcripts with AI when explicitly requested. Use when users provide URLs to media content and request transcription or speech-to-text conversion.
2app-screenshots
>
1deep-dive
Deep dive on any topic. Decomposes into subtopics, researches each in parallel with thorough source gathering, then synthesizes into a comprehensive report (4,000-10,000+ words, 40-100+ sources). Scales depth dynamically based on topic complexity. Use when asked for a deep dive, deep research, comprehensive analysis, or thorough investigation of a topic.
1