context-compressor
Automated context management for long-running Clawdbot sessions. Detects when context limits approach, compresses old conversation history, and seamlessly transfers to a fresh session.
Оригинален текст · няма потвърден превод на българскиПърво прочетете инструкцията.
Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.
GitHub хранилище- Звезди на репото
- 611
- Лиценз
- Не е посочен. Проверете в репозитория.
- Последна проверка на записа
- Няма посочена дата
Добавете в своя инструмент.
Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.
npx skills add sundial-org/awesome-openclaw-skillsСтраницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.
Откъс от SKILL.md
Началото на файла на автора, без превод.
Context Compressor Skill
Automated context management for long-running Clawdbot sessions. Detects when context limits approach, compresses old conversation history, and seamlessly transfers to a fresh session.
When to Use
- Long coding sessions with extensive context accumulation
- Projects with many iterations and refinements
- When noticing Claude repeating itself or losing track of details
- Proactively before hitting hard context limits
- During heartbeats or idle moments when user isn't actively waiting
How It Works
- Monitoring: Continuously tracks context usage via session metadata
- Compression: When threshold reached (configurable, default 80%), summarizes old messages
- Preservation: Extracts key decisions, code changes, file states, and action items
- Handoff: Initiates new session with compressed context as foundation
- Continuity: User experiences seamless transition with all important context preserved
Key Features
- Smart Summarization: Preserves decisions, code, file states, not just raw text
- Configurable Thresholds: Set when compression triggers (70-90% of context limit)
- Background Operation: Works during heartbeats or low-activity periods
- Selective Retention: Keeps important files, decisions, TODOs; compresses chaff
- Session State Transfer: New session inherits all critical context automatically
Core Concepts
Context Degradation Patterns
As sessions grow long, watch for these signs:
- Repetitive responses ("As I mentioned earlier...")
- Missing references to earlier decisions
- Forgetting file modifications
- Asking to repeat information
- General coherence degradation
Compression Strategy
-
Extract Core Intelligence:
- All decisions made and their rationale
- File paths and their current state
- Pending tasks and their status
- Important code snippets or configurations
- User preferences and patterns
-
Condense History:
- Remove filler, backtracking, dead ends
- Keep only high-signal turns
- Merge related iterations into summaries
- Preserve critical code snippets inline
-
Format for Efficiency:
- Use compact representations
- Reference files rather than dump contents
- List decisions as bullet points
- Include only relevant code context
Usage
Automatic Mode (Recommended)
The skill runs automatically during heartbeats and idle periods. Configure threshold: