mem0-forget

Deletes mem0 memories by search query or memory ID with confirmation prompts.

1|Updated Jan 13, 2022
One-click install
npx skills add https://github.com/jayho-k/TIL --skill mem0-forget-jayho-k
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mem0-forget
Source: https://github.com/jayho-k/TIL/tree/main/AI/mem0/code/mem0_code_analize/mem0/integrations/mem0-plugin/.opencode-plugin/opencode-skills/mem0-forget
Command: npx skills add https://github.com/jayho-k/TIL --skill mem0-forget-jayho-k

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Removing outdated, incorrect, or sensitive memories from a mem0 store requires careful lookup and confirmation to avoid accidental data loss, which this Skill handles through a guided deletion workflow. ## Core Features & Use Cases - Query-Based Deletion: Search memories by natural language query, review a numbered list of matches, and select which entries to delete. - Direct ID Deletion: Delete a specific memory by its ID after verifying its content and creation date. - Session Undo: Undo the most recent memory writes from the current session using the MEM0_SESSION_ID environment variable. - Use Case: After an experiment stores incorrect architecture decisions in mem0, run a search for the relevant topic, review the matched memories, confirm the selection, and remove only the wrong entries. ## Quick Start Ask the assistant to forget memories matching a topic, for example: delete the memories about the old authentication module decisions.

Frequently Asked Questions about mem0-forget

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I delete memories from mem0 by search query?

Provide a search query and the skill calls search_memories with user_id and app_id filters, returning up to 10 matches as a numbered list. You then confirm which entries to delete by number, all, or cancel before any deletion occurs.

How to undo recently added memories in mem0?

Say undo last N memories and the skill reads the MEM0_SESSION_ID environment variable, searches memories tagged with that session ID, sorts them by creation time, and deletes the confirmed entries. If no session ID is set, it suggests browsing or searching instead.

Does mem0 deletion require confirmation before removing memories?

Yes, deletion always requires explicit confirmation. For search results you enter item numbers, all, or cancel; for a single memory ID you answer a yes/no prompt. The skill never deletes without this step because the operation is destructive.

What happens if a mem0 memory ID does not exist?

The skill first calls get_memory to verify the ID exists and displays the memory content and creation date. If the lookup fails or a deletion fails, it reports which memories could not be deleted and why.

Why is markdown not used in mem0-forget output?

The OpenCode TUI renders text verbatim, so markdown syntax like bold, headers, and tables appears as raw characters. The skill outputs plain text with indentation and dashes for lists instead.