memory-sync

memory-sync is a skill for Claude Code, Codex from a-ariff/ariff-claude-plugins. It costs 6 tokens per session (507 once invoked), scanned A, original, MIT.

A procedure for manually saving task learnings to two memory systems: one for quick semantic recall and one organized as notes in an Obsidian vault. It also describes recording reusable instructions for future tasks.

In plain words
What is it for?
It helps record task context, solutions, lessons, commands, related work, and future coding instructions.
Why use it?
It keeps useful context from disappearing when a task ends. The excerpt does not show automatic syncing or the exact memory tools available in every environment.

Skill for Claude CodeCodex

Part of the memory-sync plugin — 1 skill shipped together

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.

agentmods
npx agentmods add skills/a-ariff/ariff-claude-plugins/memory-sync
Any agent
npx skills add a-ariff/ariff-claude-plugins --skill memory-sync
Clone the repo
git clone --depth 1 https://github.com/a-ariff/ariff-claude-plugins

Made for: Claude Code, Codex.

Or install memory-sync, the plugin that ships this one along with the rest of its 1 skill.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/a-ariff/ariff-claude-plugins/memory-sync.svg)](https://agentmods.dev/skills/a-ariff/ariff-claude-plugins/memory-sync)
Your own site
<a href="https://agentmods.dev/skills/a-ariff/ariff-claude-plugins/memory-sync"><img src="https://agentmods.dev/badge/skills/a-ariff/ariff-claude-plugins/memory-sync.svg" alt="Measured on agentmods" height="20"></a>
Per session 6 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 507 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00006 $0.00507
Opus 5 $0.00003 $0.00253
Sonnet 5 $0.00001 $0.00101
Haiku 4.5 $0.00001 $0.00051

Measured 3d ago against content hash 3568d9c7aa1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory-sync 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 3d 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.

plugins/memory-sync/skills/memory-sync/SKILL.md · 106 lines

What it actually says

Memory Sync Skill

How to manually sync learnings to memory systems after tasks.

Dual Memory Architecture

Ariff uses two complementary memory systems:

  • mem0-memory-mcp - AI-native semantic memory for quick recall
  • obsidian-memory - Structured vault for long-term knowledge

Manual Sync Commands

Quick Save to mem0

Use mcp__mem0-memory-mcp__add_memory to store:
- Task context and solution
- Key learnings and gotchas
- Useful commands discovered

Save to Obsidian

Use mcp__obsidian-memory__create_note with:
- path: "tasks/YYYY-MM-DD-task-slug.md"
- content: Structured task notes

Memory Entry Template

## Task: [Brief Title]
Date: [YYYY-MM-DD]
Device: [hostname]

### Problem
[What was the issue/request]

### Solution
[How it was resolved]

### Key Learnings
- [Learning 1]
- [Learning 2]

### Related
- Previous tasks: [links]
- Documentation: [links]

Creating Agent Instructions

When a mistake or pattern should be avoided in future:

  1. Create instruction file at:

    Ariff-code-config/instructions/[category]-[topic].instructions.md
    
  2. Use format:

    ---
    description: [What this instruction prevents/ensures]
    applyTo: [glob pattern like **/*.py or **/canvas/**]
    ---
    
    # [Rule Title]
    
    ## Context
    [When this applies]
    
    ## Rule
    [What to do/not do]
    
    ## Example
    [Good vs bad example]
    
  3. Add to 00_INSTRUCTIONS_INDEX.md if significant

Reconciliation

If memories seem out of sync:

  1. Query both systems for topic
  2. Compare entries
  3. Update older system with newer info
  4. Remove duplicates with less detail

When to Save

Save memory when:

  • ✅ Task completed successfully
  • ✅ Discovered non-obvious solution
  • ✅ Made mistake worth remembering
  • ✅ Found useful tool/command
  • ✅ Clarified user preference

Skip saving when:

  • ❌ Trivial task (simple file edit)
  • ❌ Already documented elsewhere
  • ❌ One-off unique situation
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. 3d ago First seen · 106 lines · 6 tokens per session scan A 3568d9c7aa1d

Subscribe to this mod's changes

memory-sync is a skill published in the GitHub repository a-ariff/ariff-claude-plugins (14 stars, last pushed 5mo ago), licensed MIT. It adds 6 tokens to every session and 507 once invoked, about $0.0000 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.