mem0-remember 精选
Stores a memory verbatim from user input with appropriate type classification and metadata. Use when the user says remember this, save this, store this, note that, or explicitly asks to record a decision, preference, convention, or learning.
安装方式
cp -r integrations/opencode-plugin/opencode-skills/mem0-remember ~/.claude/skills/mem0-remember把该 skill 目录放进客户端 skills 目录。不同客户端的目录可能不同,Claude Code 默认是 ~/.claude/skills/
/plugin marketplace add mem0ai/mem0⚠️ 该命令形态随客户端版本变化,仅在检测到 .claude-plugin/marketplace.json 时展示;不可用时请用「目录复制」。
https://raw.githubusercontent.com/mem0ai/mem0/b7ad69afda6b6ed030347c66d48a13e4de9dec08/integrations/opencode-plugin/opencode-skills/mem0-remember/SKILL.md下载后另存为 ~/.claude/skills/mem0-remember/SKILL.md。链接锁定采集时的 commit,内容与本站展示一致。
整仓一次性获取:git clone --depth 1 https://github.com/mem0ai/mem0.git
依赖与权限
- 无需 API Key
- 无需联网
- 无外部命令依赖
- 以上为按正文与 frontmatter 自动推断的信号,仅供参考;安装前建议先阅读原文。
SKILL.md 正文
Mem0 Remember
Store a fact or learning directly into mem0.
Execution
Step 1: Extract the content
The user provides the content as an argument: /mem0-remember <text>
If no text was provided, ask: "What should I remember?"
Step 2: Classify the memory
Based on the content, pick the best metadata.type:
| Content signal | Type |
|---|---|
| "we decided...", "always use...", "never..." | decision |
| "X doesn't work because...", "don't try..." | anti_pattern |
| "I prefer...", "use X instead of Y" | user_preference |
| "the convention is...", "we always..." | convention |
| "learned that...", "figured out..." | task_learning |
| setup, env, tooling, config | environmental |
| anything else | task_learning |
Step 3: Store
Call add_memory with:
text="<the user's text>"user_id=<active_user_id>app_id=<active_project_id>metadata={"type": "<classified_type>", "branch": "<active_branch>", "confidence": 1.0, "source": "remember_command"}infer=False
infer=False because the user stated the fact explicitly — no extraction needed.
confidence=1.0 because the user explicitly asked to store this.
Step 4: Confirm
The add_memory response returns event_id (not memory_id) because writes are async.
Call get_event_status(event_id=<event_id>) once.
- If status is
SUCCEEDED: print the memory ID from the result. - If status is
PENDINGorprocessing: print with the event ID as fallback.
Remembered as <type>: "<content, first 80 chars>"
Memory ID: <id from event status>
Append ... only if content was truncated (longer than 80 chars).
Output formatting
IMPORTANT: Do NOT use markdown in your output. OpenCode TUI renders text verbatim — markdown like bold, ## headers, and | table | syntax appears as raw characters. Use plain text with indentation for structure. Use dashes for lists. Use spaces to align columns instead of markdown tables.
质量与来源
- 所属仓库
- mem0ai/mem0
- 仓库星标
- 6.7 万
- 最近更新
- 3 天前
- 采集时间
- 今天
- commit
- b7ad69afda6b
- 内容指纹
- sha256:899a91086e1ad2f
- 文件路径
- integrations/opencode-plugin/opencode-skills/mem0-remember/SKILL.md