ragcode-memory

A shared, project-specific memory system for AI agents working in the same repository. It stores and retrieves decisions, preferences, feedback, and other notes across sessions.

In plain words
What is it for?
Use it to read prior decisions before substantial changes, save user preferences or architectural choices, record corrections, and search notes left by other agents.
Why use it?
It prevents each new agent or session from starting without the project’s earlier context. It also keeps memories separated by repository.

Skill for Claude CodeCodex

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/marshalleriksen-neura/ragcode/ragcode-memory
Any agent
npx skills add MarshallEriksen-Neura/ragcode --skill ragcode-memory
Clone the repo
git clone --depth 1 https://github.com/MarshallEriksen-Neura/ragcode

Made for: Claude Code, Codex.

Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,283 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.00101 $0.01283
Opus 5 $0.00051 $0.00642
Sonnet 5 $0.00020 $0.00257
Haiku 4.5 $0.00010 $0.00128

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

Security

Grade A, and why

ragcode-memory 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 2d 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.

integrations/codex/skills/ragcode-memory/SKILL.md · 97 lines

How it starts

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

RagCode Memory

RagCode provides a shared, project-scoped memory that persists across sessions and is visible to every AI agent connected to the same repo over MCP. What one agent records, another agent reads. Memory is bound to the repo root, not to any agent — it does not leak across projects.

When to use

  • Session start / agent switchmemory_list (or get_context, which now attaches memoryHints) to load key decisions and preferences before assuming a blank slate.
  • User states a preference, rule, or constraintmemory_write (type user or feedback).
  • A decision or architectural choice is madememory_write (type decision).
  • User corrects your approachmemory_write (type feedback).
  • Before a non-trivial changememory_query for related prior decisions.
  • A tool response includes memoryHints or memorySnippets → follow up with memory_query to explore.

MCP memory tools (server: ragcode)

Action Tool When
Record a memory memory_write preference stated, decision made, lesson learned
Search memories memory_query before risky changes, when hints appear, checking past decisions
List / browse memory_list session start, agent switch, catching up (chronological)
Remove memory_delete memory is wrong (prefer supersede on write instead)

CLI fallback (MCP unavailable)

ragcode memory write <topic> --type <type> --title "<title>" --body "<markdown>"
ragcode memory query "<query>" [--mode exact|semantic|hybrid] [--limit <n>]
ragcode memory list [--type <type>] [--topic <topic>] [--limit <n>]
ragcode memory delete <id> --reason "<reason>"

Prefer MCP tools when available because they preserve structured results for the calling agent. Use the CLI fallback for local diagnostics, recovery, or non-MCP agent surfaces.

Memory types

Type Write when Example
user user preference / trait "prefers Go over Rust"
feedback user correction / rule "don't mock the database in tests"
project project state / fact "auth middleware rewritten for compliance"
reference external pointer "bugs tracked in Linear INGEST"
decision architectural / design choice "chose event sourcing over CRDT"
context current work context "refactoring the payment module"

Read the full file on GitHub · 97 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 97 lines · 101 tokens per session scan A b124b8ff06b2

Subscribe to this mod's changes

ragcode-memory is a skill published in the GitHub repository MarshallEriksen-Neura/ragcode (11 stars, last pushed 1mo ago), licensed MIT. It adds 101 tokens to every session and 1,283 once invoked, about $0.0005 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-30.

Related

Other skills, from other repositories

seller-research

Use when researching a merchant, storefront, marketplace seller, or merchant of record for a buying decision, especially when identity, refund terms, fulfillment, counterfeit risk, domain history, or independent buyer outcomes are uncertain.

cinderline/northcinder · 46 tokens

claude-md-improver

Audit and improve existing CLAUDE.md files across a repository. Use for a deliberate, repo-wide quality review—not to record learnings from the current session.

mrclrchtr/supi · 39 tokens

pi-tui-design

Create distinctive, crafted TUI components for pi using @earendil-works/pi-tui and @earendil-works/pi-coding-agent. Use when building interactive terminal UIs — custom components, overlays, dialogs, dashboards, widgets, data visualizations, animated elements, game-like interfaces, or any visual TUI work inside pi…

mrclrchtr/supi · 141 tokens

update-package-readme

Update one SuPi package README and its direct user-facing Markdown references from installed Pi docs and verified package evidence.

mrclrchtr/supi · 27 tokens

claude-md-revision

Record durable, project-specific learnings from the current session in CLAUDE.md, .claude.local.md, or AGENTS.md—not general documentation, session summaries, or repo-wide audits.

mrclrchtr/supi · 45 tokens

pi-upgrade

Check for available upgrades to the pi coding agent framework by comparing the current @earendil-works/pi- or legacy @mariozechner/pi- version in package.json against releases on earendil-works/pi. Use this skill whenever the user asks to upgrade pi, update pi, check pi changelogs/releases, or migrate off the…

mrclrchtr/supi · 90 tokens