Send context to parent or child session before switching
Creates context handoff files for transitioning between parent and child sessions.
/plugin marketplace add cadrianmae/claude-marketplace/plugin install context-handoff@cadrianmae-claude-marketplace<direction> [subject] [path]Create a context handoff file for transitioning between parent and child sessions.
/context:send child [subject] [path]
/context:send parent [subject] [path]
Both subject and path are optional:
/tmp/claude-ctx/ if not provided/tmp/claude-ctx/ directory exists using test command# Claude Context Handoff Directory
This is an **ephemeral directory** for Claude Code session context handoff. Created by claude slash commands. '/context:send' and '/context:receive'.
{path}/ctx-{direction}-{subject}.md/tmp/claude-ctx/ but can be customizedcat > filename.md << 'EOF' to clear file and write contextFile naming pattern:
/context:send child → /tmp/claude-ctx/ctx-parent-to-child-{inferred-subject}.md/context:send parent → /tmp/claude-ctx/ctx-child-to-parent-{inferred-subject}.md/context:send child database-migration
✓ Context prepared for child session
File: /tmp/claude-ctx/ctx-parent-to-child-database-migration.md
Next steps:
1. Start child session for focused work
2. In new session, run: /context:receive parent
/context:send parent
✓ Context prepared for parent session
File: /tmp/claude-ctx/ctx-child-to-parent-api-implementation.md
Next steps:
1. Exit this session
2. Resume parent session
3. In parent session, run: /context:receive child
/context:send child feature-work ~/Documents/context/
✓ Context prepared for child session
File: ~/Documents/context/ctx-parent-to-child-feature-work.md
Next steps:
1. Start child session
2. In new session, run: /context:receive parent feature-work ~/Documents/context/
The context file should include:
Create directory if needed:
# Check if directory exists, create only if needed
[[ -d /tmp/claude-ctx ]] || {
mkdir -p /tmp/claude-ctx
cat > /tmp/claude-ctx/README.md << 'EOF'
# Claude Context Handoff Directory
This is an **ephemeral directory** for Claude Code session context handoff. Created by claude slash commands. '/context:send' and '/context:receive'.
EOF
}
Write context file:
Use heredoc to write context file:
cat > /tmp/claude-ctx/ctx-parent-to-child-{subject}.md << 'EOF'
# Context: Parent → Child
[Context content here]
EOF
This pattern clears the file first, preventing accumulation of old context.
/context:receive - Receive context from parent/child session