memory-clean
Installation
SKILL.md
Audit memory for structural rot and staleness, report with evidence, fix only on user confirmation.
Scope
Audits and fixes existing memory files. Does not create new memories from session signals (that is memory-update). Does not redact PII or credentials (that is memory-sanitize, which memory-clean will recommend when it detects suspected credentials at critical severity).
Path resolution
Scripts live under this skill's own scripts/ directory. Resolve the skill root from $HOME (the conventional install path is $HOME/.claude/claude/skills/memory-clean/):
SKILL_SCRIPTS="${MEMORY_CLEAN_SKILL_SCRIPTS:-$HOME/.claude/claude/skills/memory-clean/scripts}"
MEMORY_DIR=$("$SKILL_SCRIPTS/resolve-paths.sh" memory_dir)
SESSION_HISTORY_GLOB=$("$SKILL_SCRIPTS/resolve-paths.sh" session_history_glob)
Set MEMORY_CLEAN_SKILL_SCRIPTS to override when the skill is installed outside $HOME/.claude. Abort on non-zero exit from the resolver. Overrides via MEMORY_DIR / SESSION_HISTORY_GLOB env vars.