AGENT SKILL

tour

Browses all stored memories grouped by category with full content display. Use when reviewing all project memories, exploring stored knowledge, onboarding to a project, or getting an overview of captured decisions, conventions, and learnings.

License 许可
Apache-2.0
最近更新
2026-08-12
Stars
★ 2
Forks
0

01 前言 Front Matter

name
tour
description
Browses all stored memories grouped by category with full content display. Use when reviewing all project memories, exploring stored knowledge, onboarding to a project, or getting an overview of captured decisions, conventions, and learnings.

03 SKILL.md 正文

Mem0 Project Tour

Show the user what mem0 has stored for the current project.

Cross-project mode

When invoked with --all-projects (e.g., /mem0:tour --all-projects or /mem0:tour --all-projects auth middleware), search across ALL projects:

  1. Call get_memories with filters={"AND": [{"user_id": "<active_user_id>"}]}, page_size=200 — no app_id filter.
  2. If a search query was also provided, run search_memories with query=<query>, filters={"AND": [{"user_id": "<active_user_id>"}]}, top_k=20 — again no app_id.
  3. Group results by app_id first, then by category within each project.
  4. Display:
    ## <app_id_1> (<N> memories) ← current
    **Architecture Decisions** — <memory content>
    ...
    
    ## <app_id_2> (<N> memories)
    ...
    
    <N> memories across <M> projects
    
  5. Mark the current project with ← (current) in the heading.

If --all-projects is NOT present, use the standard single-project flow below.

Peek mode (compact search)

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:

  1. Run 2 parallel search_memories calls:
    • Broad: query=<query>, filters={"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}]}, top_k=10, rerank=true
    • Targeted: query=<query>, filters={"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}, {"metadata": {"type": "decision"}}]}, top_k=5, rerank=true
  2. Deduplicate by ID, display compact results:
    ## 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]
    
    Format: <number>. [<type>] <content, 80 chars> (<date>) [mem0:<short_id>]
  3. If no results: No memories matching "<query>" for project <project_id>.

If no query argument and no --all-projects flag, use the full tour flow below.

Execution

Step 1: Fetch ALL memories for this project

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

Step 2: Run supplementary semantic searches

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=true
  • query="bugs errors failures anti-patterns", filters={"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}]}, top_k=10, rerank=true
  • query="project setup tooling conventions preferences", filters={"AND": [{"user_id": "<id>"}, {"app_id": "<pid>"}]}, top_k=10, rerank=true

Do 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.

Step 3: Merge and group

Merge all results by memory ID (deduplicate). For each memory, determine its group using this priority:

  1. Platform categories field (array on each memory, auto-assigned by Mem0). Use the first category value.
  2. metadata.type field (if present, set explicitly by hooks/agent). Use as fallback if no categories.
  3. "other" bucket for memories with neither.

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

Step 4: Display results

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.

Step 5: Print totals

<N> memories across <M> categories — project: <project_id>, branch: <active_branch>

Step 6: Empty state

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.

04 同仓库更多 Skills

zhangmask
zhangmask/C_AnimeCompanion

mem0

Mem0 Platform SDK for adding persistent memory to AI applications. TRIGGER when: user mentions "mem0", "MemoryClient", "memory layer", "remember user preferences", "persistent context", "personalization", or needs to add long-term memory to chatbots, agents, or AI apps. Covers Python SDK (mem0ai), TypeScript SDK (mem0ai), and framework integrations (LangChain, CrewAI, OpenAI Agents SDK, Pipecat, LlamaIndex, AutoGen, LangGraph). Also covers the open-source self-hosted Memory class. This is the DEFAULT mem0 skill for ambiguous queries. DO NOT TRIGGER when: user asks about CLI commands, terminal usage, or shell scripts (use mem0-cli), or Vercel AI SDK / @mem0/vercel-ai-provider / createMem0 (use mem0-vercel-ai-sdk).

★ 2
zhangmask
zhangmask/C_AnimeCompanion

mem0-vercel-ai-sdk

Mem0 provider for Vercel AI SDK (@mem0/vercel-ai-provider). TRIGGER when: user mentions "vercel ai sdk", "@mem0/vercel-ai-provider", "createMem0", "retrieveMemories", "addMemories", "getMemories", "searchMemories", "mem0 vercel", "AI SDK provider", "AI SDK memory", or is using generateText/streamText with mem0. Also triggers for Next.js apps needing memory-augmented AI. DO NOT TRIGGER when: user asks about direct Python/TS SDK calls without Vercel (use mem0 skill), or CLI terminal commands (use mem0-cli skill).

★ 2
zhangmask
zhangmask/C_AnimeCompanion

mem0-test-integration

Verify a Mem0 integration produced by /mem0-integrate. Runs in the same workspace on the same branch (loose coupling) — installs dependencies, runs the repo's native test suite, then exercises a real end-to-end smoke flow against the user's API key. Produces a scorecard. TRIGGER when: user has just run /mem0-integrate and says "verify", "test the integration", "run /mem0-test-integration", or when a .mem0-integration/ directory exists and tests have not been run yet on the current branch. DO NOT TRIGGER when: the user wants to run general project tests (defer to the repo's native test command), or when no prior /mem0-integrate run exists in the current branch (ask them to run /mem0-integrate first). This skill ONLY catches compile and runtime bugs by design. Logical integration errors — wrong data stored, wrong time retrieved, wrong user scoping — are on the human reviewer.

★ 2
zhangmask
zhangmask/C_AnimeCompanion

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local `Memory` class) to the mem0 Platform / hosted / managed SDK (the `MemoryClient` class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g. "migrate my mem0 setup to the platform", "switch from self-hosted mem0 to MemoryClient", "use my mem0 API key instead of a local Qdrant", "move mem0 to the cloud/hosted/managed service", or "replace my local mem0 vector store + embedder config with the platform". Applies to Python (`from mem0 import Memory` → `from mem0 import MemoryClient`) and TypeScript/JavaScript (`import { Memory } from "mem0ai/oss"` → `import MemoryClient from "mem0ai"`). Trigger even when the user doesn't say the word "migrate" but clearly wants their existing mem0 integration to run against the hosted platform. It first produces a reviewable migration plan, then executes it after the developer approves. Strictly scoped to the mem0 integration — it does not refactor, restructure, or "improve" any unrelated code.

★ 2
zhangmask
zhangmask/C_AnimeCompanion

mem0-integrate

Integrate Mem0 into an existing repository using a goal-driven, TDD pipeline. Detects the repo's language automatically and asks the user to pick between Mem0 Platform (managed) and Mem0 Open Source (self-hosted). Writes failing tests before any implementation. Produces a local feature branch plus `.mem0-integration/` artifacts consumed by the paired verification skill. TRIGGER when: user says "integrate mem0", "add mem0 to this repo", "wire mem0 into <repo>", or asks how to add memory to an existing project. DO NOT TRIGGER when: the user wants general SDK usage (use skill:mem0), CLI usage (use skill:mem0-cli), or Vercel AI SDK (use skill:mem0-vercel-ai-sdk). After success, invoke skill:mem0-test-integration to verify in the same workspace (loose coupling).

★ 2
zhangmask
zhangmask/C_AnimeCompanion

mem0-cli

Mem0 CLI -- the command-line interface for mem0 memory operations. TRIGGER when: user mentions "mem0 cli", "mem0 command line", "@mem0/cli", "mem0-cli", "pip install mem0-cli", "npm install -g @mem0/cli", or is running mem0 commands in a terminal/shell (mem0 add, mem0 search, mem0 list, mem0 get, mem0 init, mem0 config, mem0 import). Also triggers when query includes CLI flags like --user-id, --output, --json, --agent, or describes bash/zsh/terminal/shell usage. DO NOT TRIGGER when: user asks about programmatic SDK integration in Python/TS code (use mem0 skill), or Vercel AI SDK provider (use mem0-vercel-ai-sdk skill).

★ 2