persistent-memory-hygiene
Persistent-memory-hygiene maintains structured memory logs across OpenClaw sessions by organizing daily notes in timestamped files and curating long-term insights in a central MEMORY.md document. Use this skill at session end to document completed tasks, in-progress work, decisions made, and next steps, then update metadata tracking memory hygiene metrics. The skill also provides automated cleanup via scheduled cron wakeups at 11pm to prevent duplicate session closures.
git clone --depth 1 https://github.com/ArchieIndian/openclaw-superpowers /tmp/persistent-memory-hygiene && cp -r /tmp/persistent-memory-hygiene/skills/openclaw-native/persistent-memory-hygiene ~/.claude/skills/persistent-memory-hygieneSKILL.md
# Persistent Memory Hygiene State file: `~/.openclaw/skill-state/persistent-memory-hygiene/state.yaml` ## Memory Structure ``` memory/ YYYY-MM-DD.md # Daily notes - raw, comprehensive MEMORY.md # Long-term - curated, distilled ``` ## When to Write Write to memory/YYYY-MM-DD.md when: - Completing a significant task - Making a decision with reasoning - Encountering a notable error and its fix - At checkpoints on long tasks Write to MEMORY.md when: - Something is worth remembering across months - A user preference has been established - A pattern has been confirmed ## Session Closing Routine ``` ## [HH:MM] Session End - Completed: [what was finished] - In progress: [what was started] - Next: [what to do next session] - Decisions: [choices made and why] ``` After writing, update state: `last_cleaned_at`, `memory_line_count`, `daily_file_count`, `last_daily_file`, `status: done`. ## Hygiene Rules - Daily files: write raw, append-only, never edit old entries - MEMORY.md: review periodically, remove stale entries, keep under 500 lines ## Cron Wakeup Behavior On 11pm wakeup: - Read state file - If `last_cleaned_at` is today's date: skip (already ran) - Otherwise: run Session Closing Routine, update state
Syncs agent daily memory and MEMORY.md to an Obsidian vault so notes are human-browsable. Use nightly or on demand.
Structured ideation before any implementation. Use when starting any non-trivial task.
Scaffolds and validates new superpowers skills. Use when creating a new skill for this repository.
Executes plans task-by-task with verification. Use when implementing a plan.
Triggers a secondary verification pass for any agent output containing factual claims, numbers, dates, or named entities before the output is acted on
Crawls a new codebase to infer stack, conventions, and key invariants, then generates a PROJECT.md context file for the agent
Handles PR review feedback by fetching comments, grouping issues, fixing one group at a time, and verifying before replies.
Detects skill name shadowing and description-overlap conflicts that cause OpenClaw to trigger the wrong skill or silently ignore one when two skills compete for the same intent.