Export full session then compact working memory
/plugin marketplace add arevlo/claude-code-workflows/plugin install arevlo-swarm@claude-code-workflowsProactively reduce context usage while preserving everything via /export.
/compact
Prompt the user:
Compaction initiated.
Please run the following command to preserve full session:
/export
Then save the output to: .claude/swarm/exports/pre-compact-$(date +%Y%m%d-%H%M%S).txt
(You can download the export or copy to clipboard, then save to the path above)
Wait for user confirmation that export was saved.
From working memory (do NOT re-read files), extract:
## Current Essentials
**Compacted:** $(date -Iseconds)
### Active Goal
[What are you trying to accomplish?]
### Current Phase
[Where are you in the process?]
### Key Files (Paths Only - No Contents!)
- `path/to/file1.ts` - [Purpose/role]
- `path/to/file2.ts` - [Purpose/role]
- `path/to/file3.ts` - [Purpose/role]
### Immediate Next Actions
1. [Specific next step]
2. [Then this]
3. [Then this]
### Important Context Pointers
- Research findings: [path if exists]
- Implementation plan: [path if exists]
- Full pre-compact export: .claude/swarm/exports/pre-compact-[timestamp].txt
Take any verbose details from working memory and save to:
.claude/swarm/context/detailed-$(date +%Y%m%d-%H%M%S).md
This might include:
From working memory, DROP:
KEEP in working memory:
✓ Context compacted
Full session preserved: .claude/swarm/exports/pre-compact-[timestamp].txt
Detailed findings archived: .claude/swarm/context/detailed-[timestamp].md
Working memory now holds:
- Active goal: [goal]
- Current phase: [phase]
- File references: [count] files (paths only)
- Next steps: [immediate actions]
Estimated reduction: 60-80% context freed
Full details available in export if needed.
Before compaction:
After compaction: