Files
claude-plugins/plugins/workflow/commands/save.md
Claude Agent 45e28e7e94 feat(workflow): Add workflow plugin v1.0.0
Git workflow, code quality, context management and testing commands:
- commit, push, pr, issue - git operations
- simplify, refactor, verify, check - code quality
- catchup, onboard, save, cleanup - context management
- test, format, sync - development utilities

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 15:23:48 +00:00

2.4 KiB

description
description
Save current progress to HANDOFF.md before /clear

Save Progress

Pre-computed Context

Current Branch: !git branch --show-current

Recent Commits: !git log --oneline -5

Changed Files (uncommitted): !git status --porcelain | head -10

Changed Files (in branch): !BASE=$(git remote show origin 2>/dev/null | grep "HEAD branch" | cut -d: -f2 | tr -d ' ' || echo "main"); git diff --name-only origin/$BASE...HEAD 2>/dev/null | head -10

Existing HANDOFF.md: !cat .claude/HANDOFF.md 2>/dev/null || cat HANDOFF.md 2>/dev/null || echo "No existing HANDOFF.md"


Instructions

You are saving the current work context to a HANDOFF.md file so the next session can continue seamlessly.

Purpose

Before running /clear to free up context, save important information:

  • What you were working on
  • Progress made
  • Decisions and context
  • Next steps

HANDOFF.md Location

Save to .claude/HANDOFF.md (create .claude/ directory if needed):

mkdir -p .claude

Template

Create/update .claude/HANDOFF.md with this structure:

# Handoff Document

**Branch:** <current-branch>
**Last Updated:** <timestamp>
**Session Goal:** <what we were trying to accomplish>

## Progress

- [x] Completed task 1
- [x] Completed task 2
- [ ] In progress: task 3
- [ ] Not started: task 4

## Key Decisions

- Decision 1: Why we chose approach A over B
- Decision 2: Important context about the implementation

## Files Modified

- `path/to/file1.ts` - Added feature X
- `path/to/file2.ts` - Fixed bug Y

## Current State

<Brief description of where things stand>
<Any uncommitted work that needs attention>

## Next Steps

1. First thing to do
2. Second thing to do
3. Third thing to do

## Notes

<Any other important context for the next session>

Content Guidelines

  1. Be Specific: Include file paths, function names, error messages
  2. Explain Why: Document decisions, not just what was done
  3. List Blockers: Note anything that prevented progress
  4. Include Context: Add relevant links, issue numbers, PR URLs

Workflow

# End of session
/workflow:save    # Creates HANDOFF.md
/clear            # Clears context

# Next session
/workflow:catchup # Reads HANDOFF.md + changed files

Do NOT Commit HANDOFF.md

Add to .gitignore:

.claude/HANDOFF.md

HANDOFF.md is for session continuity, not for version control.