memory-sync

A workflow for saving useful session knowledge into a project memory layer. It can store context, definitions, lessons, and small settled decisions in files such as CLAUDE.md and a memory folder.

In plain words
What is it for?
Saving notes on request, adding terms to a glossary, recording lightweight decisions, and preserving session learnings for later work.
Why use it?
It prevents important decisions and terminology from being lost between sessions. It also supports looking up unfamiliar named references and consolidating knowledge at session end.

Skill for Claude CodeCodex

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/ramboz/jig/memory-sync
Any agent
npx skills add ramboz/jig --skill memory-sync
Clone the repo
git clone --depth 1 https://github.com/ramboz/jig

Made for: Claude Code, Codex.

Per session 228 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,367 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.00228 $0.03367
Opus 5 $0.00114 $0.01684
Sonnet 5 $0.00046 $0.00673
Haiku 4.5 $0.00023 $0.00337

Measured 2d ago against content hash e10cf6dca870, 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 2d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (decisions.py, memory.py), 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.

hosts/claude/skills/memory-sync/SKILL.md · 246 lines

How it starts

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

Spec 002 (memory layer) is fully closed — all four slices DONE: 002-01 (explicit-sync), 002-02 (lookup-pattern), 002-03 (auto-detect-hooks), 002-04 (reconciliation-integration). 002-04's reconciliation integration is now the Memory-sync gate in the spec-workflow reconciliation checklist.

What this skill does

Persists session-derived context to the memory layer via a deterministic helper. Claude makes the what / where decisions; memory.py does the file I/O, idempotency, and self-healing of missing memory structure.

When to invoke

  • User says "remember this", "save this for later", "add this to the glossary", "note this down", or similar (→ persist flow below).
  • User explicitly invokes /jig:memory-sync.
  • An unknown capitalized reference appears in the conversation (→ lookup-pattern flow below).
  • Session-end consolidation (after slice 002-03 auto-trigger ships).
  • The session settled a non-spec shipped decision — a UI string, visual/CSS choice, translation correction, or scoped brand/icon call made outside a spec slice (→ lightweight-decision flow below). This is the forcing function for out-of-spec work, which has no reconciliation phase to catch it.

Lookup-pattern flow

When you see a capitalized reference, acronym, or project-specific term you don't recognize, follow this flow before asking the user:

seen unknown reference X
  ↓
python3 memory.py lookup "X" .
  ↓ exit 0 → use the printed definition; do not ask
  ↓ exit 2 → ask the user once: "I don't recognize X — what is it?"
  ↓ user answers
  ↓
python3 memory.py add-term "X" "<definition>" .   (or promote if high-frequency)
  ↓ next time X appears, lookup hits

Concretely, the commands are:

python3 "${CLAUDE_PLUGIN_ROOT}/skills/memory-sync/memory.py" lookup "<term>" "<target>"
# exit 0 = hit (definition + source on stdout)
# exit 2 = miss (proceed to ask the user)

The lookup is case-insensitive and checks hot cache first, then glossary. Hot cache hits win when a term exists in both (the user has explicitly elevated it).

Read the full file on GitHub · 246 lines

Files

What ships with it

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

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. 2d ago First seen · 246 lines · 228 tokens per session scan A e10cf6dca870

Subscribe to this mod's changes

memory-sync is a skill published in the GitHub repository ramboz/jig (6 stars, last pushed 2d ago), licensed MIT. It adds 228 tokens to every session and 3,367 once invoked, about $0.0011 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-31.

Related

Other skills, from other repositories

frappe-lms

Frappe LMS customization guidance for courses, batches, lessons, quizzes, assessments, enrollment, progress, certificates, portals, and learning workflows. Use when work touches Frappe LMS or education/training flows.

Dkm0315/frappe-agent · 48 tokens

baoyu-comic

Knowledge comic creator supporting multiple art styles and tones. Creates original educational comics with detailed panel layouts and batch-capable image generation. Use when user asks to create "知识漫画", "教育漫画", "biography comic", "tutorial comic", or "Logicomix-style comic".

JimLiu/baoyu-skills · 61 tokens

learn

Knowledge compiler. Extracts patterns, decisions, and anti-patterns from completed campaigns and evolve cycles, then compiles them into structured wiki pages that integrate with existing knowledge rather than appending isolated files. Implements flush→compile→lint pipeline. Auto-triggered by /postmortem and /evolve…

SethGammon/Citadel · 66 tokens

zapier-demo

Walk a new user through setting up their first Zapier action and running it live — the smallest possible win. Asks what app they use, recommends one read action to enable, guides them to mcp.zapier.com to add it, then demonstrates it working in the same chat. Use when the user asks "show me how Zapier works", "set up…

zapier/zapier-mcp · 121 tokens

logical-thinking

Determine what follows from explicit premises, rules, evidence, documentation, or observations by selecting and executing the appropriate inference structure. Use when validity, entailment, contradiction, causality, probability, explanation, or the exact strength of a conclusion is central. Do not invoke merely to…

TheGoat395/Codex-Skills · 67 tokens

learning-coach

中文高级私人学习教练。用户说“开始学习 X”“继续/下一课”“学完了”“记录进度/打卡”“我学到哪了/还要多久”,正在通过真实项目、源码、作品、题目或任务学习编程、Agent、写作、语言、考试、研究或职业技能,或对具体概念和材料连续追问时使用。触发后主动读取学习现场、学习记录、进度、用户背景和真实材料,替用户选择最近发展区与入口,一次只给一个动作或问题,并用解释、实践、反馈和迁移证据推进掌握。不要让用户先设计课程、选择材料或填写长问卷;只有方向取舍本身尚未解决且会造成明显浪费时,才交给 focus-coach。.

chrichuang218/ai-learning-coach · 179 tokens