memory-persistence

memory-persistence is a skill for Claude Code from arturseo-geo/claude-code-skills. It costs 140 tokens per session (4,874 once invoked), scanned B, original, MIT.

A guide to giving Claude Code memory that survives after a session ends. It covers files and other storage patterns for keeping project facts, session summaries, and accumulated knowledge.

In plain words
What is it for?
Use it to save stable project instructions, resume unfinished work, record evolving knowledge, or build memory for multi-user agents.
Why use it?
It reduces the need to repeat project context when starting a new session, since Claude Code otherwise begins without the previous conversation.

Skill for Claude Code

Written for Claude Code: UserPromptSubmit hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Good fit Use it to save stable project instructions, resume unfinished work, record evolving knowledge, or build memory for multi-user agents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arturseo-geo/claude-code-skills/memory-persistence
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 arturseo-geo/claude-code-skills --skill memory-persistence
Clone the repo
git clone --depth 1 https://github.com/arturseo-geo/claude-code-skills

Made for: Claude Code.

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-persistence

README.md
[![agentmods](https://agentmods.dev/badge/skills/arturseo-geo/claude-code-skills/memory-persistence/github.svg)](https://agentmods.dev/skills/arturseo-geo/claude-code-skills/memory-persistence)
Your own site
<a href="https://agentmods.dev/skills/arturseo-geo/claude-code-skills/memory-persistence"><img src="https://agentmods.dev/badge/skills/arturseo-geo/claude-code-skills/memory-persistence/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 memory-persistence

Your own site · 80×15
<a href="https://agentmods.dev/skills/arturseo-geo/claude-code-skills/memory-persistence"><img src="https://agentmods.dev/badge/skills/arturseo-geo/claude-code-skills/memory-persistence.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,874 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00140 $0.04874
Opus 5.5 $0.00056 $0.01950
Sonnet 5.5 $0.00028 $0.00975
Haiku 4.5 $0.00014 $0.00487

Measured 2mo ago against content hash 0c09dbebf517, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

memory-persistence scanned grade B with 1 finding 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 2mo 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

tail -20 .claude/memory.jsonl 2>/dev/null || true
skills/memory-persistence/SKILL.md · 583 lines

How it starts

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

Memory Persistence Skill

Memory Architecture Overview

Claude Code has no built-in cross-session memory — every new session starts blank. There are six patterns to solve this, ranging from simple to powerful:

Pattern Best for Complexity
CLAUDE.md injection Small, stable facts Low
Session summary files Resuming complex work Low
Append-only JSONL Evolving agent knowledge Medium
Graph-based memory Relationship-rich knowledge Medium
Hooks (stop/pre/post) Auto-saving and auto-loading Medium
MCP memory servers Production multi-user agents High

Pattern 1: CLAUDE.md Injection (Always-On Facts)

CLAUDE.md is Claude Code's built-in memory layer. It loads automatically at session start, making it the simplest persistence mechanism. There are three levels:

File Scope Loads when
~/.claude/CLAUDE.md All projects (global) Every session
CLAUDE.md (project root) This project only When in project dir
.claude/CLAUDE.md This project (hidden) When in project dir

All three merge at session start. Use the right level for each fact.

Example CLAUDE.md structure:

## Project Context
- Stack: Next.js 14, Supabase, Tailwind, Vercel
- Auth: Clerk (not NextAuth)
- Primary branch: main (never commit directly)
- Test command: pnpm test:unit
- Deployment: auto on push to main via Vercel

## Key Decisions
- We use Zod for all validation, not Yup
- All API routes live in /app/api, never /pages/api
- Error handling pattern: see /lib/errors.ts

CLAUDE.md Size Limits

Keep it under 150 lines — it loads every session, consuming tokens permanently. Move verbose details to reference files and @-import them only when needed.

Content type Put in CLAUDE.md? Alternative
Stack, tools, test commands Yes —
Architectural decisions (< 10) Yes —
Long reference tables No references/*.md + @-import
API docs No Separate file, load on demand
Session state No Session files (Pattern 2)

Read the full file on GitHub · 583 lines

Files

What ships with it

5 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. 2mo ago First seen · 583 lines · 140 tokens per session scan B 0c09dbebf517

Subscribe to this mod's changes

memory-persistence is a skill published in the GitHub repository arturseo-geo/claude-code-skills (13 stars, last pushed 7mo ago), licensed MIT. It adds 140 tokens to every session and 4,874 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

memory-persistence compared with skills from other repositories

memory-persistence next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
memory-persistencearturseo-geo/claude-code-skillsSkill137mo agoMITB140Claude Code
mem-searchsoftspark/ai-toolkitSkill17910d agoApache-2.0A23Claude Code
pavemanellmos-ai/skillsSkill94d agoMITA199Claude Code, Codex
agents-bridgeellmos-ai/skillsSkill94d agoMITA48Claude Code, Codex
staircase-routingellmos-ai/skillsSkill94d agoMITA92Claude Code, Codex
build-your-users-mindellmos-ai/skillsSkill94d agoMITA97Claude Code, Codex
context-managerkhalilbenaz/claude-skills-collectionSkill272mo agoMITA84Claude Code, Codex