Agent skill

Mem0 Context Loader

by mem0ai in mem0ai/mem0

Searches Mem0 memories from earlier Pi sessions in the repository and prints a short block of the relevant ones before work starts, read-only and silent when empty.

Apache-2.0Auto-check passedAgent Workflows

Install Mem0 Context Loader

skills CLI
$ npx skills add mem0ai/mem0 --skill context-loader -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mem0ai/mem0 context-loader --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mem0ai/mem0.git skills-src && mkdir -p .claude/skills && cp -r skills-src/integrations/pi-agent-plugin/skills/context-loader .claude/skills/context-loader && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
context-loader
GitHub stars
67k
Token cost
~292 tokens
SKILL.md length
94 words
Files
1
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

Searches Mem0 memories from earlier Pi sessions in the repository and prints a short block of the relevant ones before work starts, read-only and silent when empty.

  • Works in 4 steps: Extract topics from current… → Call mem0_memory once with… → Output compact context block (max 10… → …
  • Starting work where an earlier session may already explain the code or decision
  • SKILL.md covers Steps and Constraints
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The skill primes context before a task. It pulls subject areas, people, project names and goal references out of the current message, then calls the mem0_memory tool once with the search action and a focused question about the task. The aim is to avoid repeating file reads, searches or experiments that earlier work already settled.

It prints a compact block of at most 10 memories, each labeled by type, such as decisions or preferences, and tagged with a short Mem0 ID, and it skips any memory already visible in the session. If nothing comes back, it says nothing at all. The skill is read-only: it never changes or deletes stored memories.

When your agent uses it

  • Starting work where an earlier session may already explain the code or decision
  • Avoiding file reads and experiments that were already tried
  • Resuming a topic and wanting a short briefing from past memories

Example prompts

  • “Load any earlier context about the payment retry logic before we start.”
  • “Did we already investigate this flaky login test in an earlier session? Check memory first.”
  • “Prime context for the migration work using our past decisions.”

Requirements

  • The Mem0 integration for Pi, with its mem0_memory tool

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Extract topics from current message/task. Identify: subject areas, people mentioned, project names, goal references.
  2. Call mem0_memory once with action="search" and a focused question about the task.
  3. Output compact context block (max 10 memories)
  4. If zero results: output nothing. Don't announce empty context.

What it can do on your machine

Read from SKILL.md and the folder at commit c93420c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mem0 Context Loader loads about 292 tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 94 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~292

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mem0ai/mem0 at commit c93420c, republished under its Apache-2.0 licence (© mem0ai). 94 words, ~292 tokens.

Download SKILL.mdSave it as .claude/skills/context-loader/SKILL.md (or your agent's skills folder).
name
context-loader
description
Search memories from earlier Pi 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 or topic.

Steps

  1. Extract topics from current message/task. Identify: subject areas, people mentioned, project names, goal references.

  2. Call mem0_memory once with action="search" and a focused question about the task.

  3. Output compact context block (max 10 memories):

context-loader: loaded <N> memories for "<task summary>"
  - [decisions] <content> [mem0:<short_id>]
  - [preferences] <content> [mem0:<short_id>]
  - [lessons] <content> [mem0:<short_id>]
  1. If zero results: output nothing. Don't announce empty context.

Constraints

  • Read-only — never modify or delete memories
  • Max 10 memories returned (most relevant only)
  • Silent on empty — only surfaces findings if relevant context exists
  • Skip memories already visible in current session context

© mem0ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in integrations/pi-agent-plugin/skills/context-loader of mem0ai/mem0.

Open the folder on GitHubat commit c93420c

Compare with similar skills

Mem0 Context Loader next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mem0 Context Loader compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mem0 Context Loader this skillmem0ai/mem067k—~292Automated safety check: PassApache-2.0
Agenticx Memory ArchitectDemonDamon/AgenticX279—~1.1kAutomated safety check: PassApache-2.0
Memori Long-Term MemoryMemoriLabs/Memori17k—~2kAutomated safety check: NotesCustom licence
Memori Long-Term MemoryMemoriLabs/Memori17k—~2kAutomated safety check: PassApache-2.0
MemPalace Recall for Planningopen-gsd/gsd-core10k1 repos~1.5kAutomated safety check: NotesMIT
Planning with FilesOthmanAdi/planning-with-files27k—~2.9kAutomated safety check: PassMIT

Similar skills

  • Agenticx Memory Architect

    DemonDamon/AgenticX

    Guide for setting up and using the AgenticX memory system including Mem0 integration, long-term memory, context management, and memory-enhanced agents.

    279 GitHub stars~1.1k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Memori Long-Term Memory

    MemoriLabs/Memori

    Connects Claude Code to Memori Cloud for long-term memory, recalling stored context before substantive replies and saving new context afterward.

    17k GitHub stars~2k tokensUpdated 4 days ago
    Agent WorkflowsAuto-check: notes
  • Memori Long-Term Memory

    MemoriLabs/Memori

    Adds structured long-term memory to OpenClaw agents, built automatically from sessions, with tools the agent calls to recall facts, summaries and decisions.

    17k GitHub stars~2k tokensUpdated 4 days ago
    Agent WorkflowsAuto-check passed
  • Recalls earlier decisions, patterns and surprises from MemPalace memory before planning, behind a config gate that never blocks the planning step.

    10k GitHub starsUsed in 1 repo~1.5k tokens
    Agent WorkflowsAuto-check: notes
  • Planning with Files

    OthmanAdi/planning-with-files

    Keeps a task plan, findings and progress log in markdown files on disk so long agent tasks survive context resets, with Gemini hooks and helper scripts.

    27k GitHub stars~2.9k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • User Thoughts Memory

    sickn33/agentic-awesome-skills

    Saves a user's project decisions, rules and preferences into a project-local mdbase so later sessions and other agents can recover the intent.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Agent WorkflowsAuto-check passed

More from mem0ai/mem0

All 25 skills in this repo
  • Adds persistent memory to AI apps with the Mem0 Python and TypeScript SDKs: store, search, update and delete user memories, with framework integrations.

    67k GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Adds, searches, lists, updates and deletes memories on the Mem0 platform from the terminal with the mem0 command, including a JSON mode built for agents.

    67k GitHub stars~1.4k tokensUpdated yesterday
    Auto-check: notes
  • Adds persistent memory to Vercel AI SDK apps with the Mem0 provider, using a wrapped model or standalone retrieve and store utilities.

    67k GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Finds and deletes specific mem0 memories by search query or ID, always asking for confirmation first, and can undo the most recent memories added this session.

    67k GitHub stars~664 tokensUpdated yesterday
    Auto-check passed
  • Saves a fact, decision or preference the user states into mem0 as written, labeled with a memory type such as decision, convention or user_preference.

    67k GitHub stars~560 tokensUpdated yesterday
    Auto-check passed
  • Shows or changes the default Mem0 memory scope, project, session or global, which decides where memories are saved and searched.

    67k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Mem0 Context Loader

What does Mem0 Context Loader do?

Searches Mem0 memories from earlier Pi sessions in the repository and prints a short block of the relevant ones before work starts, read-only and silent when empty. The skill primes context before a task. It pulls subject areas, people, project names and goal references out of the current message, then calls the mem0_memory tool once with the search action and a focused question about the task.

When should I use Mem0 Context Loader?

Mem0 Context Loader fits situations like: starting work where an earlier session may already explain the code or decision; avoiding file reads and experiments that were already tried; resuming a topic and wanting a short briefing from past memories.

How do I install Mem0 Context Loader in Claude Code?

Run `npx skills add mem0ai/mem0 --skill context-loader -a claude-code`. Or copy the skill folder (integrations/pi-agent-plugin/skills/context-loader in mem0ai/mem0) into .claude/skills/context-loader in your project. Claude Code loads it when a task matches its description.

How do I install Mem0 Context Loader in Codex?

Run `npx skills add mem0ai/mem0 --skill context-loader -a codex`. Or copy the skill folder (integrations/pi-agent-plugin/skills/context-loader in mem0ai/mem0) into .agents/skills/context-loader in your project. Codex loads it when a task matches its description.

Can I use Mem0 Context Loader in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mem0ai/mem0 --skill context-loader -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/context-loader, .gemini/skills/context-loader, .github/skills/context-loader and .opencode/skills/context-loader in your project.

What does Mem0 Context Loader need to run?

SKILL.md names no scripts, command-line tools or credentials: Mem0 Context Loader is instructions for the agent only. Our summary lists: The Mem0 integration for Pi, with its mem0_memory tool.

Does Mem0 Context Loader access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Mem0 Context Loader safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mem0 Context Loader use?

Mem0 Context Loader is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mem0 Context Loader use?

About 292 tokens (SKILL.md is roughly 1.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mem0 Context Loader?

Skills that share tags, products or a category with Mem0 Context Loader: Agenticx Memory Architect (DemonDamon/AgenticX, 279 stars), Memori Long-Term Memory (MemoriLabs/Memori, 17k stars), Memori Long-Term Memory (MemoriLabs/Memori, 17k stars) and MemPalace Recall for Planning (open-gsd/gsd-core, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mem0 Context Loader?

mem0ai (a GitHub organization) maintains it in mem0ai/mem0, which has 66,715 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 6, 2026.

Source: mem0ai/mem0 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.