skills/mmry/SKILL.md
Persistent semantic memory for agents (principles, patterns, insights)
npx skillsauth add jcsaaddupuy/badrobots mmryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
mmry is a local-first memory system that persists across sessions. Unlike todos (ephemeral, session-scoped) or skills (procedural knowledge), memories are designed for capturing insights and principles that improve decision-making:
Key distinction: Memories capture the essence of learning, not the history of tasks. They're a knowledge base, not a log.
| Aspect | Todos | Memories | Skills | |--------|-------|----------|--------| | Scope | Session-only | Persistent (survives restarts) | Global (all projects) | | Purpose | Track current tasks | Capture principles & insights | Procedural knowledge | | Content | What to do now | Essence of learning | How-to guides | | Lifespan | Ephemeral | Permanent (until deleted) | Permanent (reference material) | | Search | Simple list | Semantic + keyword + fuzzy | Text search in docs | | Use Case | "What do I need to do now?" | "What principles apply here?" | "How do I do X?" |
When to use each:
What NOT to store in memories:
# The agent can add memories
# This creates a persistent record
# Episodic: events and experiences (auto-detected or explicit)
mmry add "Deployed new API to production at 2pm, took 15 minutes"
# Semantic: facts and knowledge (auto-detected if contains "is"/"are")
mmry add "The database migration takes ~5 minutes to run"
# Procedural: how-to and instructions (auto-detected if contains "step"/"how to")
mmry add "To debug memory leaks: 1) Run profiler, 2) Check heap dumps, 3) Look for circular refs"
# With metadata
mmry add "API rate limit is 1000 req/min" --memory-type semantic --importance 9 --category api
mmry add "Sprint planning notes" --category work --tags "planning,team,q1"
# Hybrid search (combines all strategies)
mmry search "database performance"
# Semantic search (conceptual similarity)
mmry search "slow queries" --mode semantic
# Fuzzy search (typo-tolerant)
mmry search "databse" --mode fuzzy
# Keyword search (exact matching)
mmry search "migration" --mode keyword
# List all memories
mmry ls
# List by category
mmry ls --category work
# Search and filter
mmry search "api" --category technical
# Delete
mmry delete <id> --yes
# Update (delete old, add new with same metadata)
mmry update <id> "new content"
Insights and lessons learned from specific experiences, not the events themselves.
When to use:
Examples:
What NOT to store:
Factual information, principles, and patterns that don't change frequently.
When to use:
Examples:
Reusable workflows, patterns, and best practices.
When to use:
Examples:
Combines all search strategies for best results. Automatically weights each approach based on the query.
mmry search "what caused the api timeout last week" --mode hybrid
Finds conceptually similar memories using embeddings. Best for vague or high-level queries.
mmry search "performance issues" --mode semantic
Exact word matching. Best for specific technical terms.
mmry search "N+1 query" --mode keyword
Typo-tolerant matching. Best when you're not sure of exact wording.
mmry search "databse connection" --mode fuzzy
Statistical relevance ranking (like search engines). Good for longer queries.
mmry search "how do I fix slow database queries" --mode bm25
Neural sparse embeddings (SPLADE++). Learned term importance.
mmry search "api timeout errors" --mode sparse
Group memories by domain or project.
mmry add "Sprint planning notes" --category work
mmry add "Rust ownership rules" --category learning
mmry search "notes" --category work
Add multiple tags for flexible filtering.
mmry add "Fixed race condition" --tags "bugs,concurrency,fixed"
mmry add "Team meeting" --tags "team,planning,q1"
Mark critical memories (1-10 scale).
mmry add "Production database is read-only" --importance 10
mmry add "Nice-to-know optimization" --importance 3
Track architectural decisions and their rationale.
# Agent adds after deciding to use PostgreSQL
mmry add "Chose PostgreSQL over MongoDB for: 1) ACID guarantees, 2) Complex queries, 3) Team expertise" \
--category architecture --tags "database,decision" --importance 9
Store debugging insights for future reference.
# Agent adds after fixing a bug
mmry add "N+1 query bug in user service: symptom was slow API, found with query profiler, fixed with eager loading" \
--category debugging --tags "performance,sql" --importance 8
Search for similar past situations when facing new problems.
# Agent searches when encountering similar issue
mmry search "timeout errors" --mode semantic
# Returns: past timeout issues and how they were resolved
Build richer context over time.
# Session 1: Learn about system
mmry add "API has 1000 req/min rate limit" --category api
# Session 2: Learn about deployment
mmry add "Deployments take ~15 min, need to coordinate with team" --category deployment
# Session 3: Search to understand system better
mmry search "api deployment" --mode semantic
# Returns both memories, providing full context
# During session: add todo
todo add "Fix N+1 query bug"
# After fixing: add memory
mmry add "N+1 query in user service, caused by missing eager loading" --category debugging
# Skill: "How to use React hooks"
# Memory: "Used useCallback to optimize re-renders in dashboard component"
# Session 1: Discover issue
# Session 2: Search memories to find similar issues from past
# Session 3: Apply learned solution
Memories are for capturing insights and principles, not task logs.
✅ Store principles and patterns - Insights that improve decision-making
✅ Store learned lessons - What worked and why
✅ Store system knowledge - How things work
❌ Don't store task logs - What you did or what happened
❌ Don't store session summaries - Session history belongs in todos, not memories
Good: "Defensive programming: Always check if external data fields exist before accessing them. Use optional chaining (?.) or defaults (||) to prevent crashes in rendering code." Bad: "Fixed a bug"
Good: "Sandbox constraints: Network access and path validation are restricted by design. Design integrations to work within constraints rather than fight them." Bad: "Network sandboxing in Gondolin"
Good: "Database migration failed because of missing index on user_id. Solution: add index before migration. Lesson: always check dependencies before running migrations." Bad: "Migration failed"
Use consistent terminology and categories so searches find related memories.
mmry add "Defensive programming: Check external data before accessing" --category programming-principles
mmry add "TUI rendering: Always provide defaults for optional fields" --category programming-principles
# Now searching for "defensive" finds both related principles
Delete outdated memories and consolidate related ones.
# Delete: task logs, session summaries, duplicate principles
mmry delete <old-id> --yes
# Keep: principles, patterns, learned lessons
mmry ls --category programming-principles
# Critical principles (importance 8-10)
mmry add "Always validate theme colors against allowed list" --importance 9
# Useful patterns (importance 6-7)
mmry add "Using batch queries can improve performance by 20%" --importance 6
# Nice-to-know (importance 1-5)
mmry add "Optional optimization technique" --importance 3
When you solve a problem, extract the principle, not the task.
# ❌ DON'T: Store the task
mmry add "Fixed N+1 query in user service today" --category debugging
# ✅ DO: Store the principle
mmry add "N+1 Query Pattern: Symptom is slow API response. Root cause is missing eager loading. Solution: add eager loading to relationship. Applies to all ORMs." \
--category debugging --tags "performance,sql" --memory-type semantic
# Next time: search for the principle
mmry search "slow api performance" --mode semantic
# Returns the principle, applicable to new problems
When you discover a system constraint, capture it as a principle.
# ❌ DON'T: Store the event
mmry add "Gondolin path validation rejected mounted paths"
# ✅ DO: Store the principle
mmry add "Sandbox Boundary Principle: When integrating with sandboxed systems, recognize that path validation, network access, and environment variables are constrained by design. Design integrations to work within constraints rather than fight them." \
--category system-design --tags "sandboxing,constraints" --memory-type semantic
Build a knowledge base of patterns that apply everywhere.
# Session 1: Learn pattern in Project A
mmry add "Defensive Programming: Always assume external data may be incomplete or malformed. Use optional chaining (?.) or defaults (||) to prevent crashes." \
--category programming-principles --importance 9
# Session 2: Apply pattern in Project B
mmry search "defensive programming" --mode semantic
# Returns the principle learned in Project A
# Apply it to prevent similar bugs in Project B
Record why decisions were made, not just what was decided.
# ✅ GOOD: Capture the reasoning
mmry add "Chose TypeScript over Python for: 1) Type safety catches bugs early, 2) Existing codebase is TypeScript, 3) Team has more TypeScript expertise" \
--category architecture --tags "decision,language" --importance 9
# Later: search for similar decisions
mmry search "language choice" --mode semantic
# Returns decision rationale for reference
mmry stores config at ~/.config/mmry/config.toml. Key settings:
[search]
mode = "hybrid" # Default search mode
similarity_threshold = 0.7 # Semantic similarity threshold
[embeddings]
model = "Xenova/all-MiniLM-L6-v2" # Fast local model
[service]
enabled = true # Enable service mode for faster embeddings
auto_start = true # Auto-start service when needed
idle_timeout_seconds = 300 # Unload models after 5 minutes idle
Q: Memory not found in search A: Try different search modes (semantic vs keyword). Semantic search finds conceptually similar memories even if wording differs.
Q: Embeddings are slow
A: Enable service mode in config (service.enabled = true). First embedding takes 2-3s, then ~10-50ms with service running.
Q: Want to rebuild embeddings
A: Run mmry reembed --force after changing the embedding model.
Q: How do I export memories?
A: Use mmry ls --json | jq to export as JSON, then pipe to other tools.
development
DuckDB patterns for JSON/JSONL analysis, array unnesting, and common gotchas. Use when querying JSON files, nested data, or encountering "UNNEST not supported here" errors.
development
Mealie recipe manager API: recipes, shopping lists, meal plans. Requires MEALIE_BASE_URL and MEALIE_API_KEY.
business
TimeWarrior time tracking: start/stop intervals, query durations by tag or issue, compute totals for issue tracker time reporting
development
Bookmark manager for saving, searching, and annotating web content. Use when: (1) saving a webpage for later reference, (2) searching previously saved bookmarks, (3) adding highlights/annotations to saved content, (4) user asks to 'bookmark this' or 'save this article'. Requires READECK_BASE_URL and READECK_API_KEY environment variables.