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>
2.0 KiB
description
| description |
|---|
| Read all changed files in current branch to rebuild context after /clear |
Catchup - Context Recovery
Pre-computed Context
Current Branch:
!git branch --show-current
Base Branch:
!git remote show origin 2>/dev/null | grep "HEAD branch" | cut -d: -f2 | tr -d ' ' || echo "main"
Commits Since Branch:
!BASE=$(git remote show origin 2>/dev/null | grep "HEAD branch" | cut -d: -f2 | tr -d ' ' || echo "main"); git log --oneline origin/$BASE...HEAD 2>/dev/null || git log --oneline $BASE...HEAD 2>/dev/null | head -15
Changed Files:
!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 || git diff --name-only $BASE...HEAD 2>/dev/null
Recent Activity (staged + unstaged):
!git status --porcelain | head -10
HANDOFF.md (if exists):
!cat .claude/HANDOFF.md 2>/dev/null || cat HANDOFF.md 2>/dev/null || echo "No HANDOFF.md found"
Instructions
You are rebuilding context after a /clear command. Your goal is to understand what work has been done on this branch.
1. Review Commits
Summarize the commits shown above - what feature/fix is being worked on?
2. Read Changed Files
Read each changed file to understand the current state of the implementation:
- Use the Read tool for each file in the "Changed Files" list
- Pay attention to new functions, modified logic, and TODOs
3. Check HANDOFF.md
If a HANDOFF.md exists, it contains notes from the previous session about:
- Current goal and progress
- Key decisions made
- Next steps to continue
4. Summarize Context
Provide a brief summary:
- Goal: What is being implemented/fixed
- Progress: What's done so far
- Current State: Any uncommitted changes
- Next Steps: What should be done next
Usage
After running /clear to free up context:
/workflow:catchup
This reads all modified files and reconstructs the context so you can continue working seamlessly.