Claude-skill-registry coihuin-compress
Context compression for long coding sessions. Creates checkpoints (state snapshots) and maintains them as you work.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/coihuin-compress" ~/.claude/skills/majiayu000-claude-skill-registry-coihuin-compress && rm -rf "$T"
skills/data/coihuin-compress/SKILL.mdCoihuin Compress
Context compression at natural breakpoints, not reactive to token limits.
Workflow
Session 1 (new work): → "checkpoint" → creates new checkpoint → chkcc current <checkpoint> → set as current Session 2+ (continuing): → Read checkpoint file → chkcc current <checkpoint> → set as current → work + continuous maintenance → "archive" when done
Continuous Maintenance
This is the core principle. Don't wait for "delta" commands. Update the checkpoint as you work:
| When This Happens | Update This Section |
|---|---|
| Decision made | → Decisions |
| File created/modified/deleted | → Artifact Trail |
| Task completed | → Play-By-Play, Current State |
| Blocker hit | → Breadcrumbs, Next Actions |
| Direction changes | → Session Intent, Next Actions |
Update immediately, not in batches. Small, frequent updates keep the checkpoint alive in your working memory.
Checkpoint States
| State | Location | Meaning |
|---|---|---|
| current | | The ONE checkpoint being actively worked on |
| active | | In-progress work (not immediate focus) |
| archived | | Completed work |
chkcc current <checkpoint> # Set as current chkcc current # Show current chkcc current --clear # Clear current chkcc status # Show all active with summaries
Operations
Checkpoint
Create new state snapshot.
Trigger: "checkpoint", "create checkpoint"
How:
- Read
for structurecheckpoint-format.md - Extract "What Must Survive" from conversation
- Generate checkpoint following the format
- Save to
checkpoints/active/<name>.md - Update
checkpoints/active/INDEX.md
Delta (Explicit)
Force a structured update when you want visibility into what changed.
Trigger: "delta", "update checkpoint"
How:
- Add
section to checkpoint## Delta: <timestamp> - Summarize what changed since last delta
- Update main sections with current state
Note: With continuous maintenance, explicit deltas are less necessary. Use when you want a clear marker of progress.
Archive
Complete work and move to historical storage.
Trigger: "archive"
How:
- Capture outcome from user:
What was achieved? Any learnings worth preserving?
- Add
section with status, outcome, learnings, date## Completion - Move to
checkpoints/archive/ - Update
checkpoints/active/INDEX.md - Learnings auto-extracted to
checkpoints/LEARNINGS.md
Validation: Cannot archive checkpoints with active children (use
--force to override).
Fork Detection
When work diverges into parallel streams, offer options:
Strong signals (any one suggests fork):
- User says work is unrelated
- Different issue/ticket involved
- Fundamental context switch
Weak signals (two+ together suggest fork):
- Working in entirely different files
- Scope expanding beyond original intent
- New dependencies unrelated to current work
When detected, present options:
- A) Create separate checkpoint (sets
for lineage)parent - B) Continue with current (expand scope)
- C) Set aside divergent work
Not a fork: Trivial fixes, config changes, supporting changes for main work.
Directory Structure
checkpoints/ ├── active/ │ ├── INDEX.md │ └── chk-*.md ├── archive/ │ └── chk-*.md └── LEARNINGS.md # Accumulated insights from archives
Reference Files
| File | Purpose |
|---|---|
| Checkpoint structure specification |
| INDEX.md structure specification |
| Accumulated learnings from archived checkpoints |
Priority Hierarchy (token pressure)
- Must Keep: Problem, session intent, decisions, current state, next actions
- Should Keep: Recent artifacts, recent play-by-play, technical context, breadcrumbs
- Can Summarize: Older play-by-play, completed artifacts, historical decisions
Quality Self-Check
Before finalizing updates, verify:
- Problem Clarity: Could a fresh agent understand without the conversation?
- Decision Rationale: Is the "why" captured, not just the "what"?
- State Specificity: Concrete progress, not vague status?
- Action Actionability: Can someone execute Next Actions immediately?
- Fresh Agent Test: Loading this cold, would you know exactly what to do?