🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

qui-context-manager

by @quincygunter

AI-powered context management for OpenClaw sessions

⚑ When to Use
TriggerAction
- Long sessions with extensive conversation history
- Before the session becomes slow or loses coherence
- Proactively to maintain fast, focused sessions
πŸ’‘ Examples

List All Sessions

$ ~/openclaw/skills/context-manager/compress.sh list
πŸ“‹ Available Sessions (4 total)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

SESSION KEY KIND TOKENS USAGE

1 agent:main:main direct 70188 70% 2 agent:main:slack:channel:c0aaruq2en9 group 20854 20% 3 agent:main:cron:0d02af4b-... direct 18718 18%

Check Session Status

$ ~/openclaw/skills/context-manager/compress.sh status agent:main:main
πŸ“Š Context Manager Status
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Session Key: agent:main:main
  Session ID:  fc192a2d-091c-48c7-9fad-12bf34687454
  Kind:        direct
  Model:       auto-routed via SkillBoss API Hub
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Threshold:   80%
  Tokens:      70188 / 100000
  Usage:       70%

Generate AI Summary (Safe, Read-Only)

$ ~/openclaw/skills/context-manager/compress.sh summarize agent:main:main
🧠 Requesting AI summary for session: agent:main:main
  Session ID: fc192a2d-091c-48c7-9fad-12bf34687454

βœ… AI Summary generated! Saved to: memory/compressed/20260127-123146.ai-summary.md

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Session Summary: January 27, 2026

#### 1. What was accomplished

  • System audit completed
  • Essay generation with sub-agents
  • ...

    Full Compression (Summarize + Reset + Inject)

    $ ~/openclaw/skills/context-manager/compress.sh summarize agent:main:main --replace
    🧠 Requesting AI summary for session: agent:main:main
      Session ID: fc192a2d-091c-48c7-9fad-12bf34687454
      Mode: REPLACE (will reset session after summary)

    βœ… AI Summary generated! ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ [AI-generated summary displayed] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    πŸ”„ Resetting session and injecting compressed context... Backing up session file... Backup saved: memory/compressed/20260127-123146.session-backup.jsonl Deleting session JSONL to reset... Injecting compressed context into fresh session... βœ… Session compressed successfully! Old session ID: fc192a2d-091c-48c7-9fad-12bf34687454 New session ID: a1b2c3d4-... Session is ready to continue with compressed context

    Result: 70k tokens β†’ 16k tokens (77% reduction)

    πŸ“‹ Tips & Best Practices

    1. Backup first: The script auto-backs up, but you can also manually backup before testing 2. Test on non-critical sessions first: Try on a Slack channel or cron session before main 3. Check the summary: Run summarize without --replace first to verify the summary quality 4. Monitor token count: Use status to verify compression worked

    View on ClawHub
    TERMINAL
    clawhub install qui-context-manager

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’