skills/o9k-wipe/SKILL.md
Prep for /clear: save high-value knowledge and update project Next Steps, then prompt the user to clear. Use on /wipe, 'clear/wipe context', 'context is full', or 'start fresh'. Not for deleting hmem entries, clearing terminal output, or cleaning up nodes.
npx skillsauth add Bumblebiber/hmem o9k-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.
Hard gate — must complete before any other step. Wiping context with unfinished local work risks losing track of why those changes exist. The post-clear session has no memory of the chat that produced them.
Scope this check to only the repos the session actually touched — not every repo on the machine. Unrelated work on other projects is not your concern here.
Look back over this session's tool history and identify every file path you've modified (Edit, Write, NotebookEdit, or any Bash commands that wrote to a tracked file). If no files were modified at all, skip Step 0 entirely and proceed to Step 1.
For each unique path, resolve its git repo root:
git -C <path> rev-parse --show-toplevel 2>/dev/null
Dedupe to a set of repo roots. Drop any path that isn't inside a repo.
For each repo root, check status:
git -C <repo-root> status --porcelain
If any repo has non-empty status output:
/clear.Wipe aborted — uncommitted changes in repo(s) you worked on this session. Commit, stash, or discard the listed files first, then re-run /wipe. (If the changes are intentional WIP you want to keep across the wipe, stash them with a clear message:
git stash push -m "WIP: <what + why>".)
Only proceed to Step 1 when every session-touched repo is clean.
Why session-scoped, not whole-machine: other repos may have intentional WIP unrelated to this conversation — those aren't your responsibility to gate on. The risk this guard prevents is losing the why behind changes you just helped make.
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 o9k-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.