memory-retrieval

memory-retrieval is a skill for Claude Code, Codex from runtimenoteslabs/memory-layer. It costs 15 tokens per session (778 once invoked), scanned A, original, MIT.

A skill that automatically searches Memory Layer when a conversation refers to earlier decisions, conventions, patterns, work, or previously seen errors. It adds relevant saved context to the agent's response.

In plain words
What is it for?
For answering questions about past decisions, usual project practices, previous work, recurring errors, and how the project handles particular problems.
Why use it?
It reduces the need to repeat project history and helps the agent use established choices and earlier fixes.

Skill for Claude CodeCodex

Part of the memory-layer plugin — 3 skills, 6 commands, 3 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/runtimenoteslabs/memory-layer/memory-retrieval
Any agent
npx skills add runtimenoteslabs/memory-layer --skill memory-retrieval
Clone the repo
git clone --depth 1 https://github.com/runtimenoteslabs/memory-layer

Made for: Claude Code, Codex.

Or install memory-layer, the plugin that ships this one along with the rest of its 3 skills, 6 commands, 3 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memory-retrieval

README.md
[![agentmods](https://agentmods.dev/badge/skills/runtimenoteslabs/memory-layer/memory-retrieval.svg)](https://agentmods.dev/skills/runtimenoteslabs/memory-layer/memory-retrieval)
Your own site
<a href="https://agentmods.dev/skills/runtimenoteslabs/memory-layer/memory-retrieval"><img src="https://agentmods.dev/badge/skills/runtimenoteslabs/memory-layer/memory-retrieval.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 778 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.00778
Opus 5 $0.00008 $0.00389
Sonnet 5 $0.00003 $0.00156
Haiku 4.5 $0.00002 $0.00078

Measured 4d ago against content hash 502799788084, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory-retrieval scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/memory-retrieval/SKILL.md · 124 lines

How it starts

The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Memory Retrieval Skill

This skill automatically activates when the conversation suggests past context would be helpful. It searches the Memory Layer and injects relevant memories into the response.

Activation Triggers

Activate this skill when the user:

Past Decisions

  • "what did we decide about..."
  • "why did we choose..."
  • "what was the decision on..."
  • "what did we agree..."

Conventions & Standards

  • "what's our convention for..."
  • "what's the standard..."
  • "how do we usually..."
  • "what's our pattern for..."

Previous Work References

  • "last time we..."
  • "we discussed..."
  • "as I mentioned..."
  • "remember when we..."

Project Patterns

  • "how do we handle..."
  • "what's the approach for..."
  • "what's the best way to..."

Error Recognition

  • Error messages that might have been solved before
  • Stack traces from familiar components
  • Issues in previously-discussed areas

Retrieval Process

  1. Extract query keywords from the user's message

    • Focus on technical terms, component names, patterns
    • Include project context from current working directory
  2. Search Memory Layer:

    mem search "<keywords>" --project "$PWD" --limit 5 --format context
    
  3. Filter by relevance:

    • Prioritize memories with positive outcome scores (> 0.3)
    • Match category to query type:
      • Errors → troubleshooting
      • Style questions → convention
      • Design questions → architecture, decision
  4. Inject into response:

    • Prefix relevant findings naturally
    • Cite memory IDs for transparency

Response Integration

When memories are found, integrate them naturally at the start of your response:

For High-Confidence Memories (score > 0.3)

Based on established project knowledge: [brief summary of relevant memory]

For Normal Memories

From previous context: [brief summary]

For Multiple Memories

Based on project knowledge:

  • [Memory 1 summary]
  • [Memory 2 summary]

Then proceed with the response, incorporating the memory context.

Read the full file on GitHub · 124 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 124 lines · 15 tokens per session scan A 502799788084

Subscribe to this mod's changes

memory-retrieval is a skill published in the GitHub repository runtimenoteslabs/memory-layer (10 stars, last pushed 3mo ago), licensed MIT. It adds 15 tokens to every session and 778 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

openclaw

Wire mnemostack into OpenClaw as an MCP server, alongside the native OpenClaw memory tools (memorysearch / memoryget). The two coexist — mnemostack handles the hybrid pipeline (Vector + BM25 + Memgraph + Temporal + 8-stage rerank), while the native tools do fast file-scoped retrieval.

udjin-labs/mnemostack · 0 tokens

claude-code

Wire mnemostack into Claude Desktop (and by extension Claude Code, which reads the same MCP config) as an MCP server.

udjin-labs/mnemostack · 0 tokens

cursor

Wire mnemostack into Cursor as an MCP server. Cursor reads MCP servers from its own settings, not from Claude Desktop's config.

udjin-labs/mnemostack · 0 tokens

install-openviking-memory

Install and configure the OpenViking long-term memory plugin for OpenClaw via natural conversation. Once installed, the plugin automatically captures facts from chats and recalls relevant context before each reply (auto-capture + auto-recall, cross-session). Covers prerequisites, install through OpenClaw's plugin…

volcengine/OpenViking · 191 tokens

emem-recall-polygon

Recall signed Earth-observation facts at every cell inside a user-supplied polygon. Use when the user asks about an extent rather than a point — "what's the average NDVI inside this watershed", "show me precipitation across the Western Ghats", "what's the elevation profile of this region". Accepts a polygon as [lng…

Vortx-AI/emem · 99 tokens

emem-locate-and-recall

Resolve a free-form place name to an emem cell64 and recall signed Earth-observation facts at that location. Use when the user asks about current weather, vegetation index, elevation, soil properties, or any other geospatial measurement at a named place ("what's the temperature in Bengaluru", "how high is Denali"…

Vortx-AI/emem · 109 tokens