mem0-plugin/skills/tour/SKILL.md
Show the user what mem0 has stored for the current project.
When invoked with --all-projects (e.g., /mem0:tour --all-projects or
/mem0:tour --all-projects auth middleware), search across ALL projects:
get_memories with filters={"AND": [{"user_id": "<active_user_id>"}]}, page_size=200 — no app_id filter.search_memories with query=<query>,
filters={"AND": [{"user_id": "<active_user_id>"}]}, top_k=20 — again no app_id.app_id first, then by category within each project.## <app_id_1> (<N> memories) ← current
**Architecture Decisions** — <memory content>
...
## <app_id_2> (<N> memories)
...
<N> memories across <M> projects
← (current) in the heading.If --all-projects is NOT present, use the standard single-project flow below.
When /mem0:tour receives a search query argument (e.g., /mem0:tour auth middleware)
WITHOUT --all-projects, run in peek mode — compact one-liner results:
search_memories calls:
query=<query>, filters={"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}]}, top_k=10, rerank=truequery=<query>, filters={"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}, {"metadata": {"type": "decision"}}]}, top_k=5, rerank=true## mem0 search: "<query>" (<N> results)
1. [decision] Auth module uses JWT with RS256 keys (2025-05-15) [mem0:a3f8b2c1]
2. [anti_pattern] Don't use symmetric HS256 — leaked in env (2025-05-10) [mem0:7e2d9f4a]
3. [convention] All middleware in src/middleware/ (2025-05-08) [mem0:c4d5e6f7]
<number>. [<type>] <content, 80 chars> (<date>) [mem0:<short_id>]No memories matching "<query>" for project <project_id>.If no query argument and no --all-projects flag, use the full tour flow below.
Call get_memories to fetch all memories for this project:
filters={"AND": [{"user_id": "<active_user_id>"}, {"app_id": "<active_project_id>"}]}, page_size=100
In parallel, run these search_memories calls to get relevance-ranked results for key topics:
query="architecture decisions design choices", filters={"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}]}, top_k=10, rerank=truequery="bugs errors failures anti-patterns", filters={"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}]}, top_k=10, rerank=truequery="project setup tooling conventions preferences", filters={"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}]}, top_k=10, rerank=trueDo NOT filter by metadata.type in these calls. The platform auto-assigns categories — filtering on metadata.type misses memories that were auto-categorized but don't have an explicit metadata.type.
Merge all results by memory ID (deduplicate). For each memory, determine its group using this priority:
categories field (array on each memory, auto-assigned by Mem0). Use the first category value.metadata.type field (if present, set explicitly by hooks/agent). Use as fallback if no categories.Map category names to display names:
| Platform category / metadata.type | Display name |
|---|---|
architecture decisions, architecture_decisions, decision | Architecture Decisions |
anti patterns, anti_patterns, anti_pattern | Anti-Patterns |
task learnings, task_learnings, task_learning | Task Learnings |
coding conventions, coding_conventions, convention | Coding Conventions |
user preferences, user_preferences, user_preference | User Preferences |
project profile, project_profile | Project Profile |
tooling setup, tooling_setup, environmental | Tooling & Setup |
technology, professional_details | Tooling & Setup |
session_state | Session State |
compact_summary | Compact Summaries |
| anything else | Other |
Sort groups by descending memory count. For each group that has results, print:
## <display_name> (<count> memories)
- <full_memory_content> (score: <similarity_score_if_available>)
- ...
Show the full memory text for each entry — do NOT truncate. If a group has more than 10 entries, show top 10 by recency (or similarity score if from a search call) and note ... and <N> more.
For groups with zero results, skip them entirely — don't print empty groups.
<N> memories across <M> categories — project: <project_id>, branch: <active_branch>
If zero memories found for this project, print:
No memories stored yet for project <project_id>.
Run /mem0:onboard to import project files, or start working — mem0 captures learnings automatically.