Loading...
Loading...
Clear conversation context while preserving knowledge via context marker. Use when user says "clear context", "start fresh", "done with this task", or when approaching token limits.
npx skill4agent add dkyazzentwatwa/supernavigator nav-compact📊 Current session: ~[N] messages
Compacting will:
- Create marker with current state
- Clear conversation history
- Free up ~[X]k tokens for new work
Continue? [Y/n]:nav-markerMarker name: before-compact-{YYYY-MM-DD}-{HHmm}
Note: "Auto-created before compact".activeecho "{marker-filename}.md" > .agent/.context-markers/.activenav-start╔══════════════════════════════════════════════════════╗
║ ║
║ 🗜️ Navigator Compact ║
║ ║
╚══════════════════════════════════════════════════════╝
✅ Context marker created:
.agent/.context-markers/{marker-filename}.md
📋 Marker contains:
- Conversation summary (last 15 messages)
- Files you modified
- Technical decisions made
- Current progress & next steps
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔹 TO COMPACT:
Claude Code doesn't allow me to clear the conversation
programmatically. You need to do it manually:
**Method 1: New conversation**
1. Start a new conversation
2. Say "load my context" or "start my session"
3. I'll detect the active marker and restore your state
**Method 2: /clear command** (if available)
1. Type /clear
2. Say "load my context"
3. Active marker will be restored
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 Your progress is saved. You won't lose any context.
Next session:
1. Say "start my session" or run /nav:start
2. I'll detect the marker: "{marker-filename}"
3. Confirm to restore, and you'll be back where you left off
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ls -lh .agent/.context-markers/{marker-filename}.md✅ Marker saved successfully
File: {marker-filename}.md
Size: {X} KB (~{Y} tokens)
Your context is preserved!/clearSession 1:
User: "Clear context"
→ nav-compact creates marker
→ Sets .active file
→ Instructs user how to clear
Session 2 (new conversation):
User: "Start my session"
→ nav-start detects .active file
→ Offers to restore marker
→ User confirms
→ Context restored!User: "Feature complete, clear context for next task"
→ Creates marker: "before-compact-2025-10-16-1430"
→ Captures: Feature implementation details
→ User starts new conversation
→ Restores marker, begins next featureUser: "Context getting full, let's compact"
→ Creates marker: "before-compact-2025-10-16-1500"
→ Preserves: All current work
→ User clears conversation
→ Continues with fresh contextUser: "Done with auth, moving to payments"
→ Creates marker: "auth-feature-complete"
→ Clear context
→ New session: Fresh start for payments
→ Can restore auth marker later if needed❌ Failed to create marker
Cannot compact without preserving context.
Fix marker creation first.⚠️ Very little context (< 10 messages)
Compacting now won't save much. Consider:
- Continue working
- Compact after more progress
Continue anyway? [y/N]:⚠️ Active marker already exists:
.agent/.context-markers/.active
This means you have an unrestored marker from previous compact.
Options:
1. Load that marker first (recommended)
2. Overwrite with new marker
3. Cancel compact
Your choice [1-3]:.active/nav:compact