← Back to Skills Marketplace
edwardwason

Session Branch

by AI花生 · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ⚠ suspicious
40
Downloads
1
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install session-branch
Description
Branch a coding session into a new conversation with full context handoff — generate structured handoff doc, startup prompts, and guide the new session to pi...
README (SKILL.md)

Session Branch

Branch your current coding session into a new conversation without losing context.

When to Use

  • Current conversation is getting long and context compression is degrading quality
  • You want to start a new task on the same project but keep full context
  • You need to fork your work into a parallel direction
  • User says: "开个支线" / "分叉" / "branch" / "新任务但保留上下文"

Execution Flow

Step 1: Analyze Current Session

Scan the current conversation and project to extract:

  1. Project identity — name, description, platforms, version, tech stack
  2. Decision chain — what was chosen, what was rejected, and why
  3. Data flow — how data moves through the system (input → process → output)
  4. Capability boundary — what the project CAN do and CANNOT do
  5. Code changes — what files were modified in this session and why
  6. Platform status — GitHub, ClawHub, npm, PyPI current state
  7. Environment — which env vars are set, which need user config
  8. Knowledge files — index of docs/knowledge/ and docs/rules/ by scenario
  9. User preferences — language, work style, code style, security sensitivity
  10. Branchable directions — what can be built next, with files involved and prerequisites

IDE-Specific Additional Scanning

For WorkBuddy, also scan:

  • Identity files: ~/.workbuddy/SOUL.md, IDENTITY.md, USER.md — persona and preferences
  • Memory files: .workbuddy/memory/MEMORY.md + daily logs — project memory
  • Installed skills: ~/.workbuddy/skills/ — list of active skills
  • Scheduled tasks: automation/cron task list and status
  • Channel config: IMA knowledge base IDs, Feishu channel configuration
  • MCP connectors: active MCP connector status

For TRAE SOLO, also scan:

  • Rules: .trae/rules/ — project-level rules
  • Schedule: TRAE SOLO Schedule task list

For Cursor, also scan:

  • Rules: .cursor/rules/ or .cursorrules

For Claude Code, also scan:

  • Rules: CLAUDE.md in project root

Step 2: Generate Handoff Document

Use the template at references/handoff-template.md to create a structured handoff document.

Save location by IDE:

IDE Default path Rationale
WorkBuddy .workbuddy/session-handoff.md Align with memory system, keep project root clean
TRAE SOLO docs/session-handoff.md Standard docs location
Cursor docs/session-handoff.md Standard docs location
Claude Code docs/session-handoff.md Standard docs location

Critical rules:

  • NO personal information (real names, emails, specific paths, token values)
  • NO project-specific secrets or credentials
  • Use generic placeholders: \x3Cproject-name>, \x3Cowner>, \x3Cyour-path>
  • The handoff doc must be reusable as a TEMPLATE, not a one-time snapshot

Step 3: Validate with Checklist

Cross-check the generated handoff against references/checklist.md.

Every item must be covered. If something is not applicable, write "N/A" with a reason.

Step 4: Generate Startup Prompt

Use references/startup-prompts.md to generate the startup prompt for the new conversation.

The prompt must include:

  1. Exact file paths for the new AI to read (absolute or relative per IDE)
  2. A three-step flow: Load → Report → Ask
  3. Clear role: "This is a continuation of an existing project, not starting from scratch"

Step 5: Present to User

Show the user:

  1. The generated handoff document (key sections summary)
  2. The startup prompt (ready to copy-paste)
  3. List of files created and their locations
  4. Ask: "Ready to open a new conversation?"

Configuration

Setting Default Description
handoff_path Auto (by IDE) Where to save the handoff document
include_checklist true Whether to validate against checklist
target_ide auto Target IDE for startup prompt (auto/trae/workbuddy/cursor/claude-code)

References

  • references/handoff-template.md — Full template for the handoff document
  • references/checklist.md — Validation checklist (12 categories + IDE-specific)
  • references/startup-prompts.md — IDE-specific startup prompt templates
Usage Guidance
Install only if you are comfortable with the agent reading broad project and IDE context. Before using it, ask the agent to limit scanning to project-local files unless you explicitly approve WorkBuddy identity, memory, scheduled-task, channel, connector, and environment-variable review. Review the generated handoff file before committing or sharing it, and prefer repo-relative paths and placeholders for personal or secret values.
Capability Assessment
Purpose & Capability
The core session-handoff purpose is coherent, and generating a handoff document plus startup prompt fits that purpose. However, the WorkBuddy-specific instructions expand into identity files, user profile, memory, installed skills, scheduled tasks, channel configuration, and MCP connector status, which is broader and more sensitive than a typical project handoff.
Instruction Scope
The skill tells the agent to scan broad project, environment, platform, preference, and IDE state, including global/home-directory WorkBuddy files. It includes privacy-filter rules, but it does not require a clear consent checkpoint before reading non-project-local personal or integration metadata.
Install Mechanism
The package consists of markdown skill and reference files with no executable scripts or dependency install behavior; static scan and VirusTotal telemetry are clean.
Credentials
Reading project files is proportionate for a handoff skill, but enumerating environment variables, platform status, global identity/memory files, scheduled tasks, channel configuration, and connector status is high-impact context collection that is only loosely bounded.
Persistence & Privilege
The skill writes a handoff document such as docs/session-handoff.md or .workbuddy/session-handoff.md and generates prompts for another AI session. This persistence is disclosed and purpose-aligned, but overwrite behavior and sensitive-content handling are not clearly controlled beyond general filtering instructions.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install session-branch
  3. After installation, invoke the skill by name or use /session-branch
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
WorkBuddy deep adaptation: identity files, memory system, skills list, scheduled tasks, IMA/Feishu channels, MCP connectors
v1.0.1
docs: update README with bilingual structure, add CONTRIBUTING.md and PUBLISHING_GUIDE.md
v1.0.0
Initial release of session-branch: branch your ongoing coding session into a new conversation with full context transfer. - Analyzes the current session to extract project identity, decision history, and context details. - Generates a reusable handoff document (no personal data or secrets) using a structured template. - Cross-checks the handoff against a validation checklist for completeness. - Creates a startup prompt for the new session with file paths and clear step-by-step instructions. - Presents the user with a summary, the handoff doc, startup prompt, file list, and confirmation to branch.
Metadata
Slug session-branch
Version 1.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is Session Branch?

Branch a coding session into a new conversation with full context handoff — generate structured handoff doc, startup prompts, and guide the new session to pi... It is an AI Agent Skill for Claude Code / OpenClaw, with 40 downloads so far.

How do I install Session Branch?

Run "/install session-branch" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Session Branch free?

Yes, Session Branch is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Session Branch support?

Session Branch is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Session Branch?

It is built and maintained by AI花生 (@edwardwason); the current version is v1.1.0.

💬 Comments