Compact Conversation Context
When to Use
Use this skill only as a fallback for agents without a built-in compaction feature. Before proceeding, check whether the agent already offers /compact or another native context-management workflow (Claude Code and Aider both do) — if so, use that instead and stop here.
Reach for it when all of these hold:
- The agent has no native
/compact(or equivalent) command - The conversation has grown long (10+ messages)
- You are between tasks, not mid-debug or mid multi-step task
Instructions
When this skill is invoked:
Analyze Current Conversation
- Review all messages in the current conversation
- Identify key decisions, code changes, and outcomes
- Note any unresolved issues or pending tasks
Create Compact Summary Document
- Create or update
.windsurf/conversation-summary.mdwith:- Project Context: Brief description of what we're working on
- Completed Work: Bulleted list of finished tasks and changes
- Key Decisions: Important architectural or implementation choices
- Current State: What's working, what's deployed, what's tested
- Pending Tasks: What still needs to be done
- Important Notes: Any critical context for future sessions
- Create or update
Format Requirements
- Use concise bullet points, not paragraphs
- Include absolute file paths with citations where relevant
- Keep total summary under 500 lines
- Use markdown headers for organization
- Include a timestamp for when the summary was created
After Creating Summary
- Inform the user that context has been compacted
- Suggest they can start a new conversation and reference the summary
- Provide the path to the summary file
Example Output Structure
# Conversation Summary
*Created: 2026-04-08 10:54 UTC+05:30*
## Project Context
- Working on [brief description]
## Completed Work
- **File**: `@/path/to/file.ts` - [what was done]
- **Feature**: [feature name] - [status]
## Key Decisions
- Chose [technology/approach] because [reason]
## Current State
- ✅ [what's working]
- ⚠️ [what needs attention]
## Pending Tasks
- [ ] [task 1]
- [ ] [task 2]
## Important Notes
- [critical context]
Best Practices
- Include only what's needed in a future session — outcomes, not process or debugging blow-by-blow
- Update the existing summary rather than creating a duplicate