chat-compactor
Generate Session Summaries for AI Continuity
Lose critical context when sessions end. This skill produces structured handoff documents that preserve decisions, dead ends, and next steps for seamless AI agent continuity.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
Toggle on and start using
Test it
Using "chat-compactor". User says: 'Let's wrap up, compact this session'
Expected outcome:
- Session saved to session-auth-refactor-2025-01-06.md
- Summary includes: 3 key decisions with rationale, 2 dead ends documented, 5 modified files listed, 4 prioritized next steps
Using "chat-compactor". User says: 'Save context before we switch to the API task'
Expected outcome:
- Checkpoint created: session-frontend-setup-2025-01-06.md
- Captured: React component structure, Tailwind configuration, build command, and deployment notes
Security Audit
SafeAll static analysis findings are false positives. The 'external_commands' pattern matched markdown code fence backticks (```) not shell execution. The 'weak cryptographic algorithm' finding at line 3 incorrectly flagged YAML frontmatter text. This skill contains only instructional markdown content with no executable code, network access, or security risks.
Quality Score
What You Can Build
End-of-Session Handoff
Developer finishing a debugging session generates a summary so the next AI session can immediately continue without re-explaining the problem context and attempted solutions.
Long Project Continuity
Team lead maintains project momentum across multiple AI sessions by creating structured handoff documents that preserve architectural decisions and implementation status.
Context Window Management
User proactively compacts lengthy conversations before the context window fills, preserving essential information while freeing up tokens for continued work.
Try These Prompts
Compact this session. Generate a structured summary with: what was accomplished, key decisions made, current state of the code, and next steps. Save as session-summary.md
Create a comprehensive handoff document for the next AI agent. Include decision tables with alternatives rejected, all modified files with change descriptions, dead ends that should not be retried, and environment gotchas discovered.
Generate a lightweight checkpoint summary before we continue. Capture current state, what's working, what's blocked, and immediate next steps. Keep it under 300 tokens.
We're switching from feature A to feature B. Create a handoff document for feature A that captures: completed work, pending items, file locations, naming conventions established, and any quirks the next session should know.
Best Practices
- Document the 'why' behind decisions, not just the 'what' - future agents need rationale
- Always list failed approaches in dead ends section to prevent wasted effort
- Keep summaries scannable with clear headings, tables, and bullet points
Avoid
- Writing narrative prose instead of structured, scannable content
- Creating vague summaries like 'made good progress' without specific outcomes
- Omitting failure documentation - dead ends are the most valuable content