Skip to main content
prompt GP ChatGPT

memory_edit — Claude Code prompt: what it does, how to install

The memory_edit prompt for Claude Code and ChatGPT edits or deletes saved memory only after a direct request in the current message. It searches for the entry before changing it.

Apache-2.0 ★ 9,488 updated 2026-11-16

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/memory_edit.md
Open on GitHub

What memory_edit does

The prompt changes or removes a single existing memory entry only when the user explicitly requests that action in the current message. It calls memory_search first and takes a stable ID from the latest results; a new search replaces the earlier candidates. When several entries match, the quote must include the exact ID. Otherwise, the prompt narrows the search to one entry or asks the user to identify it.

For an edit, quote holds the user’s exact words from the current message, while content supplies the replacement text. Keywords can be replaced too. Successful changes appear in the result card and can be undone. Passwords, codes, and card numbers must never be stored.

What it helps with

  • edit one memory entry after a direct request
  • remove a chosen entry without guessing its ID
  • replace an entry’s text and optionally its keywords
  • undo a successful memory change

Example prompts for the agent

  • Update my saved note about my code editor: I now use Neovim.
  • Delete the saved note about my old address.
  • Replace the text for ID mem_123 with “I prefer concise answers”.

How to install memory_edit

Manually: put the files in place

.claude/commands/memory_edit.md

Questions about memory_edit

How do I install memory_edit in Claude Code?

Save the prompt file at .claude/commands/memory_edit.md.

What does memory_edit do?

It edits or deletes one existing memory entry after a direct user request. First, it calls memory_search and uses a stable ID from the latest results.

What does memory_edit need to work?

It needs memory_search to find an entry and retrieve its stable ID. The prompt forbids storing passwords, codes, or card numbers.

Source text

memory_edit.md · Apache-2.0
Update or delete one existing memory only when the current user message explicitly asks for that change. Call memory_search first and use an exact stable id from its latest result set; a new search replaces the previous candidates. If the latest search returns multiple entries, quote must contain the exact stable id, otherwise narrow the search to one entry or ask the user to specify that id; never guess. quote must be the exact current user words requesting the update or deletion, not a previous turn. For update, content is the replacement and optional keywords replace the old keywords. Every successful change appears in the result card and can be undone. Never store passwords, codes or card numbers.

© wangzan101 · Apache-2.0 · wangzan101/Mika

Similar prompts

All prompts for Agent setup: memory, context, orchestration →

From the same set132

The whole set →
ask_user The ask_user Claude Code prompt asks for missing details or a decision. Short answer choices appear as buttons. GP ChatGPT ★ 9,488repo stars inline-screen inline-screen — a prompt for Claude Code and ChatGPT that guides agents through handling differential screen updates after UI actions. GP ChatGPT ★ 9,488repo stars phone_app_after_task The phone_app_after_task Claude Code prompt marks whether a phone app should stay open or close when a task ends. Apps playing sound or video close by default. GP ChatGPT ★ 9,488repo stars memory_save memory_save — a prompt for Claude Code and ChatGPT saves user instructions and preferences for later tasks. It triggers on phrases like "remember this" or "always do it this way". GP ChatGPT ★ 9,488repo stars phone_add_calendar_event phone_add_calendar_event — a prompt for Claude Code opens the calendar app new-event screen on a virtual phone display. GP ChatGPT ★ 9,488repo stars type_text The type_text Claude Code prompt enters text into a chosen field. It can submit the field and check what appeared there. GP ChatGPT ★ 9,488repo stars phone_share_text phone_share_text — a prompt for Claude Code and ChatGPT sends text into an installed Android app by package name. It opens the target app share screen on the phone virtual display with the text prefilled. GP ChatGPT ★ 9,488repo stars app_classifier The app_classifier prompt for Claude Code and ChatGPT assigns Android apps to categories based on their main purpose. Give it app labels and package names to get a JSON classification. GP ChatGPT ★ 9,488repo stars

Project sponsors

Companies that keep this analytics open