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.
npx skills add arturseo-geo/claude-code-skills --skill memory-persistencegit clone --depth 1 https://github.com/arturseo-geo/claude-code-skillsWrote 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.
[](https://agentmods.dev/skills/arturseo-geo/claude-code-skills/memory-persistence)<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.
<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>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.
| Model | Per session | Once 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 |
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 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) |
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.
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.
- 2mo ago First seen · 583 lines · 140 tokens per session scan B 0c09dbebf517
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.
memory-persistence compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| memory-persistencearturseo-geo/claude-code-skills | Skill | 13 | 7mo ago | MIT | B | 140 | Claude Code |
| mem-searchsoftspark/ai-toolkit | Skill | 179 | 10d ago | Apache-2.0 | A | 23 | Claude Code |
| pavemanellmos-ai/skills | Skill | 9 | 4d ago | MIT | A | 199 | Claude Code, Codex |
| agents-bridgeellmos-ai/skills | Skill | 9 | 4d ago | MIT | A | 48 | Claude Code, Codex |
| staircase-routingellmos-ai/skills | Skill | 9 | 4d ago | MIT | A | 92 | Claude Code, Codex |
| build-your-users-mindellmos-ai/skills | Skill | 9 | 4d ago | MIT | A | 97 | Claude Code, Codex |
| context-managerkhalilbenaz/claude-skills-collection | Skill | 27 | 2mo ago | MIT | A | 84 | Claude Code, Codex |