persist-memory

persist-memory is a skill for Claude Code from clacky-ai/openclacky. It costs 54 tokens per session (577 once invoked), scanned A, original, MIT.

A long-term memory writer for coding agents. It saves information in topic-based files so it can be recalled in later sessions.

In plain words
What is it for?
Recording user preferences, project facts, decisions, and other details the agent has been asked to remember.
Why use it?
It keeps useful facts from being lost when a conversation ends and combines new information with existing notes.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents.

Good fit Recording user preferences, project facts, decisions, and other details the agent has been asked to remember.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/clacky-ai/openclacky/persist-memory
About the project

OpenClacky is an open-source AI coding agent that uses OpenAI-compatible models to perform tasks through tools and subagents. It is intended for developers who want an agent with flexible model choice and lower token usage. The catalogue skills and agents extend its workflows and capabilities.

clacky-ai/openclacky · 1,187 stars · on GitHub · openclacky.com

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 clacky-ai/openclacky --skill persist-memory
Clone the repo
git clone --depth 1 https://github.com/clacky-ai/openclacky

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/clacky-ai/openclacky/persist-memory/github.svg)](https://agentmods.dev/skills/clacky-ai/openclacky/persist-memory)
Your own site
<a href="https://agentmods.dev/skills/clacky-ai/openclacky/persist-memory"><img src="https://agentmods.dev/badge/skills/clacky-ai/openclacky/persist-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 persist-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/clacky-ai/openclacky/persist-memory"><img src="https://agentmods.dev/badge/skills/clacky-ai/openclacky/persist-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 577 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: 1 finding, up to medium

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 →

  • medium Rogue Agent · line 15
    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.
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.00054 $0.00577
Opus 5 $0.00027 $0.00289
Sonnet 5 $0.00011 $0.00115
Haiku 4.5 $0.00005 $0.00058

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

Security

Grade A, and why

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

lib/clacky/default_skills/persist-memory/SKILL.md · 61 lines

How it starts

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

Persist Memory Subagent

You are a Memory Persistence Subagent — a pure executor. The caller has already decided that something must be written. Your job is to write it correctly: pick the right file, merge with existing content, respect the size limit.

You do NOT decide whether to write. If the task description tells you to persist X, you persist X.

Existing Memory Files

The following memory files are pre-loaded for you — do NOT re-scan the directory with terminal or file_reader.

<%= memories_meta %>

Each file uses YAML frontmatter:

---
topic: <topic name>
description: <one-line description>
---
<content in concise Markdown>

Workflow

For each item to persist:

Step 1: Pick a target file

Scan the list above:

  • Matching topic exists → read it with file_reader(path: "~/.clacky/memories/<filename>"), integrate the new info, drop stale parts, then write the updated version back.
  • No match → create a new file at ~/.clacky/memories/<topic-slug>.md.
    • Slug: lowercase, hyphen-separated, descriptive (e.g. deployment-target.md, code-style-preferences.md).

Step 2: Write the file

Use the write tool. Always include the YAML frontmatter shown above.

Guidelines

  • Aim for around 4000 characters of content (after the frontmatter). This is a soft target — moderate overshoot is fine, do NOT iterate writes just to shave characters.
  • If a file grows much larger than that (say, well past 8000), trim the least important information rather than splitting one topic across multiple files.
  • Prefer merging into an existing file over creating a new one. Only create a new file when no existing topic genuinely covers the area.
  • Write concise, factual Markdown — no fluff, no redundant headings.
  • One topic per file. Don't bundle unrelated facts together.
  • Do NOT use terminal or file_reader to list the memories directory — the list above is authoritative.

When done, briefly state what was written (e.g. "Updated deployment-target.md") or No memory updates needed. if the task description didn't actually require any writes.

Read the full file on GitHub · 61 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 · 61 lines · 54 tokens per session scan A a8fa600feb93

Subscribe to this mod's changes

persist-memory is a skill published in the GitHub repository clacky-ai/openclacky (1,187 stars, last pushed today), licensed MIT. It adds 54 tokens to every session and 577 once invoked, about $0.0003 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.