refigure: Command for Claude Code

.claude/commands/memory-sync.md

memory-sync is a command for Claude Code from HelgDemidov/refigure. It costs 15 tokens per session (2,327 once invoked), scanned A, original, Apache-2.0.

A memory-audit command checks claims in CLAUDE.md and the memory directory against the current code and its history. CLAUDE.md is a project instruction file for Claude, and the memory directory stores project notes for future sessions.

In plain words
What is it for?
Run it periodically, before work that depends on project memory, or manually in a fresh session to correct stale claims and flag claims that cannot be checked.
Why use it?
It helps find notes that are outdated or false without adding unverified new facts.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is HelgDemidov/refigure's own configuration. It tells Claude Code how to work on refigure itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything refigure configures →

Reuse

Borrowing it

Nothing to install: this file belongs to HelgDemidov/refigure. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/HelgDemidov/refigure/main/.claude/commands/memory-sync.md
Clone the repo
git clone --depth 1 https://github.com/HelgDemidov/refigure

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/helgdemidov/refigure/memory-sync"><img src="https://agentmods.dev/badge/commands/helgdemidov/refigure/memory-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,327 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.00015 $0.02327
Opus 5.5 $0.00006 $0.00931
Sonnet 5.5 $0.00003 $0.00465
Haiku 4.5 $0.00002 $0.00233

Measured 2mo ago against content hash 184da64e6a18, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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.

.claude/commands/memory-sync.md · 91 lines

How it starts

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

/memory-sync — audit and synchronize project memory against the real repo state

Recurring, not a one-off: bring every checkable claim in CLAUDE.md and the memory directory in line with the live code and history. Run manually, periodically, or before a large batch of work that will lean on memory being correct. Run in a fresh session, this task alone.

This is an audit of truth, not completeness — do NOT add new facts (that's /post-merge-sync's job), only fix stale/false claims and flag unverifiable ones. The evidence discipline below is mandatory because fact-checking by hand at this volume is impossible.

Paths: memory at the harness-provided project memory directory (the session states the resolved path — never hard-code one, it differs per machine/checkout). Audit working files at .claude/memory-sync/ (worklist, last-run record, backup archive) — created on first run; its absence means no audit has ever happened. This lives under .claude/, not docs/, because these are ephemeral, machine-tied run artifacts (worklist/backup churn on every run), not project documentation, even though docs/ is itself gitignored/local-only too now (2026-08-19) and wouldn't leak them publicly either — .gitignore's .claude/* rule keeps this specific state untracked the same way.

1. Sources of truth (descending priority)

  1. Live code: refigure/, tests/, build/tool config (pyproject.toml, requirements.txt, requirements-dev.txt, .python-version), .gitignore, and .claude/commands/*.md.
  2. Version control: git log, merge history, PR metadata (gh).
  3. Filesystem: path existence, directory layout, generated artifacts.

Note: .claude/commands/*.md IS tracked in this repo (.gitignore allow-lists it, unlike some sibling repos where it's local-only) — still a source of truth either way.

NOT sources of truth — they're the patients, or derivatives: CLAUDE.md, memory files, and docs/ (has its own sync via /post-merge-sync). Do not edit those as evidence. Exception: a memory claim ABOUT a document ("the spec lives at path X") — then that file IS the evidence.

Read the full file on GitHub · 91 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. 2mo ago First seen · 91 lines · 15 tokens per session scan A 184da64e6a18

Subscribe to this mod's changes

memory-sync is a command published in the GitHub repository HelgDemidov/refigure (0 stars, last pushed 3d ago), licensed Apache-2.0. It adds 15 tokens to every session and 2,327 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-31.

Related

memory-sync compared with commands from other repositories

memory-sync next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
memory-syncHelgDemidov/refigureCommand03d agoApache-2.0A15Claude Code
wiki-queryzosmaai/pi-llm-wikiCommand6233d agoMITA18Claude Code
wiki-reqzosmaai/pi-llm-wikiCommand6233d agoMITA38Claude Code
wiki-retrozosmaai/pi-llm-wikiCommand6233d agoMITA25Claude Code
wiki-discoverzosmaai/pi-llm-wikiCommand6233d agoMITA19Claude Code
wiki-runzosmaai/pi-llm-wikiCommand6233d agoMITA20Claude Code
wiki-digestzosmaai/pi-llm-wikiCommand6233d agoMITA20Claude Code