skills/hmem-wipe/SKILL.md
Prepare for conversation context clear (/clear): save high-value knowledge, update project Next Steps, then instruct user to type /clear for automatic context restoration. Invoke when the user wants to clear the conversation window — not when deleting data/entries. Triggers: "/wipe", "clear context", "wipe context", "context is full/too big/getting large", "prepare for /clear", "start fresh", "context cleanup", approaching token limit. Do NOT invoke for: deleting hmem entries, clearing terminal output, cleaning up nodes/duplicates.
npx skillsauth add Bumblebiber/hmem hmem-wipeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Follow these steps in order.
Check checkpointMode in hmem.config.json to decide what to do:
The Haiku subagent already extracts L/D/E entries every 20 exchanges automatically. Skip manual writes unless you have specific high-value knowledge that:
If nothing qualifies, proceed directly to Step 2.
Manually save unsaved insights from this project context:
write_memory(prefix="L", ...)append_memory(id="P00XX.7", ...) (Protocol node)write_memory(prefix="D", ...)write_memory(prefix="E", ...)Skip if the last checkpoint was fewer than 5 messages ago.
Redundant writes waste tokens and create duplicates that clutter memory.
Auto-checkpoints already call read_memory to deduplicate before writing —
manual writes during wipe bypass that check and risk creating noise.
Before clearing context, ensure the active project's "Next Steps" section is up to date. This is critical for session handoff — after /clear, the next session (or restored context) needs to know what to work on next.
read_memory(id="P00XX") at depth 2 to list L2 children,
then identify the "Next Steps" node by title (seq may vary per project).read_memory(id="P00XX.N") where N is the Next Steps seq.write_memory(id="P00XX.N", content="...") with:
update_memory(id="P00XX.N.M", irrelevant=true) for
each L3 child under Next Steps that has been fully completed. This keeps the section clean
for the next session — irrelevant nodes are hidden from load_project output.Skip if Next Steps is already current (updated within the last few exchanges).
O-entries are auto-logged by the Stop hook — every exchange is already saved
to the active project's O-entry. No need to manually create O-entries or call
flush_context for conversation history.
Reply with exactly:
Context ready for clear. Type
/clear— the SessionStart hook will automatically restore your project context.
Do NOT attempt to run /clear yourself — it is a built-in CLI command only the user can execute.
Context is restored automatically by the SessionStart[clear] hook — no
agent action needed after /clear. Do NOT call load_project or read_memory
during or after this skill; the next session's first UserPromptSubmit hook will
trigger the normal hmem-read flow with a verified active project ID.
The hook:
tools
Update flow for its-over-9k (hmem). Runs `npm update -g`, syncs skills, applies migrations, verifies hooks, shows the changelog. Use when the user asks to update/upgrade hmem, o9k, o9k-mcp, or its-over-9k (any language), or when the startup version-check flags a new release. Runs the npm update itself — don't assume it's already done.
development
Mandatory entry point for every Cortex session — invoke at conversation start, after /clear, and after any load_project call. All stable context (H-entries, projects, device, sync) is pre-injected by the hook — no read_memory(mode='essentials') needed. Surfaces pending git work, Next Steps + open T-tasks, and runs the O-entry routing check.
tools
Curate an .hmem file (your own or foreign) — mark obsolete/irrelevant, fix titles, consolidate duplicates, repair broken links. **Requires the `hmem-curate` MCP server** (skill prompts the user to enable it on entry). Use whenever the user says 'aufräumen', 'memory aufräumen', 'Speicher aufräumen', 'hmem aufräumen', 'clean up memory', 'tidy up hmem', 'curate memory', 'consolidate duplicates', 'merge duplicate entries', 'fix broken links', 'kümmer dich um die Memory', or invokes /o9k-curate. Also trigger when `memory_health()` flags BLOCKER/WARNING issues, when a P-entry's load_project output exceeds 4k tokens (session-start noise check defers to this skill), or before any batch cleanup of L, E, D, P entries. Skipping this skill and editing memory directly bypasses health checks, severity triage, and obsolete-chain integrity — never curate without it.
testing
Add a new rule and place it correctly — decide between a cross-project R-entry and a project-specific subnode under the active project's Rules section. Use whenever the user says 'neue Regel', 'Regel hinzufügen', 'new rule', 'add a rule', or invokes /o9k-new-rule. Critical safeguard: project-specific rules placed as R-entries pollute the session-start Rules listing across every project — get the scope right BEFORE writing.