Memory Health Score
v1.0.0Provides a comprehensive score (0-100) evaluating the Agent's memory system health across completeness, freshness, structure, density, and consistency.
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
The name/description describe a memory health scorer and the included check-health.mjs performs exactly that: reads workspace files (MEMORY.md, memory/*.md, memory/INDEX.md, .issues, HEARTBEAT.md), computes scores, prints JSON, and writes memory/health-score.json. Required envs/binaries are none (code optionally uses OPENCLAW_WORKSPACE), which is proportionate to the stated purpose. Minor note: SKILL.md and agent-amnesia-guide reference auto-repair actions and dashboard UI, but the shipped script only computes and writes a score — it does not perform the automatic fixes or UI integration.
Instruction Scope
Runtime instructions are narrowly scoped to inspecting and scoring files inside the agent workspace and scheduling runs with openclaw cron. They do not attempt to read unrelated system files or network endpoints. However SKILL.md describes automatic repair flows (compression, index rebuild, task cleanup) and one-click dashboard fixes; those are advisory and not implemented by check-health.mjs. The agent-amnesia-guide references other scripts (e.g., rebuild-index.mjs, dedup.mjs) which are not present in this package — callers should not assume auto-fix behavior exists.
Install Mechanism
No install spec — instruction-only with a single utility script. No downloads, package installs, or external installers are present, so nothing additional would be fetched or executed beyond the included Node script.
Credentials
The skill requests no credentials or configuration paths. The script optionally uses OPENCLAW_WORKSPACE (defaulting to cwd) to locate files and writes memory/health-score.json inside that workspace — this is reasonable for a health-checking tool. There are no requests for unrelated secrets or cloud credentials.
Persistence & Privilege
always: false and no special privileges requested. The skill will run only when invoked (user-invocable or agent-initiated under normal autonomous-invocation rules). It writes a report file to the workspace (expected behavior) but does not modify other skills or global agent configuration.
Assessment
This skill appears coherent and limited to reading/writing files in the agent workspace and producing a JSON health report — it does not make network calls or ask for credentials. Before installing or enabling autonomous runs: 1) review check-health.mjs to confirm its filesystem targets are acceptable (it will read MEMORY.md, memory/*.md, .issues, HEARTBEAT.md and write memory/health-score.json); 2) be aware SKILL.md mentions automatic repair and dashboard UI, but those are not implemented in the provided script — do not assume the skill will auto-modify your memory files; 3) if you plan to run it on a sensitive workspace, run it first in an isolated session or inspect the repo for any additional repair scripts it references; 4) consider whether you want the agent to invoke this autonomously (normal default) or only run it manually via the cron command.Like a lobster shell, security has layers — review code before you run it.
latest
Memory Health Score — 记忆健康度评分
概述
一个总分让用户快速判断 Agent 记忆系统健康状况。
评分维度 (总分 100)
1. 完整性 (30分)
- MEMORY.md 存在且有内容 (10分)
- memory/INDEX.md 存在 (5分)
- 近 7 天有日志文件 (10分)
- P0 标记使用率 (5分) — 至少 3 个 P0 项
2. 新鲜度 (25分)
- 今日日志已创建 (10分)
- MEMORY.md 最近 7 天内更新 (10分)
- INDEX.md 最近 3 天内更新 (5分)
3. 结构化 (20分)
- 任务系统 (.issues/) 存在 (10分)
- 至少 3 个 open issue (5分)
- 心跳配置正确 (5分)
4. 密度 (15分)
- MEMORY.md 行数 50-500 (10分) — 太少=信息不足,太多=需压缩
- 日志文件平均长度 20-200 行 (5分)
5. 一致性 (10分)
- INDEX.md 与 MEMORY.md 项目一致 (5分)
- issue 文件与 INDEX.md 一致 (5分)
健康等级
| 分数 | 等级 | 状态 | 建议 |
|---|---|---|---|
| 90-100 | 🟢 优秀 | 记忆系统运转良好 | 保持当前节奏 |
| 70-89 | 🟡 良好 | 基本健康,有改进空间 | 检查低分项 |
| 50-69 | 🟠 警告 | 存在明显问题 | 立即优化 |
| 0-49 | 🔴 危险 | 记忆系统失效 | 紧急修复 |
使用方法
# 运行评分
openclaw cron add --name "memory-health-check" \
--cron "0 9 * * *" --tz "Asia/Shanghai" \
--session isolated --agent main \
--message "运行记忆健康度评分,生成报告并更新 memory/health-score.json"
输出格式
{
"timestamp": "2026-03-01T09:00:00Z",
"totalScore": 85,
"grade": "良好",
"dimensions": {
"completeness": { "score": 28, "max": 30, "issues": ["缺少 P0 标记"] },
"freshness": { "score": 25, "max": 25, "issues": [] },
"structure": { "score": 15, "max": 20, "issues": ["open issue 不足"] },
"density": { "score": 12, "max": 15, "issues": ["MEMORY.md 过长"] },
"consistency": { "score": 5, "max": 10, "issues": ["INDEX 与 MEMORY 不一致"] }
},
"recommendations": [
"添加更多 P0 标记到 MEMORY.md",
"创建至少 3 个 open issue",
"压缩 MEMORY.md,移除过时信息"
]
}
自动修复建议
评分 <70 时,自动触发:
- 记忆压缩 — 合并重复内容
- 索引重建 — 同步 INDEX.md
- 任务清理 — 关闭过期 issue
集成到 AgentAwaken
在 Dashboard 显示:
- 大号分数 (85/100)
- 彩色进度条
- 各维度雷达图
- 一键修复按钮
Comments
Loading comments...
