persistent-memory

A plain-markdown memory system that saves and retrieves conversation context under named topics, such as work or a project. It can also combine, list, or remove stored memories.

In plain words
What is it for?
Use it to remember new information, recall past context, consolidate notes, list memory topics, or forget stored details.
Why use it?
It prevents useful context from being lost between conversations and lets you control which topic-specific information is retained.

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

Made for: Claude Code, Codex.

Per session 375 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,610 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.00375 $0.03610
Opus 5 $0.00187 $0.01805
Sonnet 5 $0.00075 $0.00722
Haiku 4.5 $0.00038 $0.00361

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

Security

Grade A, and why

persistent-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.

skills/authoring/persistent-memory/SKILL.md · 288 lines

How it starts

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

Persistent Memory

Capture, recall, consolidate, and forget memories scoped to a user-chosen topic (e.g. parenting, work, relationship-anna) as plain markdown files, so any future conversation can pick up where the last one left off.

This SKILL.md is a thin index. Operation pipelines, taxonomy, privacy rules, integration patterns, and scaling guidance live in rules/*.md and load on demand. Literal artefact templates live in templates/*.md. Worked examples and citations live in references/*.md. Read only what the current operation asks for.


Mode Detection

Parse $ARGUMENTS (first token) and detect the operation:

Operation Default Trigger phrases
write yes "remember", "save to memory", "add to memory", $0 == "write"
read "recall", "load memory", "what do you remember about", $0 == "read"
consolidate "consolidate memory", "compress memory", $0 == "consolidate"
forget "forget that", "delete memory", "redact", $0 == "forget"
list "list memory", "what scopes do I have", $0 == "list"

State the detected operation and resolved scope in one line before continuing. Example:

Operation: write
Scope: parenting
Storage tier: home (~/.agent-memory/parenting/)

If no scope is provided, ask once (single batched message) — never guess.


Required Reading by Operation

Load on demand — do not preload.

Operation Files
write rules/storage-layout.md, rules/write-pipeline.md, rules/memory-taxonomy.md, rules/privacy-and-consent.md
read rules/storage-layout.md, rules/read-pipeline.md
consolidate rules/consolidate-pipeline.md, rules/memory-taxonomy.md
forget rules/forget-pipeline.md, rules/privacy-and-consent.md
list rules/storage-layout.md
integration rules/integration-with-skills.md
scaling rules/scaling-tiers.md
pre-flight rules/quality-checklist.md, rules/anti-patterns.md

Read the full file on GitHub · 288 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. 2d ago First seen · 288 lines · 375 tokens per session scan A 28fd366f7e60

Subscribe to this mod's changes

persistent-memory is a skill published in the GitHub repository mthines/agent-skills (10 stars, last pushed 3d ago), licensed MIT. It adds 375 tokens to every session and 3,610 once invoked, about $0.0019 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

ego-browser

Skill "ego-browser" from citrolabs/ego-lite, covering ego-browser, quick start, common helpers, task spaces and control handoff.

citrolabs/ego-lite · 210 tokens

temporal-developer

Develop, debug, and manage Temporal applications across Python, TypeScript, Go, Java, .NET, Ruby, and Rust. Use when the user is building workflows, activities, or workers with a Temporal SDK, debugging issues like non-determinism errors, stuck workflows, or activity retries, using Temporal CLI, Temporal Server, or…

temporalio/skill-temporal-developer · 161 tokens

x-algorithm

Write X (Twitter) posts that the For You algorithm actually rewards. Grounded in the open-sourced X recommendation system — the Grok-based transformer ranker, Phoenix retrieval, Thunder in-network store, and Grox content-understanding pipeline. Use when the user wants to write a post, thread, reply, or quote; plan a…

carson2222/skills · 152 tokens

opencode-memory

Browse local OpenCode history: sessions, messages, plans, prompt history, and prior decisions. Use when the user says history, previous session, last time, remember, recall, plans, prior work, or when resuming/debugging repeated work where earlier OpenCode context may help. Do not use for fresh tasks or when current…

carson2222/skills · 77 tokens

creating-explainers

Use when creating an interactive explainer - a single self-contained HTML page with hand-built Canvas figures. Handles source-file explainers, topic-driven research explainers, and mixed intake where files provide the spine and research adds support. Trigger phrases include "make an explainer", "turn this paper into…

analyticalmonk/explain-this · 98 tokens

custom-icons

Create or refine custom icon assets as native or traced SVGs and transparent PNG/WebP files. Use when the user asks for a bespoke icon or cohesive icon set, wants an image traced into a clean vector, or needs a detailed or 3D icon with transparency.

JKc66/custom-icons-skill · 57 tokens