PluginBench
Skill
Review
Audit score 70

session-handoff

softaworks/agent-toolkit

Create comprehensive handoff documents to seamlessly transfer AI agent sessions and preserve context across work boundaries.

What is session-handoff?

This skill generates structured handoff documents that enable fresh AI agents to continue work without losing context. Use it when pausing work, approaching context limits, completing milestones, or resuming from previous sessions.

  • Generate pre-filled handoff documents with project state, git history, and modified files
  • Validate handoffs for completeness, security, and quality scoring before finalization
  • Check handoff staleness against current git state to assess context currency
  • Chain multiple handoffs together to maintain context lineage for long-running projects
  • Provide smart scaffolding that captures current state, decisions, blockers, and next steps

How to install session-handoff

npx skills add https://github.com/softaworks/agent-toolkit --skill session-handoff
Prerequisites
  • Python environment with scripts directory available
  • Git repository initialized in project
  • Write access to .claude/handoffs/ directory
Claude Code
Cursor
Windsurf
Cline

How to use session-handoff

  1. 1.Run `python scripts/create_handoff.py [task-slug]` to generate a new handoff document
  2. 2.Complete all `[TODO: ...]` sections in the generated file, prioritizing Current State Summary and Immediate Next Steps
  3. 3.Run `python scripts/validate_handoff.py <handoff-file>` to check completeness and security
  4. 4.Review validation score and warnings, then confirm handoff location with user
  5. 5.To resume: run `python scripts/list_handoffs.py` to find available handoffs, then `python scripts/check_staleness.py <handoff-file>` to verify currency
  6. 6.Read the handoff document completely and follow the Resume Workflow checklist before taking action
  7. 7.Start with Immediate Next Steps item #1 and reference Critical Files and Key Patterns as you work

Use cases

Good for
  • Pause a long debugging session and resume with a fresh agent the next day
  • Transfer complex architectural work between multiple AI agents without losing design rationale
  • Preserve context when approaching token limits in extended coding sessions
  • Document milestone completions with full context for future reference and continuation
  • Resume interrupted work by loading previous handoff and verifying assumptions still hold
Who it's for
  • Developers using long-running AI coding sessions
  • Teams coordinating work across multiple AI agent instances
  • Anyone working on complex projects requiring context preservation
  • Users managing extended debugging or architecture design tasks

session-handoff FAQ

When should I create a handoff?

Create a handoff when: (1) user requests to save state or pause work, (2) context window is approaching capacity, (3) a major task milestone is completed, (4) a work session is ending, or (5) after substantial work like 5+ file edits or complex debugging. You can also proactively suggest one after significant progress.

How do I resume work from a previous handoff?

List available handoffs with `python scripts/list_handoffs.py`, check staleness with `python scripts/check_staleness.py <file>`, read the handoff completely, verify context using the resume checklist, then start with the first Immediate Next Steps item.

What if a handoff is stale?

Check staleness levels: FRESH (safe to resume), SLIGHTLY_STALE (review changes first), STALE (verify context carefully), or VERY_STALE (consider creating a fresh handoff). The staleness checker compares git commits, file changes, and branch state since the handoff was created.

Can I chain handoffs together?

Yes. Use `python scripts/create_handoff.py "slug" --continues-from <previous-file>` to link handoffs. Each handoff in the chain references its predecessor, creating a context breadcrumb trail for new agents to follow.

What does the validation script check?

It verifies no `[TODO: ...]` placeholders remain, required sections are populated, no secrets are detected, referenced files exist, and calculates a quality score (0-100). Do not finalize handoffs with detected secrets or scores below 70.

Full instructions (SKILL.md)

Source of truth, from softaworks/agent-toolkit.


name: session-handoff description: "Creates comprehensive handoff documents for seamless AI agent session transfers. Triggered when: (1) user requests handoff/memory/context save, (2) context window approaches capacity, (3) major task milestone completed, (4) work session ending, (5) user says 'save state', 'create handoff', 'I need to pause', 'context is getting full', (6) resuming work with 'load handoff', 'resume from', 'continue where we left off'. Proactively suggests handoffs after substantial work (multiple file edits, complex debugging, architecture decisions). Solves long-running agent context exhaustion by enabling fresh agents to continue with zero ambiguity."

Handoff

Creates comprehensive handoff documents that enable fresh AI agents to seamlessly continue work with zero ambiguity. Solves the long-running agent context exhaustion problem.

Mode Selection

Determine which mode applies:

Creating a handoff? User wants to save current state, pause work, or context is getting full.

  • Follow: CREATE Workflow below

Resuming from a handoff? User wants to continue previous work, load context, or mentions an existing handoff.

  • Follow: RESUME Workflow below

Proactive suggestion? After substantial work (5+ file edits, complex debugging, major decisions), suggest:

"We've made significant progress. Consider creating a handoff document to preserve this context for future sessions. Say 'create handoff' when ready."

CREATE Workflow

Step 1: Generate Scaffold

Run the smart scaffold script to create a pre-filled handoff document:

python scripts/create_handoff.py [task-slug]

Example: python scripts/create_handoff.py implementing-user-auth

For continuation handoffs (linking to previous work):

python scripts/create_handoff.py "auth-part-2" --continues-from 2024-01-15-auth.md

The script will:

  • Create .claude/handoffs/ directory if needed
  • Generate timestamped filename
  • Pre-fill: timestamp, project path, git branch, recent commits, modified files
  • Add handoff chain links if continuing from previous
  • Output file path for editing

Step 2: Complete the Handoff Document

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

  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)

Use the template structure in references/handoff-template.md for guidance.

Step 3: Validate the Handoff

Run the validation script to check completeness and security:

python scripts/validate_handoff.py <handoff-file>

The validator 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 a handoff with secrets detected or score below 70.

Step 4: Confirm Handoff

Report to user:

  • Handoff file location
  • Validation score and any warnings
  • Summary of captured context
  • First action item for next session

RESUME Workflow

Step 1: Find Available Handoffs

List handoffs in the current project:

python scripts/list_handoffs.py

This shows all handoffs with dates, titles, and completion status.

Step 2: Check Staleness

Before loading, check how current the handoff is:

python scripts/check_staleness.py <handoff-file>

Staleness levels:

  • FRESH: Safe to resume - minimal changes since handoff
  • SLIGHTLY_STALE: Review changes, then resume
  • STALE: Verify context carefully before resuming
  • VERY_STALE: Consider creating a fresh handoff

The script checks:

  • Time since handoff was created
  • Git commits since handoff
  • Files changed since handoff
  • Branch divergence
  • Missing referenced files

Step 3: Load the Handoff

Read the relevant handoff document completely before taking any action.

If handoff is part of a chain (has "Continues from" link), also read the linked previous handoff for full context.

Step 4: Verify Context

Follow the checklist in references/resume-checklist.md:

  1. Verify project directory and git branch match
  2. Check if blockers have been resolved
  3. Validate assumptions still hold
  4. Review modified files for conflicts
  5. Check environment state

Step 5: Begin Work

Start with "Immediate Next Steps" item #1 from the handoff document.

Reference these sections as you work:

  • "Critical Files" for important locations
  • "Key Patterns Discovered" for conventions to follow
  • "Potential Gotchas" to avoid known issues

Step 6: Update or Chain Handoffs

As you work:

  • Mark completed items in "Pending Work"
  • Add new discoveries to relevant sections
  • For long sessions: create a new handoff with --continues-from to chain them

Handoff Chaining

For long-running projects, chain handoffs together 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

Each handoff in the chain:

  • Links to its predecessor
  • Can mark older handoffs as superseded
  • Provides context breadcrumbs for new agents

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

Storage Location

Handoffs are stored in: .claude/handoffs/

Naming convention: YYYY-MM-DD-HHMMSS-[slug].md

Example: 2024-01-15-143022-implementing-auth.md

Resources

scripts/

ScriptPurpose
create_handoff.py [slug] [--continues-from <file>]Generate new handoff with smart scaffolding
list_handoffs.py [path]List available handoffs in a project
validate_handoff.py <file>Check completeness, quality, and security
check_staleness.py <file>Assess if handoff context is still current

references/