Thomaszhou22

Memory Checkup — Security skill for Claude Code

Security community

Audit and repair an AI agent's memory corpus for consistency: stale numbers, dangling references, dead daily flushes, orphan files.

How to install Memory Checkup

This entry records only its repository, not the path inside it, so there is no exact command to give. Open Thomaszhou22/memory-checkup and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Memory Checkup does

Audit and repair an AI agent's memory corpus for consistency: stale numbers, dangling references, dead daily flushes, orphan files.

Alternatives in Security

  • Skill Audit — Audit codebases for quality, consistency, and broken patterns — use for pre-release or tech debt review 2.8k ★
  • Openclaw Ops — OpenClaw operations skill with health checks, repair scripts, watchdogs, update triage, and security scans 225 ★
  • Reflexion — Audit and optimize the .claude/ ecosystem — skills, hooks, guides, patterns, agents, and settings — for qualit 224 ★

README

Memory Checkup

**Audit and repair an AI agent's memory corpus for consistency.**

[English](./README.md) | [中文](./README_CN.md)


Agents that keep long-term memory (OpenClaw, Claude Code with memory files, or any agent with a `MEMORY.md` + `memory/` structure) accumulate drift: a metric changes on Monday, three files still say the old value on Friday; a daily flush job silently dies; a path referenced in memory no longer exists. Nobody notices until the agent confidently states a stale fact.

Memory Checkup scans the whole corpus and surfaces that drift before it reaches the user.

What it detects

Check Meaning
Stale numbers Same metric (downloads / GitHub stars / user counts) appearing with an old value in some files while newer files carry a newer value
Dangling references File paths mentioned in memory that no longer exist on disk
Stale entries Gaps in date-named daily logs near the newest entry (a flush job may have died)
Orphan files Non-dated memory files never referenced from anywhere else

Quick start

git clone https://github.com/Thomaszhou22/memory-checkup.git
python3 memory-checkup/scripts/memory_checkup.py --memory-dir /path/to/agent/workspace

Add `--json` for machine-readable output, e.g. to pipe into a cron or a gateway hook.

The script is **read-only**. Fixing is deliberately left to the agent and the user: for every stale number, confirm the current value against live evidence first, then update or annotate the old mentions as superseded.

Using as an OpenClaw / Claude Code skill

Copy or symlink this folder into your skills directory. The `SKILL.md` frontmatter triggers on requests like "check my memory", "memory audit", "体检记忆", and on risky recall situations (metrics recorded over many days).

Agent workflow defined by the skill:

  1. Locate the corpus (workspace with MEMORY.md / memory/)
  2. Run the audit script
  3. Verify each finding with the user or live evi