mem0-pin

Pins or unpins mem0 memories to protect them from pruning during dream consolidation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Critical memories such as architecture decisions, security constraints, and team conventions can be removed during automated memory consolidation. This Skill marks those memories as pinned so they survive pruning cycles. ## Core Features & Use Cases - Pin existing memories: Search memories by query or ID, then prepend a [PINNED] marker via the update_memory tool so the protection travels with the memory text. - Pin new content: Store new critical text with add_memory using pinned metadata, then confirm persistence by polling the event status. - Unpin support: Remove the pin marker from a memory when it no longer needs protection. - Use Case: A team records a security constraint like "never log user tokens" and pins it so the memory system never prunes it during consolidation. ## Quick Start Ask the assistant to pin the memory containing the architecture decision about the database schema so it is never pruned.

Frequently Asked Questions about mem0-pin

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

FAQPage Schema
How do I pin a memory in mem0?

Provide a memory ID or search query, and the skill finds the memory with get_memory or search_memories, then calls update_memory to prepend a [PINNED] marker to the text. The marker travels with the memory so pruning logic can detect it.

How do I pin new text that is not stored in mem0 yet?

The skill calls add_memory with the text prefixed by [PINNED], metadata set to pinned true, and infer disabled. It then polls get_event_status with the returned event_id to retrieve the new memory ID and confirm.

Can I unpin a memory in mem0 after pinning it?

Yes. Saying unpin triggers the skill to read the memory with get_memory, strip the [PINNED] prefix from the text, and save the result with update_memory. The memory then becomes eligible for normal pruning again.

What kinds of memories should be pinned in mem0?

Pin memories that must never be removed, such as architecture decisions, security constraints, and immutable team conventions. Routine or temporary memories should remain unpinned so consolidation can prune them normally.

Why does the mem0 pin skill avoid markdown in its output?

The OpenCode TUI renders text verbatim, so markdown syntax like bold markers and table pipes appears as raw characters. The skill uses plain text with indentation and dashes for readable structure instead.