sage-memory

sage-memory is a skill for Claude Code, Codex from l33tdawg/sage. It costs 97 tokens per session (1,793 once invoked), scanned A, original, Apache-2.0.

A local memory system for AI agents that stores shared knowledge between conversations. It checks memories through agreement among multiple validators, assigns confidence, and lets old memories lose relevance over time.

In plain words
What is it for?
Use it to save and recall project decisions, past task outcomes, and user preferences across sessions.
Why use it?
It prevents an agent from forgetting useful project context while keeping stored information on the local computer instead of sending it to a cloud service.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code; mentions Gemini CLI.

Good fit Use it to save and recall project decisions, past task outcomes, and user preferences across sessions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/l33tdawg/sage/sage-memory
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.

Any agent
npx skills add l33tdawg/sage --skill sage-memory
Clone the repo
git clone --depth 1 https://github.com/l33tdawg/sage

Made for: Claude Code, Codex.

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 sage-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/l33tdawg/sage/sage-memory/github.svg)](https://agentmods.dev/skills/l33tdawg/sage/sage-memory)
Your own site
<a href="https://agentmods.dev/skills/l33tdawg/sage/sage-memory"><img src="https://agentmods.dev/badge/skills/l33tdawg/sage/sage-memory/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sage-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/l33tdawg/sage/sage-memory"><img src="https://agentmods.dev/badge/skills/l33tdawg/sage/sage-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,793 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Agent Snooping · line 145
    Skill accesses MCP server configuration files (mcp.json). MCP configs contain server URLs, authentication tokens, and tool definitions — reading them allows the skill to discover and potentially abuse other tool integrations.
    Fix: Remove all code or instructions that read MCP configuration files (mcp.json). MCP server details should be managed by the agent runtime, not read by individual skills.
  • medium Rogue Agent · line 31
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • low Excessive Agency · line 116
    Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
    Fix: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
How audits are shown
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.1 $0.00097 $0.01793
Opus 5 $0.00048 $0.00897
Sonnet 5 $0.00019 $0.00359
Haiku 4.5 $0.00010 $0.00179

Measured 10d ago against content hash d6f504294a92, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

sage-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 10d 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.

sage-memory/SKILL.md · 157 lines

How it starts

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

SAGE Memory — Persistent Brain for AI Agents

You have persistent institutional memory via SAGE — a governed, consensus-validated knowledge layer. Your memories are not a flat file. They go through BFT consensus, have confidence scores, and decay over time. Only committed memories are returned to you.

Data & Privacy Disclosure

This skill enables persistent memory storage for AI agents. By design:

  • What is stored: Observations you write via sage_turn and sage_remember — typically summaries of conversation topics, task outcomes, and user preferences. The agent decides what to store; raw conversation transcripts are NOT automatically captured.
  • Where data lives: All data is stored locally on your machine in ~/.sage/data/sage.db (SQLite). Nothing is sent to any cloud service. SAGE runs entirely on localhost.
  • Persistence: Memories survive across conversations. This is the core purpose of the skill. Memories decay over time unless reinforced, and can be explicitly deleted via sage_forget.
  • Configuration: The .mcp.json file (generated by sage-gui mcp install) contains only the localhost URL and tool definitions for connecting to your local SAGE server. It contains no credentials, API keys, or sensitive tokens.
  • Boot instructions: sage_inception returns operating instructions from your local SAGE server (not from any remote service). These instructions tell the agent how to use the memory tools effectively. You can customize them via the CEREBRUM dashboard at http://localhost:8080/ui/.
  • Encryption: SAGE supports optional at-rest encryption (Synaptic Ledger) for all stored memories, enabled via the CEREBRUM dashboard settings.
  • Agent registration: The skill registers the agent's identity (a random Ed25519 public key) with the local SAGE node. This is used for memory attribution, not for tracking.

Boot Sequence (MANDATORY)

On the first message of every new conversation, before responding to the user:

Read the full file on GitHub · 157 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. 10d ago First seen · 157 lines · 97 tokens per session scan A d6f504294a92

Subscribe to this mod's changes

sage-memory is a skill published in the GitHub repository l33tdawg/sage (245 stars, last pushed 3d ago), licensed Apache-2.0. It adds 97 tokens to every session and 1,793 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

memory-audit

An entry point for reviewing and maintaining an AI agent's stored memories. It describes how to remove repetition, preserve useful reasoning, and update memories when old conclusions no longer fit.

Dataojitori/nocturne_memory · 31 tokens

memory-audit-belief-duel

A guided review process for conflicting beliefs or memories. It examines cases where two conclusions cannot both be true, including conflicts between a general rule and a more specific memory.

Dataojitori/nocturne_memory · 38 tokens

memory-audit-discoverability

A review guide for checking whether stored memories can be found at the right time. It focuses on where memories are attached, when they are triggered, whether aliases are missing, and whether a parent has too many children.

Dataojitori/nocturne_memory · 35 tokens

memory-audit-node-decomposition

A method for splitting an oversized knowledge note into smaller notes, each focused on one independent idea. It also explains how to keep useful core information in the original note.

Dataojitori/nocturne_memory · 34 tokens

memory-audit-pattern-extraction

A method for investigating repeated mistakes by comparing related memories and checking whether an earlier reminder failed. It looks at where the reminder was stored, when it was created, and whether it was strong enough to prevent the mistake.

Dataojitori/nocturne_memory · 48 tokens

memory-audit-dead-data-purge

A review process for identifying memories that do not change future actions. It tests whether a note contains useful, experience-based guidance or only sounds meaningful without affecting decisions.

Dataojitori/nocturne_memory · 37 tokens