context-shrink

Auto-compress session memories when context usage exceeds 85%

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "context-shrink" with this command: npx skills add bg1avd/context-shrink

Context Shrink Hook

Auto-compresses session memories when context usage exceeds 60% threshold. Cleans up old daily logs and compresses them into MEMORY.md for long-term storage.

Features

  • 自动触发: 当 context 使用率 ≥ 85% 时自动执行
  • 智能清理: 保留最近 3 天的详细日志
  • 压缩存储: 旧日志压缩后写入 MEMORY.md
  • Git 提交: 自动 commit 变更记录

Configuration

CONTEXT_THRESHOLD = 0.85     // 85% 触发阈值
DAYS_TO_KEEP = 3           // 保留最近 N 天日志
MIN_FILES_TO_KEEP = 5      // 至少保留文件数
COMPRESSION_MODEL = 'ollama/qwen2.5:3b'

Changelog

1.0.0

  • Initial release
  • Auto-compression at 60% threshold
  • Git commit on cleanup

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Memory Integration

同步 OpenClaw 记忆文件到共现图和语义向量库,支持增量更新及语义加共现的统一搜索接口。

Registry SourceRecently Updated
General

Short Video Parser

此技能用于解析短视频链接,支持解析抖音、快手、B站等多个主流平台的短视频和图文链接,并能自动提取语音内容转录为文字。适用于需要批量获取视频元数据或将视频内容转为文本的场景时使用此 skill。

Registry SourceRecently Updated
General

web-llm-chat

Chat with web-based LLMs through the Chrome Relay extension. Supports Qwen (chat.qwen.ai) and Kimi (kimi.com) via scripts; more sites may be added. Use for w...

Registry SourceRecently Updated
3050godiao
General

daily_summary

每日工作总结自动生成。根据聊天记录和浏览器历史生成一句话工作总结,定时发送飞书。

Registry SourceRecently Updated