
Mem0 Pin
FreeProtect critical memories from pruning during consolidation.
Free · Opens the source repo
What Mem0 Pin does
Mem0 Pin is a specialized skill designed to help users manage their memories effectively by marking them as high-priority. This skill is particularly useful when certain memories are deemed critical and must not be removed during the dream consolidation process. Examples of such memories include architectural decisions, security constraints, or immutable team conventions that are essential for ongoing projects or team dynamics.
The skill operates through a straightforward four-step execution process. First, users can either search for a memory using a query or directly input a memory ID. Once the memory is located, the skill retrieves its current content and metadata. If the memory is to be pinned, it appends a specific marker to the text to indicate its high-priority status. In cases where users wish to pin new memories that are not yet stored, the skill facilitates the addition of this content while also marking it as pinned.
In addition to pinning memories, the Mem0 Pin skill allows users to unpin memories when they are no longer deemed critical. This is done by removing the pin marker from the text, ensuring that the memory can be pruned during future consolidations if necessary. The clear and structured approach of this skill makes it easy for users to maintain control over their most important memories without the risk of accidental loss.
Overall, Mem0 Pin is an essential tool for developers and designers who rely on specific memories to guide their decision-making processes. By ensuring that critical information is preserved, users can maintain a consistent and informed workflow, minimizing the risk of losing valuable insights as they work on their projects.
When to use it
Use Mem0 Pin when you have important memories that must remain accessible and protected from pruning.
When not to use it
This skill is not suitable for general memory management tasks that do not require prioritization or protection.
What you can build with it
Protecting Architectural Decisions
When working on a project, you can pin architectural decisions to ensure they are preserved during memory consolidation.
Maintaining Security Constraints
Use the skill to pin security constraints that are vital for compliance and must not be lost.
Safeguarding Team Conventions
Pin immutable team conventions to keep your team's workflow consistent and informed.
How to install Mem0 Pin
View source1. Install with the skills CLI
npx skills add mem0ai/mem0/pin --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 Pin
Pin a memory to mark it as high-priority and protect from pruning.
Execution
Step 1: Find the memory
The user provides either a search query or memory ID.
If memory ID:
- Call
get_memorywith the ID.
If search query:
- Call
search_memorieswith the query,filters={"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}]},top_k=5. - Show numbered list with content previews.
- Ask: "Which memory to pin? Enter a number."
Step 2: Read current content
Call get_memory with the selected memory ID. Store:
original_text— the memory's text contentoriginal_metadata— the existingmetadatadict
Step 3: Pin it
The MCP update_memory tool only accepts memory_id, text, and source — it
does not accept a metadata parameter. To pin, append a pin marker to the text:
pinned_text = "[PINNED] " + original_text if not original_text.startswith("[PINNED]") else original_text
update_memory(memory_id=<selected_id>, text=pinned_text)
For new memories (user wants to pin text that isn't stored yet):
- Call
add_memorywith:text="[PINNED] <the user's text>"user_id=<active_user_id>app_id=<active_project_id>metadata={"pinned": true, "type": "decision", "confidence": 1.0}infer=False
- The response contains
event_id. Callget_event_status(event_id=<event_id>)once to retrieve the memory ID, then confirm.
Step 4: Confirm
Pinned: "<memory content, first 80 chars>"
Memory ID: <id>
Append ... only if content exceeds 80 characters.
Unpin
If the user says "unpin":
- Call
get_memoryto read current content. - Remove the pin marker from the text:
unpinned_text = original_text.removeprefix("[PINNED] ") update_memory(memory_id=<id>, text=unpinned_text) - Print:
Unpinned: "<content>..."
Frequently asked questions about Mem0 Pin
Similar skills
Napkin
Collaborate visually with Copilot using an interactive whiteboard.
Mode Creator
Custom note-taking modes for claude-mem.
Google Meet Assistant
Join, transcribe, and interact in Google Meet calls.
Memory Keeper
Organize lessons learned into reusable knowledge.
Meeting Minutes
Generate concise, actionable meeting minutes effortlessly.
Brag Sheet
Transform your work into impactful statements for reviews.
