session-handoff

WHAT: Create comprehensive handoff documents that enable fresh AI agents to seamlessly continue work with zero ambiguity. Solves long-running agent context exhaustion problem. WHEN: (1) User requests handoff/memory/context save, (2) Context window approaches capacity, (3) Major task milestone completed, (4) Work session ending, (5) Resuming work with existing handoff. KEYWORDS: "save state", "create handoff", "context is full", "I need to pause", "resume from", "continue where we left off", "load handoff", "save progress", "session transfer", "hand off"

7 stars

Best use case

session-handoff is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

WHAT: Create comprehensive handoff documents that enable fresh AI agents to seamlessly continue work with zero ambiguity. Solves long-running agent context exhaustion problem. WHEN: (1) User requests handoff/memory/context save, (2) Context window approaches capacity, (3) Major task milestone completed, (4) Work session ending, (5) Resuming work with existing handoff. KEYWORDS: "save state", "create handoff", "context is full", "I need to pause", "resume from", "continue where we left off", "load handoff", "save progress", "session transfer", "hand off"

Teams using session-handoff should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/session-handoff/SKILL.md --create-dirs "https://raw.githubusercontent.com/wpank/ai/main/skills/tools/session-handoff/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/session-handoff/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How session-handoff Compares

Feature / Agentsession-handoffStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

WHAT: Create comprehensive handoff documents that enable fresh AI agents to seamlessly continue work with zero ambiguity. Solves long-running agent context exhaustion problem. WHEN: (1) User requests handoff/memory/context save, (2) Context window approaches capacity, (3) Major task milestone completed, (4) Work session ending, (5) Resuming work with existing handoff. KEYWORDS: "save state", "create handoff", "context is full", "I need to pause", "resume from", "continue where we left off", "load handoff", "save progress", "session transfer", "hand off"

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Session Handoff

Create handoff documents that enable fresh agents to continue work seamlessly.

## Mode Selection

**Creating a handoff?** User wants to save state, pause work, or context is full.
→ Follow CREATE Workflow

**Resuming from a handoff?** User wants to continue previous work or load context.
→ Follow RESUME Workflow

**Proactive suggestion?** After substantial work (5+ file edits, complex debugging, major decisions):
> "Consider creating a handoff document to preserve this context. Say 'create handoff' when ready."


## Installation

### OpenClaw / Moltbot / Clawbot

```bash
npx clawhub@latest install session-handoff
```


---

## CREATE Workflow

### Step 1: Generate Scaffold

Run the smart scaffold script:

```bash
python scripts/create_handoff.py [task-slug]
```

For continuation handoffs (linking to previous work):
```bash
python scripts/create_handoff.py "auth-part-2" --continues-from 2024-01-15-auth.md
```

The script creates `.claude/handoffs/` directory and generates a timestamped file with pre-filled metadata (timestamp, project path, git branch, recent commits, modified files).

### Step 2: Complete the Document

Open the generated file and fill all `[TODO: ...]` sections. Prioritize:

1. **Current State Summary** - What's happening right now
2. **Important Context** - Critical info the next agent MUST know
3. **Immediate Next Steps** - Clear, actionable first steps
4. **Decisions Made** - Choices with rationale (not just outcomes)

See [references/handoff-template.md](references/handoff-template.md) for full structure.

### Step 3: Validate

```bash
python scripts/validate_handoff.py <handoff-file>
```

Checks:
- No `[TODO: ...]` placeholders remaining
- Required sections present and populated
- No potential secrets detected (API keys, passwords, tokens)
- Referenced files exist
- Quality score (0-100)

**Do not finalize handoffs with secrets detected or score below 70.**

### Step 4: Confirm

Report to user:
- Handoff file location
- Validation score and warnings
- Summary of captured context
- First action item for next session

---

## RESUME Workflow

### Step 1: Find Handoffs

```bash
python scripts/list_handoffs.py
```

### Step 2: Check Staleness

```bash
python scripts/check_staleness.py <handoff-file>
```

Staleness levels:
- **FRESH**: Safe to resume
- **SLIGHTLY_STALE**: Review changes first
- **STALE**: Verify context carefully
- **VERY_STALE**: Consider creating fresh handoff

### Step 3: Load and Verify

Read the handoff document completely. If part of a chain, also read the previous handoff.

Follow [references/resume-checklist.md](references/resume-checklist.md):
1. Verify project directory and git branch match
2. Check if blockers resolved
3. Validate assumptions still hold
4. Review modified files for conflicts

### Step 4: Begin Work

Start with "Immediate Next Steps" item #1.

Reference as you work:
- "Critical Files" for important locations
- "Key Patterns Discovered" for conventions
- "Potential Gotchas" to avoid known issues

---

## Handoff Chaining

For long-running projects, chain handoffs to maintain context lineage:

```
handoff-1.md (initial work)
    ↓
handoff-2.md --continues-from handoff-1.md
    ↓
handoff-3.md --continues-from handoff-2.md
```

When resuming from a chain, read the most recent handoff first, then reference predecessors as needed.

---

## Storage

Location: `.claude/handoffs/`
Naming: `YYYY-MM-DD-HHMMSS-[slug].md`

---

## Quality Criteria

Good handoffs have:
- Zero ambiguity about current state
- Clear, numbered next steps
- Rationale for decisions (not just outcomes)
- File paths with line numbers where relevant
- No secrets or credentials

---

## NEVER

- Include API keys, passwords, tokens, or credentials
- Leave TODO placeholders in finalized handoffs
- Skip the validation step
- Create handoffs without the Important Context section
- Finalize handoffs with quality score below 70

Related Skills

schema-markup

7
from wpank/ai

Add, fix, or optimize schema markup and structured data. Use when the user mentions schema markup, structured data, JSON-LD, rich snippets, schema.org, FAQ schema, product schema, review schema, or breadcrumb schema.

prompt-engineering

7
from wpank/ai

Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production. Use when optimizing prompts, improving LLM outputs, designing production prompt templates, or building AI-powered features.

professional-communication

7
from wpank/ai

Write effective professional messages for software teams. Use when drafting emails, Slack/Teams messages, meeting agendas, status updates, or translating technical concepts for non-technical audiences. Triggers on email, slack, teams, message, meeting agenda, status update, stakeholder communication, escalation, jargon translation.

persona-docs

7
from wpank/ai

Create persona documentation for a product or codebase. Use when asked to create persona docs, document target users, define user journeys, document onboarding flows, or when starting a new product and needing to define its audience. Persona docs should be the first documentation created for any product.

mermaid-diagrams

7
from wpank/ai

Create software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams, sequence diagrams, flowcharts, ERDs, C4 architecture diagrams, state diagrams, git graphs, and other diagram types. Triggers include requests to diagram, visualize, model, map out, or show the flow of a system.

game-changing-features

7
from wpank/ai

Find 10x product opportunities and high-leverage improvements. Use when the user wants strategic product thinking, mentions 10x, wants to find high-impact features, or asks what would make a product dramatically more valuable.

clear-writing

7
from wpank/ai

Write clear, concise prose for humans — documentation, READMEs, API docs, commit messages, error messages, UI text, reports, and explanations. Combines Strunk's rules for clearer prose with technical documentation patterns, structure templates, and review checklists.

brainstorming

7
from wpank/ai

Explore ideas before implementation through collaborative dialogue. Use before any creative work — creating features, building components, adding functionality, or modifying behavior. Turns ideas into fully formed designs and specs through structured conversation.

Article Illustrator

7
from wpank/ai

When the user wants to add illustrations to an article or blog post. Triggers on: "illustrate article", "add images to article", "generate illustrations", "article images", or requests to visually enhance written content. Analyzes article structure, identifies positions for visual aids, and generates illustrations using a Type x Style two-dimension approach.

subagent-driven-development

7
from wpank/ai

Execute implementation plans by dispatching a fresh subagent per task with two-stage review (spec compliance then code quality). Use when you have an implementation plan with mostly independent tasks and want high-quality, fast iteration within a single session.

skill-judge

7
from wpank/ai

Evaluate Agent Skill quality against official specifications. Use when reviewing SKILL.md files, auditing skill packages, improving skill design, or checking if a skill follows best practices. Provides 8-dimension scoring (120 points) with actionable improvements. Triggers on review skill, evaluate skill, audit skill, improve skill, skill quality, SKILL.md review.

skill-creator

7
from wpank/ai

WHAT: Guide for creating effective AI agent skills - modular packages that extend Claude's capabilities with specialized knowledge, workflows, and tools. WHEN: User wants to create, write, author, or update a skill. User asks about skill structure, SKILL.md format, or how to package domain knowledge for AI agents. KEYWORDS: "create a skill", "make a skill", "new skill", "skill template", "SKILL.md", "agent skill", "write a skill", "skill structure", "package a skill"