| name | compact |
| description | Create a token-efficient state snapshot for context preservation during long sessions. |
/compact
Create a token-efficient state snapshot for context preservation during long sessions. This is the creation side of context recovery — /resume is the reconstruction side.
Usage
/compact [--save]
Arguments
--save: Write the snapshot to prd/tasks/{feature}_compact.md (default: display only)
How This Differs From /checkpoint
| Skill | Purpose | Output | When to Use |
|---|
/checkpoint | Update task tracking with progress details | Full task file update | Every 30-60 min during development |
/compact | Create minimal recovery snapshot | Dense state summary | Before context limit, before long breaks |
/checkpoint maintains detailed progress. /compact creates the minimum context needed to reconstruct working state after full context loss.
Instructions
When this skill is invoked:
Agent Behavior
Autonomy:
- Detect current feature from branch name or active task file
- Build the snapshot without prompting
- Include only information that cannot be derived from reading the code
Discipline:
- Maximum 200 lines for the snapshot
- Focus on decisions, state, and next steps — not code summaries
- If code tells the story, don't repeat it in the snapshot