Compresses context for long sessions by writing state to disk and clearing working memory. Use when context is high/critical or before complex multi-step work.
Scanned 6/9/2026
Install via CLI
openskills install majiayu000/claude-skill-registry---
name: compact
description: Compresses context for long sessions by writing state to disk and clearing working memory. Use when context is high/critical or before complex multi-step work.
allowed-tools: Read, Write
---
# Compact
Preserve critical state while freeing context capacity. Writes to disk, clears context, continues with renewed capacity.
## When to Use
- Context status shows High or Critical
- Session running > 60 minutes
- About to start complex multi-step work
- Noticing degraded responses or forgotten instructions
## What Compaction Does
**Before**: Context ~100% saturated
**After**: Context ~50% healthy (state saved to disk)
## Process
1. **Capture State** → Write to `.context/compact-state.md`
2. **Refresh Instructions** → Re-read safety rules, orchestration mode, tools
3. **Acknowledge** → Report compaction complete, ready to continue
## State File Template
```markdown
# Compact State — [timestamp]
## Session Objective
[overall goal]
## Current Task
[what we're working on]
## Completed Work
- [task]: [outcome]
## Key Decisions
- [decision]: [rationale]
## Critical Context
[must-preserve information]
## Next Steps
1. [immediate]
2. [following]
```
## What to Preserve
- Session objective and current task
- Completed work (avoid redoing)
- Key decisions (maintain consistency)
- Blockers and issues
- User preferences expressed
## What to Clear (Safe)
- Exploration that didn't pan out
- Verbose explanations
- Raw file contents (re-read from disk)
- Detailed agent outputs (summary sufficient)
## Output
```markdown
## Context Compacted
**State saved**: `.context/compact-state.md`
### Preserved
- Session objective
- Current task
- Key decisions
### Restored
- Safety rules
- Orchestration mode
- Tool awareness
### Status
**Before**: Critical (~90%)
**After**: Low (~40%)
Ready to continue: [task]
```
## Related
- Emergency compact: See [reference/emergency-compact.md](reference/emergency-compact.md)
- Run first: `/context-status` to determine if needed
- Resume from: `/session-start`
No comments yet. Be the first to comment!
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...
**Complete production-ready guide for Google Gemini embeddings API** This skill provides comprehensive coverage of the `gemini-embedding-001` model for generating text embeddings, including SDK usage, REST API patterns, batch processing, RAG integration with Cloudflare Vectorize, and advanced use cases like semantic search and document clustering. ---
Interview, source-challenge, verify, save, and ADR-gate fuzzy coding requests into Codex-ready implementation specs. Use when a feature, bugfix, refactor, migration, repo-wide change, or architecture task needs user-verified requirements, source-backed decisions, durable architecture decisions, acceptance criteria, validation commands, rollout notes, saved spec/ADR files, and a Codex execution prompt. Do not use when already fully specified or when the user wants direct implementation now.
Use when a repo needs CodeGraph plus ast-grep for Codex MCP setup, exploration, impact analysis, structural search, or safe refactor planning.