dylanbaker24

Memory Hygiene

AI 智能体v1.0.0
作者:dylanbaker24更新于 2026-05-17memory-hygiene@clawhub_dylanbaker24/memory-hygiene
上下文管理记忆增强

据 AlphaMoat 统计,截至 2026-10,Memory Hygiene 累计下载 46,428 次、获 28 个星标,按累计下载量在本次参与排名的 10,914 个 AI 技能中排名第 540 位,在「AI 智能体」分类(1,632 个)中排名第 106 位。

列表默认按累计下载量排序,也可按星标排序;详情页排名按累计下载量计算。

累计下载
4.6万
星标
28
全站下载量排名
#540
全站前 5% · 「AI 智能体」前 7%
平台累计下载星标评论
ClawHub ↗2.7万20-
SkillHub ↗4.6万28—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

针对 LanceDB 里的向量记忆做审计、清理与优化,解决记忆里堆满垃圾、自动召回把无关内容带进上下文、token 消耗偏高的问题。它指出垃圾的主要来源是 autoCapture: true,并区分该留的偏好、关键决策与重要事实。

资料发布于 2026-10-27

可以用来做什么

  • 删掉记忆里重复和无关的条目
  • 把自动捕获调成有选择的写入

什么时候用

  • 回答质量被无关召回拖累时
  • 上下文开销明显上升时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

审计我的记忆库,列出可以删的条目
自动捕获太吵了,帮我收紧写入规则

月度数据趋势

累计下载4.6万
2.3万3.6万4.8万2026-05 · 累计下载 2.5万2026-07 · 累计下载 2.7万2026-08 · 累计下载 2.7万2026-09 · 累计下载 2.9万2026-10 · 累计下载 4.6万26-0526-0926-10
星标28
2326282026-05 · 星标 232026-07 · 星标 272026-08 · 星标 282026-09 · 星标 282026-10 · 星标 2826-0526-0926-10

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。 该技能有同名的其他版本,调整前的数据归属当前下载量最大的这一个。

月份累计下载环比星标
2026-104.6万—28
2026-092.9万—28
2026-082.7万+1.1%28
2026-072.7万—27
2026-052.5万—23

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

1.9 KB · ClawHub v1.0.0
---
name: memory-hygiene
description: Audit, clean, and optimize Clawdbot's vector memory (LanceDB). Use when memory is bloated with junk, token usage is high from irrelevant auto-recalls, or setting up memory maintenance automation.
homepage: https://github.com/xdylanbaker/memory-hygiene
---

# Memory Hygiene

Keep vector memory lean. Prevent token waste from junk memories.
展开全部(共 83 行)
## Quick Commands

**Audit:** Check what's in memory
```
memory_recall query="*" limit=50
```

**Wipe:** Clear all vector memory
```bash
rm -rf ~/.clawdbot/memory/lancedb/
```
Then restart gateway: `clawdbot gateway restart`

**Reseed:** After wipe, store key facts from MEMORY.md
```
memory_store text="<fact>" category="preference|fact|decision" importance=0.9
```

## Config: Disable Auto-Capture

The main source of junk is `autoCapture: true`. Disable it:

```json
{
  "plugins": {
    "entries": {
      "memory-lancedb": {
        "config": {
          "autoCapture": false,
          "autoRecall": true
        }
      }
    }
  }
}
```

Use `gateway action=config.patch` to apply.

## What to Store (Intentionally)

✅ Store:
- User preferences (tools, workflows, communication style)
- Key decisions (project choices, architecture)
- Important facts (accounts, credentials locations, contacts)
- Lessons learned

❌ Never store:
- Heartbeat status ("HEARTBEAT_OK", "No new messages")
- Transient info (current time, temp states)
- Raw message logs (already in files)
- OAuth URLs or tokens

## Monthly Maintenance Cron

Set up a monthly wipe + reseed:

```
cron action=add job={
  "name": "memory-maintenance",
  "schedule": "0 4 1 * *",
  "text": "Monthly memory maintenance: 1) Wipe ~/.clawdbot/memory/lancedb/ 2) Parse MEMORY.md 3) Store key facts to fresh LanceDB 4) Report completion"
}
```

## Storage Guidelines

When using memory_store:
- Keep text concise (<100 words)
- Use appropriate category
- Set importance 0.7-1.0 for valuable info
- One concept per memory entry

「AI 智能体」分类下的热门技能

dylanbaker24 的其他技能

数据月份:2026-10 · 下载/星标数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。