跳到正文
Skillpedia
智能体29k · #9484

memory-status

它能做什么

这项技能对 AI 智能体的记忆文件进行快速健康检查。适合想一眼看出记忆是否变得过大或过时的人。

适用场景

  • ✓当你想知道智能体的记忆文件占用了多少空间的时候。
  • ✓当你的智能体似乎忘记了什么或重复自己时。
  • ✓当你在进行更大规模的记忆审查前,想快速查看状态的时候。

技能链接

https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/self-improving-agent/skills/memory-status/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/self-improving-agent/skills/memory-status/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“这个项目的智能体记忆健康吗?请给我一个快速状态。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会统计记忆文件和相关指令文件的行数,列出主题文件,并检查过时的文件引用。然后它会显示一个仪表板和简短建议。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

/si:memory-status — Memory Health Dashboard

Quick overview of your project's memory state across all memory systems.

Usage

/si:memory-status                    # Full dashboard
/si:memory-status --brief            # One-line summary

What It Reports

Step 1: Locate all memory files

# Auto-memory directory
MEMORY_DIR="$HOME/.claude/projects/$(pwd | sed 's|/|%2F|g; s|%2F|/|; s|^/||')/memory"

# Count lines in MEMORY.md
wc -l "$MEMORY_DIR/MEMORY.md" 2>/dev/null || echo "0"

# List topic files
ls "$MEMORY_DIR/"*.md 2>/dev/null | grep -v MEMORY.md

# CLAUDE.md
wc -l ./CLAUDE.md 2>/dev/null || echo "0"
wc -l ~/.claude/CLAUDE.md 2>/dev/null || echo "0"

# Rules directory
ls .claude/rules/*.md 2>/dev/null | wc -l

Step 2: Analyze capacity

Metric Healthy Warning Critical
MEMORY.md lines < 120 120-180 > 180
CLAUDE.md lines < 150 150-200 > 200
Topic files 0-3 4-6 > 6
Stale entries 0 1-3 > 3

Step 3: Quick stale check

For each MEMORY.md entry that references a file path:

# Verify referenced files still exist
grep -oE '[a-zA-Z0-9_/.-]+\.(ts|js|py|md|json|yaml|yml)' "$MEMORY_DIR/MEMORY.md" | while read f; do
  [ ! -f "$f" ] && echo "STALE: $f"
done

Step 4: Output

📊 Memory Status

  Auto-Memory (MEMORY.md):
    Lines:        {{n}}/200 ({{bar}}) {{emoji}}
    Topic files:  {{count}} ({{names}})
    Last updated: {{date}}

  Project Rules:
    CLAUDE.md:    {{n}} lines
    Rules:        {{count}} files in .claude/rules/
    User global:  {{n}} lines (~/.claude/CLAUDE.md)

  Health:
    Capacity:     {{healthy/warning/critical}}
    Stale refs:   {{count}} (files no longer exist)
    Duplicates:   {{count}} (entries repeated across files)

  {{if recommendations}}
  💡 Recommendations:
    - {{recommendation}}
  {{endif}}

Brief mode

/si:memory-status --brief

Output: 📊 Memory: {{n}}/200 lines | {{count}} rules | {{status_emoji}} {{status_word}}

Interpretation

  • Green (< 60%): Plenty of room. Auto-memory is working well.
  • Yellow (60-90%): Getting full. Consider running /si:memory-review to promote or clean up.
  • Red (> 90%): Near capacity. Auto-memory may start dropping older entries. Run /si:memory-review now.

Tips

  • Run /si:memory-status --brief as a quick check anytime
  • If capacity is yellow+, run /si:memory-review to identify promotion candidates
  • Stale entries waste space — delete references to files that no longer exist
  • Topic files are fine — Claude creates them to keep MEMORY.md under 200 lines
常见问题

什么情况会被视为警告?

该技能会根据行数、主题文件和过时条目,把记忆评为健康、警告或严重。

有简短版本吗?

有。简短选项只给出一行摘要。

它会检查哪些文件?

项目记忆文件、它的主题文件、项目指令文件以及规则文件夹。

详情

作者的原始描述

Memory health dashboard showing line counts, topic files, capacity, stale entries, and recommendations. Use when the user runs /si:memory-status or asks how full or healthy the agent memory is.

repo: alirezarezvani/claude-skills

热度

GitHub 星标
29k
排名
#9484
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能