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 | $0.00070 | $0.02437 |
| Sonnet 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 9d 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.
- 9d 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 (11 stars, last pushed 5mo ago), licensed MIT. It adds 140 tokens to every session and 4,874 once invoked, about $0.0007 per session on Opus 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.
Other skills, from other repositories
continuous-learning-v2
Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.
memory-hygiene
Keep agent-written memory files from rotting. Audits /.claude/projects/ /memory/ for facts the tree now contradicts — stale version pins, passed sequence facts, vanished paths — plus MEMORY.md index drift, and enforces the memory format contract at write time. Use when the user says "audit my memory", "memory is…
learn-on-failure
Save a learning to project memory. Invoke automatically (without the user asking) whenever a task required more than one fix cycle to resolve — e.g. a test failed and needed a second attempt, a compile error required a correction, an API behaved unexpectedly, or an assumption proved wrong mid-task. Also invoke when…
letter-hooker
Erweitert automation-self-care um Letter Hooks, Preflight-Bootloader, Dokument-Traversierungsregeln und selbstheilende Prompt-Kontext- Anreicherung für KI-Agenten und CLIs ohne native, ereignisgetriebene JSON-Lifecycle-Hooks (wie Antigravity / Gemini CLI). Nutzen, wenn ein Agent Preflight-Regeln injizieren, vor…
hive.note-taking
Maintain a free-form scratchpad of decisions, extracted values, and open questions so context pruning doesn't lose anything you still need.
security-compliance
Guides security professionals in implementing defense-in-depth security architectures, achieving compliance with industry frameworks (SOC2, ISO27001, GDPR, HIPAA), conducting threat modeling and risk assessments, managing security operations and incident response, and embedding security throughout the SDLC.