mem0-context-loader

Searches mem0 memories and injects relevant project context before starting a task.

1|Updated Jan 13, 2022
One-click install
npx skills add https://github.com/jayho-k/TIL --skill mem0-context-loader-jayho-k
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mem0-context-loader
Source: https://github.com/jayho-k/TIL/tree/main/AI/mem0/code/mem0_code_analize/mem0/integrations/mem0-plugin/.opencode-plugin/opencode-skills/mem0-context-loader
Command: npx skills add https://github.com/jayho-k/TIL --skill mem0-context-loader-jayho-k

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When starting a new coding task or switching context, developers lose access to past decisions, coding conventions, and known pitfalls stored in long-term memory. This Skill pre-fetches relevant memories from mem0 so the AI assistant begins work with the right project history already loaded. ## Core Features & Use Cases - Multi-angle memory search: Runs 2-4 parallel search_memories queries filtered by memory type (decision, convention, anti_pattern) plus a broad catch-all query. - Deduplicated compact output: Merges results by memory ID and outputs at most 10 memories in a plain-text context block compatible with the OpenCode TUI. - Silent on empty results: Produces no output when no relevant memories exist, avoiding noise in the conversation. - Use Case: A developer starts work on a payment module; the Skill searches mem0 for past architecture decisions, coding conventions, and known anti-patterns related to that module and injects them into context before any code is written. ## Quick Start Ask the assistant to load context for the feature you are about to work on, for example: load what we know about the authentication module before I start refactoring it.

Frequently Asked Questions about mem0-context-loader

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I load project context from mem0 before starting a task?

Invoke the context loader at session start or when naming a feature. It extracts topics from your message, runs parallel search_memories queries across decision, convention, and anti_pattern types, then outputs a compact block of up to 10 relevant memories.

What types of memories does mem0 context search retrieve?

It retrieves three filtered memory types: decisions for architecture choices, conventions for coding patterns, and anti_patterns for known pitfalls. A fourth broad query without a type filter acts as a catch-all for general project context.

Can the context loader modify or delete stored memories?

No. The Skill is strictly read-only and never modifies or deletes memories. It only runs search_memories queries and formats the results for injection into the current session context.

Why does the context loader output nothing sometimes?

Empty output is intentional behavior. When search queries return zero relevant memories, the Skill stays silent rather than announcing an empty result, keeping the conversation free of noise.

Why does the output avoid markdown formatting?

The OpenCode TUI renders text verbatim, so markdown syntax like bold markers, headers, and tables would appear as raw characters. The Skill uses plain text with indentation and dashes so the context block displays correctly.