sync-memory

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

A Git-based shared memory store for local computers and Claude Code cloud sessions. It synchronises memory files and handoff notes before reading or writing them.

In plain words
What is it for?
It prepares the memory repository, pulls the latest files, and publishes new or changed memory and handoff files.
Why use it?
It keeps separate coding sessions from using stale context or losing notes. Git provides the sharing and version history between sessions.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Good fit It prepares the memory repository, pulls the latest files, and publishes new or changed memory and handoff files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aiya000/dotfiles/sync-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 sync-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 sync-memory

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/aiya000/dotfiles/sync-memory"><img src="https://agentmods.dev/badge/skills/aiya000/dotfiles/sync-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,420 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.
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.00092 $0.01420
Opus 5.5 $0.00037 $0.00568
Sonnet 5.5 $0.00018 $0.00284
Haiku 4.5 $0.00009 $0.00142

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

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/sync.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/sync-memory/SKILL.md · 104 lines

How it starts

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

sync-memory

~/.ai-memory/ is a git repository. The local machine and every Claude Code cloud session read and write the same one, so each side pulls before it reads and pushes after it writes. This skill is that pull and that push; the skills that write memory call it rather than running git themselves.

~/.ai-memory/
├── MEMORY-INDEX.md        # save-memory's index (merge=union, see below)
├── YYYY-MM-DD-*.md        # memory files (save-memory)
└── handoff/
    └── <project>-<YYYY-MM-DD-HHMM>.md   # handoffs (create-handoff / read-handoff / pop-handoff)

Never write out the real target of ~/.ai-memory -- not in a reply, a commit message, or a file. Refer to it as ~/.ai-memory/ and to the repository as "the memory repository". The script never prints it either.

The script is scripts/sync.sh in this skill's directory.

prepare -- before reading or writing

bash <this skill>/scripts/sync.sh prepare
  • Local: ~/.ai-memory is a symlink to a clone; this pulls it. If it is not a symlink, the script stops (exit 3): ask the user to set it up, and do not create it
  • Cloud session (CLAUDE_CODE_REMOTE=true), when ~/.ai-memory does not exist yet:
    1. AI_MEMORY_REPO must be set. If not, stop and tell the user to add it (AI_MEMORY_REPO=<owner>/<name>) to the cloud environment's environment variables
    2. Add the repository to the session with the add_repo tool (claude-code-remote MCP server; load it with ToolSearch if it is deferred), then call it with that owner and name and access: "push". If it is refused, relay its reason as it is -- the usual one is that the Claude GitHub App is not installed on the memory repository -- and stop
    3. Run prepare, passing the clone URL add_repo returned, if it returned one: sync.sh prepare <url>. It clones into ${XDG_CACHE_HOME:-~/.cache}/ai-memory and points ~/.ai-memory at it. This is the one place a symlink at ~/.ai-memory is created on the user's behalf: a fresh container has nothing to protect, and nothing else can work
  • prepare is cheap on a second run (it only pulls). Run it once per skill that uses memory

Read the full file on GitHub · 104 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. 10d ago Changed · +13 lines feb880b2da89
  2. 17d ago First seen · 91 lines · 92 tokens per session scan A d189beeec827

Subscribe to this mod's changes

sync-memory is a skill published in the GitHub repository aiya000/dotfiles (21 stars, last pushed 2d ago), licensed MIT. It adds 92 tokens to every session and 1,420 once invoked, about $0.0004 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-09-29.