
Mem0 Forget
FreeEasily delete specific memories from mem0.
Free · Opens the source repo
What Mem0 Forget does
Mem0 Forget is a skill designed to help users manage their memory storage effectively by allowing them to delete specific memories based on either a search query or a memory ID. This can be particularly useful for developers and designers who may accumulate a lot of temporary or outdated information during their projects. With the ability to clean up sensitive data or incorrect memories, users can maintain a more organized and relevant memory bank.
The process begins with the user providing either a search query or a memory ID. If a memory ID is given, the skill verifies its existence and displays a preview of the memory content. For search queries, it retrieves a list of memories that match the criteria, helping users identify which memories they may want to delete. This ensures that users have a clear understanding of what they are about to remove, minimizing the risk of accidental deletions.
Once the memories are identified, the skill prompts the user for confirmation before proceeding with any deletions. This step is crucial as it prevents unintended loss of data. After receiving confirmation, the skill executes the deletion and provides feedback on the number of memories removed, including any errors encountered during the process.
Additionally, Mem0 Forget includes an undo feature that allows users to revert recent memory additions. This is particularly beneficial for those who may need to quickly rectify mistakes or changes made during their work. Overall, Mem0 Forget is an essential tool for anyone looking to maintain a clean and efficient memory system in their mem0 environment.
When to use it
Use this skill when you need to delete specific memories, whether they are outdated decisions, sensitive data, or simply clutter from experiments.
When not to use it
This skill is not suitable for bulk deletions without user confirmation, as it focuses on specific memory management rather than mass removal.
What you can build with it
Cleaning Up After Experiments
After running tests or experiments, use Mem0 Forget to remove any outdated or irrelevant memories that clutter your memory storage.
Removing Sensitive Data
If you've stored sensitive information that needs to be deleted for privacy reasons, this skill allows you to do so securely.
Undoing Recent Changes
If you've made recent additions to your memory and need to revert them, use the undo feature to quickly remove those entries.
How to install Mem0 Forget
View source1. Install with the skills CLI
npx skills add mem0ai/mem0/forget --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by mem0aiMem0 Forget
Delete specific memories from mem0.
Execution
Step 1: Parse input
The user provides either:
- A search query:
/mem0:forget auth module decisions - A memory ID:
/mem0:forget <memory_id>
If no argument, ask: "What should I forget? Provide a search query or memory ID."
Step 2: Find memories
If memory ID provided (looks like a UUID or hex string):
- Call
get_memorywith the ID to verify it exists. - Show:
Found: "<memory content first 120 chars>" (created <date>)
If search query provided:
- Call
search_memorieswith:query=<user's query>filters={"AND": [{"user_id": "<active_user_id>"}, {"app_id": "<project_id>"}]}top_k=10
- Show numbered list:
Found <N> memories matching "<query>": 1. <content, 120 chars> (type: <type>, created: <date>) [ID: <short_id>] 2. ...
Step 3: Confirm
Ask: "Delete which memories? Enter numbers (e.g., 1,3,5), 'all', or 'cancel'."
For a single memory ID, ask: "Delete this memory? [y/N]"
Never delete without confirmation. This is destructive.
Step 4: Delete
For each confirmed memory, call delete_memory with the memory ID.
Step 5: Report
Deleted <N> memories.
If any deletions failed, report which ones and why.
Undo recent writes
If the user says "undo last N memories" or "undo last write":
- Read session stats to get recently written memory IDs:
SCRIPT_DIR="${CLAUDE_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:-${CURSOR_PLUGIN_ROOT:-}}}/scripts" python3 "$SCRIPT_DIR/session_stats.py" peek - Parse the
recent_idsarray from the JSON output. Each entry hasid,category,ts. - Show the last N entries (default 1) and ask for confirmation.
- Delete confirmed entries via
delete_memory.
If recent_ids is empty, tell the user: "No recent memory IDs tracked this session. Try /mem0:tour to browse recent memories, or /mem0:forget <search query> to find specific ones."
Frequently asked questions about Mem0 Forget
Similar skills
PDFtk Server
Command-line tool for comprehensive PDF manipulation.
PDF Processing
Comprehensive tools for manipulating PDF files.
PDF Processing
Comprehensive tools for managing PDF files.
Mac Storage Cleaner
Reclaim disk space safely and transparently on macOS.
PDF Processing
Comprehensive tools for managing PDF files.
Screenshot Capture
Capture screenshots across different platforms easily.
