fix(agent-plugins): match memo prompts and tool descriptions, release 0.3.3 (#7420)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Kartik
2026-09-23 19:35:25 +05:30
committed by GitHub
parent f8082a7345
commit 8c02c425a5
56 changed files with 262 additions and 249 deletions
@@ -1,35 +1,19 @@
---
name: mem0-context-loader
description: Searches and injects relevant memories into context before starting work on a task. Use when beginning a new task, switching context, or when project history, past decisions, or coding conventions need to be loaded.
description: Search memories from earlier OpenCode sessions in this repository. Use it when earlier work may already explain the code, error, decision, or command you need, so you can avoid repeating file reads, searches, or experiments.
---
# Context Loader
Pre-fetches relevant memories to prime context before working on a task.
## When to use
- Session start (invoke manually or auto-triggered by skill description matching)
- User starts work on a specific feature or file set
- Complex multi-step task begins
- User says "what do we know about X" or "context for X"
## Steps
1. **Extract topics** from current message/task. Identify: file paths, module names, feature areas, error patterns.
2. **Run 2-4 parallel `search_memories` calls** with different angles:
2. **Call `search_memories` once** with a focused question about the task: `filters={"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}]}`, `top_k=10`.
| Query angle | Filter | Purpose |
|---|---|---|
| Feature/module name | `{"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}, {"metadata": {"type": "decision"}}]}` | Architecture decisions |
| File paths mentioned | `{"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}, {"metadata": {"type": "convention"}}]}` | Coding patterns |
| Error keywords (if any) | `{"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}, {"metadata": {"type": "anti_pattern"}}]}` | Known pitfalls |
| Broad project context | `{"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}]}` | Catch-all |
3. **Deduplicate** results by memory ID across all search responses.
4. **Output compact context block** (max 10 memories):
3. **Output compact context block** (max 10 memories):
```
context-loader: loaded <N> memories for "<task summary>"
@@ -38,7 +22,7 @@ context-loader: loaded <N> memories for "<task summary>"
- [anti_pattern] <content> [mem0:<short_id>]
```
5. If **zero results**: output nothing. Don't announce empty context.
4. If **zero results**: output nothing. Don't announce empty context.
## Constraints
@@ -27,14 +27,11 @@ When an ID is detected:
### Step 2: Search
Run 2 parallel `search_memories` calls:
1. Broad: `query=<user's query>`, `filters={"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}]}`, `top_k=10`, `rerank=true`
2. Targeted: `query=<user's query>`, `filters={"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}, {"metadata": {"type": "decision"}}]}`, `top_k=5`, `rerank=true`
Call `search_memories` once with the user's question: `query=<user's query>`, `filters={"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}]}`, `top_k=10`.
### Step 3: Display
Deduplicate by ID, then show compact results:
Show compact results:
```
## mem0 search: "<query>" (<N> results)