| name | context |
| description | This skill should be used when managing scratchpad and context across workflow phases. Use when persisting state, recovering context after restart, or archiving completed work. |
Context Manager
Purpose
Maintain working state across phases and handle context limits.
Scratchpad Structure
Global scratchpad (for cross-project work):
~/.claude/scratch/
├── <project-name>/
│ └── <task>/
│ ├── intake.md
│ ├── implement.md
│ ├── verify.md
│ ├── review.md
│ └── notes.md
└── global/
└── <notes that span projects>
Project-local scratchpad (preferred when in a project):
<project>/docs/scratch/
├── <task>/
│ ├── intake.md
│ ├── implement.md
│ ├── verify.md
│ ├── review.md
│ └── notes.md
└── archive/
└── <completed task dirs>
Scratchpad Location Rules
- If inside a git repo with
docs/directory: usedocs/scratch/ - If inside a git repo without
docs/: createdocs/scratch/ - If not in a git repo: use
~/.claude/scratch/<context-name>/ - For work spanning multiple projects: use
~/.claude/scratch/global/
Task Directory Naming
Format: YYYY-MM-DD-<short-descriptor>
Example: 2025-01-15-user-auth-flow
When to Write to Scratchpad
- After any decision that would be costly to re-derive
- When switching between tasks or phases
- Before spawning subagents (capture current state)
- When context is getting long (proactive offload)
- Any "improvement ideas" that are out of scope (capture for later)
Scratchpad Format
# <Task> - <Phase> Working State
Project: <project name or path>
Updated: <timestamp>
## Current Status
<one line: what's happening right now>
## Decisions Made
- <decision>: <reasoning> (at <time/commit>)
## Open Questions
- <question> - blocked on <what>
## Next Steps
1. <immediate next action>
2. <after that>
Context Recovery
If context is lost or conversation restarts:
- Identify project from working directory
- Read docs/plans/
.md for spec - Read docs/scratch/
/* for current state - Check git log for recent commits
- Reconstruct position and continue
Archiving Completed Work
When a task is fully complete:
- Move task directory to
docs/scratch/archive/ - Design doc remains in
docs/plans/(permanent record) - Commit archive with message:
chore: archive <task> scratch files
Handoff to Subagents
When spawning a subagent, provide:
- Specific task description (bounded)
- Relevant spec section (not whole spec)
- Files to read (explicit list)
- Success criteria (how to know when done)
- Where to write output (if persisting state)
Do NOT provide:
- Entire conversation history
- Unrelated context
- Vague "figure it out" instructions