/cleanup
Remove mem9-managed Codex files before reinstalling, resetting, or uninstalling mem9.
Claude Code
$ npx -y skills add mem9-ai/mem9 --skill cleanup --agent claude-code
Codex
$ npx skills add mem9-ai/mem9 --skill cleanup -a codex -y
Cursor
$ npx skills add mem9-ai/mem9 --skill cleanup -a cursor -y
Gemini CLI
$ npx skills add mem9-ai/mem9 --skill cleanup -a gemini-cli -y
GitHub Copilot
$ npx skills add mem9-ai/mem9 --skill cleanup -a github-copilot -y
OpenCode
$ npx skills add mem9-ai/mem9 --skill cleanup -a opencode -y
Windsurf
$ npx skills add mem9-ai/mem9 --skill cleanup -a windsurf -y
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.
Other skills on mem9.
More skills from other plugins.
paddleocr-doc-parsing
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
13c-metabolic-flux
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…
Questions about cleanup.
- Which coding agents can use cleanup?
- cleanup installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

