moeryomenko/dotfiles/context-compression
Claude Code and agent skill by moeryomenko/dotfiles
- community
Checking that the SKILL.md file is still in the repository.
Manage and compress conversation context in long sessions. Detect when context is growing large, summarize completed work phases, archive old findings while preserving key decisions. Prevents context degradation.
Install
npx vskill@latest install moeryomenko/dotfiles/context-compressionSKILL.md
The same SKILL.md was published earlier as moeryomenko/dotfiles/context-compression.
Context Compression — Long Session Management
Keep sessions productive by compressing completed work while preserving key decisions.
Overview
Long sessions (30+ turns) cause context degradation — the AI loses track of earlier work, repeats itself, or forgets decisions. Context compression proactively summarizes completed phases so the context window stays focused on active work.
Token Impact: Recovers 5,000-15,000 tokens in long sessions by replacing verbose tool outputs with semantic summaries.
When to Compress
| Signal | Action | |
|---|---|---|
| Session has 20+ turns | Consider proactive compression | |
| Agent repeats earlier suggestions | Context is saturated — compress now | |
| User says "we already discussed this" | Compress immediately | |
| Switching to a new phase of work | Compress the completed phase | |
| Large tool output (500+ lines) | Micro-compact the output |
Compression Levels
Level 1: Micro-Compact (Tool Output)
Compress individual tool outputs while retaining semantic content:
Level 2: Phase Summary
Replace a completed work phase with a summary:
Level 3: Session Archive
When context is critically full, archive the entire completed portion:
- Save full session transcript to
.opencode/sessions/archive-YYYYMMDD-HHMMSS.md - Keep only: active task state, key decisions, next steps
- Clear completed task details from context
What to Preserve (Never Compress Away)
- User preferences and constraints
- Architectural decisions (especially trade-offs explained by the user)
- Security requirements
- API keys, credentials, or sensitive data (if present, preserve securely)
- Commit messages and change rationale
- Current task state and next steps
Compression Protocol
Verification Markers
[Check] Context saturation detected appropriately[Check] Key decisions preserved after compression[Check] Compression level matches phase completion[Check] Active task state unchanged after compression
Security
- Security scanPassed, 98 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingopencode/.config/opencode/skills/context-compression/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/moeryomenko/dotfiles/context-compression)