
Description
Views or sets the project's memory-extraction policy (what Mem0 remembers vs ignores) stored in mem0.md. Use when the user says set a memory policy, custom instructions, what should mem0 remember, tell mem0 to ignore X, or asks to see/change the current instructions.
SKILL.md
Mem0 Policy
The project's memory policy lives in a ## Instructions section of mem0.md at
the repo root. It is version-controlled and shared by the whole team, and it maps
to Mem0's custom_instructions (what to extract / ignore). An optional
## Agent Instructions section maps to agent_custom_instructions (guidance for
agent-scoped memories only).
The policy takes effect on the next session (mem0.md is re-parsed on SessionStart) and is applied automatically on the plugin's memory writes.
Execution
Step 1: Determine intent from the argument
/mem0:policy is invoked as /mem0:policy [<subcommand>] <text>:
| Argument | Action |
|---|---|
(none) or show | Show the current policy |
set <text> or free text | Set/replace the ## Instructions (custom) policy |
agent <text> | Set/replace the ## Agent Instructions policy |
clear | Remove both policy sections |
Step 2: Locate mem0.md
mem0.md sits at the repo root (the current working directory). If it does not
exist yet and the user is setting a policy, you will create it.
Step 3a: Show
Run python3 "$CLAUDE_PLUGIN_ROOT/scripts/parse_mem0_config.py" --key instructions .
and --key agent_instructions . (or read mem0.md directly). Print:
Memory policy for this project (mem0.md):
Instructions: <text, or "(none)">
Agent Instructions: <text, or "(none)">
If mem0.md is absent, say there is no policy yet and offer to set one.
Step 3b: Set / clear
Edit mem0.md, adding or replacing the target section. Keep the instruction a
short prose paragraph (what to remember, what to ignore). Example:
## Instructions
Remember architecture decisions, API contracts, and team conventions.
Ignore transient debugging output, stack traces, and anything resembling a secret.
- Preserve any other existing sections (
## Retention,## Categories, etc.). - If the section already exists, replace its body; otherwise append the section.
- For
clear, delete the## Instructionsand## Agent Instructionssections.
Step 4: Confirm
Updated memory policy in mem0.md.
Takes effect next session. Commit mem0.md to share it with your team.
Remind the user that ## Agent Instructions only affects agent-scoped memories,
so it is a no-op unless memories are written with an agent_id.
More skills from the mem0 repository
View all 24 skillscontext-loader
load project context from Mem0
Jul 13AgentsContextMemorydream
consolidate and prune stored memories
Jul 13AgentsData CleaningMemoryexport
export project memories to Markdown files
Jul 13BackupMemoryMigrationforget
delete outdated or incorrect memories
Jul 13MaintenanceMemoryPrivacyhealth
diagnose Mem0 connectivity and health
Jul 13DebuggingMemoryMonitoringimport
import project memories from Markdown files
Jul 13MarkdownMemoryMigration
More from Mem0
View publisherlist-projects
list projects with stored memories
mem0
Jul 13AgentsMemorymem0
add persistent memory to AI applications
mem0
Jul 13AgentsAI InfrastructureMemorymem0-cli
manage Mem0 memory via command line
mem0
Jul 13AutomationCLIMemorymem0-integrate
integrate Mem0 into repositories
mem0
Jul 13AgentsAPI DevelopmentMemorymem0-oss-to-platform
migrate Mem0 projects to platform
mem0
Jul 13AgentsMemoryMigrationmem0-test-integration
verify Mem0 integration tests
mem0
Jul 13AgentsMemoryQATesting