memory-shrink

当 context 使用率超过 75% 时自动存档记忆,释放空间。适用于:用户要求"记忆瘦身"、"清理 context"、或收到 heartbeat 告警时触发。

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 "memory-shrink" with this command: npx skills add martinyyang/memory-shrink

Memory Shrink

当 context 使用率超过阈值时自动存档,释放空间。

触发条件

  • 收到 heartbeat 告警
  • 用户明确要求"记忆瘦身"、"清理 context"
  • session_status 显示 context > 75%

执行流程

1. 检查 context 使用率

运行 session_status 获取 context 比例。

2. 决策

使用率动作
> 90%强制存档,跳过所有其他操作
75-90%存档非必要记忆,继续工作
< 75%正常工作

3. 存档操作

调用 memory_search 查找可删除内容,然后更新 memory 文件。

保留规则

以下内容必须保留

  • 未完成任务的进度
  • 团队成员当前状态
  • 正在进行中的讨论

删除规则

以下内容可删除

  • 已完成任务的详细记录(保留摘要即可)
  • 过时的会话历史
  • 已过期/取消的任务

脚本

参考 scripts/shrink.sh 执行存档。

输出

完成后汇报:

  • 存档了多少内容
  • 当前 context 使用率
  • 是否有待处理任务

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

地藏经药师经智慧

地藏经药师经智慧 - 佛家孝道与救度思想,涵盖地藏本愿、药师十二愿、因果报应、消灾延寿等核心智慧,适用于道德修养、慈悲精神、身心健康

Registry SourceRecently Updated
General

Precision Oncology Zhcn

综合学术文献、流行病学报告、临床与药物指南及临床试验报告,提供关于癌症及其治疗的报告。 基于癌变机制进行详细的分子生物学和组织学分析。 当查询涉及以下内容时加载本技能: - 癌症或肿瘤 - 癌变机制 - 癌症或肿瘤的治疗 典型查询 - 乳腺癌是如何发生的? - 白血病的一线和二线治疗 - CAR-T 疗法治疗胰腺...

Registry SourceRecently Updated
General

hermes-traffic-guardian

Hermes runtime traffic monitoring baseline for opt-in proxy inspection, egress detection, and attestation-aware traffic posture.

Registry SourceRecently Updated
General

Scp Paradigm

Use when analyzing how industry structure drives firm behavior and market performance, assessing market concentration, entry barriers, or competitive dynamic...

Registry SourceRecently Updated