save-memory

save-memory is a skill for Claude Code from aiya000/dotfiles. It costs 34 tokens per session (1,710 once invoked), scanned A, original, MIT.

A tool that saves a compact summary of the current conversation as a memory file for later agent sessions.

In plain words
What is it for?
Use it when you want to save, remember, or note the work done in the current session.
Why use it?
It preserves useful decisions and context so a future session can continue without rereading the whole conversation.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; mentions Claude Code; mentions AGENTS.md.

Good fit Use it when you want to save, remember, or note the work done in the current session.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/aiya000/dotfiles/save-memory"><img src="https://agentmods.dev/badge/skills/aiya000/dotfiles/save-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,710 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 20
    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.00034 $0.01710
Opus 5.5 $0.00014 $0.00684
Sonnet 5.5 $0.00007 $0.00342
Haiku 4.5 $0.00003 $0.00171

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

Security

Grade A, and why

save-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 11d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (count-tokens.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude_global/skills/save-memory/SKILL.md · 124 lines

How it starts

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

save-memory

Distills the current conversation into a compact memory file that a future session loads to restore context. Only an AI reads these files, never a person. Write for a model that will pay tokens for every character: dense, English, no prose.

This is the durable half of a handoff

create-handoff runs this skill first and then writes only what does not belong here, so when the two run together they divide the session rather than repeating it:

  • Here: decisions with their reasons, gotchas, the user's preferences, what is still open -- anything still worth having in a month, for any later session
  • The handoff: where the branch stands right now, what to do first, who is waiting on what, how the user is doing -- stale within days

So write the lasting facts here without worrying that the handoff will want them, and report the path of the file written -- create-handoff puts it in the handoff's first section, and read-handoff follows it back.

When the user asks for it right after a run

If the user explicitly asks to run this skill, and it already ran just before in this session -- on your own judgement or at an earlier request, with no substantial work in between -- do not run it again straight away. AskUserQuestion first, naming the file that run wrote: "Run again" / "Skip". Run only on "Run again"; on "Skip", just report the existing file's path.

A second run right after the first has nothing new to distill, and would only append a duplicate block to the same file.

Steps

  1. Use the current conversation as the source
  2. Get the timestamp: date +%Y-%m-%d_%H:%M
  3. Get ~/.ai-memory ready with the sync-memory skill (prepare). It is a git repository shared with Claude Code cloud sessions, so this pulls it first -- and in a cloud session, clones it. If it reports that ~/.ai-memory is not set up, stop and ask the user to set it up. Do not create it
    • ls ~/.ai-memory to see existing files; reuse a file for the same project+topic
  4. Secret scan the content you are about to write:
    • Keys/tokens: ghp_, gho_, AKIA, sk-, xox, -----BEGIN.*PRIVATE KEY
    • Sensitive assignments: API_KEY=, _SECRET=, _TOKEN=, PASSWORD=
    • Absolute home paths (/home/<name>/, /Users/<name>/) -- write ~ instead
    • Proper nouns identifying a person or organisation

Read the full file on GitHub · 124 lines

Files

What ships with it

1 file 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. 11d ago Changed · +5 lines 1c85595519a3
  2. 18d ago Changed 40655c41c9b2
  3. 21d ago Changed · +4 lines e2c17648a504
  4. 22d ago Changed · +10 lines 0d2cc426ac17
  5. 1mo ago Changed · +14 lines 53ad9e9c3178
  6. 1mo ago Changed 815ad4df29eb
  7. 1mo ago First seen · 91 lines · 34 tokens per session scan A 9b27fe64b4c7

Subscribe to this mod's changes

save-memory is a skill published in the GitHub repository aiya000/dotfiles (21 stars, last pushed 3d ago), licensed MIT. It adds 34 tokens to every session and 1,710 once invoked, about $0.0001 per session on Opus 5.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.