/cleanup
Remove mem9-managed Codex files before reinstalling, resetting, or uninstalling mem9.
$ npx -y skills add mem9-ai/mem9 --skill cleanup --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/cleanup
Context preview
The summary Claude sees to decide when to auto-load this skill.
Remove mem9-managed Codex files before reinstalling, resetting, or uninstalling mem9.
SKILL.md
cleanup.SKILL.mddescription: Remove mem9-managed Codex files before reinstalling, resetting, or uninstalling mem9.
context: fork
allowed-tools:
- Bash
- Read
Mem9 Cleanup
Resolve `./scripts/cleanup.mjs` relative to this skill directory.
If you need the current CLI surface, flags, or examples, run `node ./scripts/cleanup.mjs --help` first. Use command-specific help when needed, for example `node ./scripts/cleanup.mjs run --help`.
Run this workflow:
1. Inspect the current cleanup targets first:
set -euo pipefail
node ./scripts/cleanup.mjs inspect
2. Use the JSON summary to confirm whether cleanup should cover only global Codex files or the current project's local override too. 3. Remove mem9-managed global Codex files with:
set -euo pipefail
node ./scripts/cleanup.mjs run
4. When the current repository's local override should be removed too, run:
set -euo pipefail
node ./scripts/cleanup.mjs run --include-project
Common flags:
- `inspect`
- `run`
- `--include-project`
- `--cwd <repo-root>`
`run` removes mem9-managed entries from `$CODEX_HOME/hooks.json`, `$CODEX_HOME/mem9/hooks/`, `$CODEX_HOME/mem9/install.json`, `$CODEX_HOME/mem9/config.json`, and `$CODEX_HOME/mem9/state.json`. `run --include-project` also removes `<project>/.codex/mem9/config.json`.
Keep `$MEM9_HOME/.credentials.json`, `$CODEX_HOME/config.toml`, and mem9 debug logs untouched. Do not print API keys or credential file contents.
Read more
description: Remove mem9-managed Codex files before reinstalling, resetting, or uninstalling mem9. context: fork allowed-tools: - Bash - Read
Mem9 Cleanup
Resolve `./scripts/cleanup.mjs` relative to this skill directory.
If you need the current CLI surface, flags, or examples, run `node ./scripts/cleanup.mjs --help` first. Use command-specific help when needed, for example `node ./scripts/cleanup.mjs run --help`.
Run this workflow:
1. Inspect the current cleanup targets first:
set -euo pipefail node ./scripts/cleanup.mjs inspect
2. Use the JSON summary to confirm whether cleanup should cover only global Codex files or the current project's local override too. 3. Remove mem9-managed global Codex files with:
set -euo pipefail node ./scripts/cleanup.mjs run
4. When the current repository's local override should be removed too, run:
set -euo pipefail node ./scripts/cleanup.mjs run --include-project
Common flags:
- `inspect`
- `run`
- `--include-project`
- `--cwd <repo-root>`
`run` removes mem9-managed entries from `$CODEX_HOME/hooks.json`, `$CODEX_HOME/mem9/hooks/`, `$CODEX_HOME/mem9/install.json`, `$CODEX_HOME/mem9/config.json`, and `$CODEX_HOME/mem9/state.json`. `run --include-project` also removes `<project>/.codex/mem9/config.json`.
Keep `$MEM9_HOME/.credentials.json`, `$CODEX_HOME/config.toml`, and mem9 debug logs untouched. Do not print API keys or credential file contents.
Repo: mem9-ai/mem9
Other skills on mem9.
- /recall
Use when the current request needs relevant memories from Mem9.
Open skill - /setup
Use when Mem9 needs to be initialized, repaired, or checked in this Claude Code environment.
Open skill - /store
Use when the user explicitly asks Claude to remember one fact, preference, or instruction in Mem9.
Open skill - /recall
Recall mem9 memories when the user explicitly asks for stored context.
Open skill - /setup
Inspect and configure mem9 for Codex through the single setup entrypoint.
Open skill - /store
Store one user-approved fact, preference, or instruction in mem9.
Open skill

