sync

A command that keeps Nemp Memory and CLAUDE.md, a project guidance file for Claude, in sync. It can import notes, export them, or check for conflicts without changing files.

In plain words
What is it for?
Use it to transfer context between Nemp Memory and CLAUDE.md, find conflicts, or perform an import-only or export-only update.
Why use it?
It prevents project notes from becoming outdated or disagreeing with the actual code. It also lets you choose whether to read, write, or only check.

Command

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 commands/sukinshetty/nemp-memory/sync
Clone the repo
git clone --depth 1 https://github.com/SukinShetty/Nemp-memory
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,290 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.00012 $0.03290
Opus 5 $0.00006 $0.01645
Sonnet 5 $0.00002 $0.00658
Haiku 4.5 $0.00001 $0.00329

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

Security

Grade A, and why

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.

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.

commands/sync.md · 432 lines

How it starts

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

/nemp:sync

Two-way bridge between Nemp Memory and CLAUDE.md. Import user-written context from CLAUDE.md into Nemp, detect conflicts with actual project state, and update the Nemp section.

Usage

/nemp:sync              # Full two-way sync
/nemp:sync --import-only # Only read from CLAUDE.md into Nemp, don't write back
/nemp:sync --export-only # Same as /nemp:export
/nemp:sync --check       # Only detect conflicts, don't change anything

Arguments

  • --import-only (optional): Only import from CLAUDE.md to Nemp memories, skip export
  • --export-only (optional): Only export Nemp memories to CLAUDE.md (same as /nemp:export)
  • --check (optional): Dry run - detect conflicts without making any changes

Instructions

When the user invokes /nemp:sync, follow these steps:

Step 1: Parse Arguments

Extract the mode from arguments:

  • No arguments → full sync (import + conflict check + export)
  • --import-only → only import from CLAUDE.md
  • --export-only → only export to CLAUDE.md
  • --check → only detect conflicts, no changes

Step 2: Read CLAUDE.md

Check if CLAUDE.md exists and read its contents:

[ -f "CLAUDE.md" ] && cat CLAUDE.md || echo "CLAUDE_MD_NOT_FOUND"

If CLAUDE.md doesn't exist:

⚠️ No CLAUDE.md found.

Nothing to import. You can:
  /nemp:export     - Create CLAUDE.md from Nemp memories
  /nemp:init       - Auto-detect project stack first

Step 3: Parse CLAUDE.md Content

Split CLAUDE.md into two parts:

Nemp Section (SKIP):

  • Starts with: ## Project Context (via Nemp Memory)
  • Ends at: next ## heading, or --- on its own line, or end of file
  • This is Nemp's own output — do NOT re-import it

User Content (IMPORT):

  • Everything OUTSIDE the Nemp section
  • This includes manually written context, rules, preferences, architecture notes

Step 4: Extract Importable Context

Scan the user content for importable information. Look for patterns like:

Pattern Memory Key
"Tech stack:", "Stack:", "We use" stack
"Framework:", "Built with" framework
"Database:", "DB:", "ORM:" database
"Auth:", "Authentication:" auth
"Styling:", "CSS:", "UI:" styling
"Testing:", "Tests:" testing
"Package manager:", "Use npm/pnpm/yarn/bun" package-manager
"Architecture:", "Structure:" architecture
"Rules:", "Conventions:", "Preferences:" conventions
"API:", "Endpoints:" api
Bullet points under headings Extract as relevant memory

Read the full file on GitHub · 432 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. 2d ago First seen · 432 lines · 12 tokens per session scan A f4c6922cb55e

Subscribe to this mod's changes

sync is a command published in the GitHub repository SukinShetty/Nemp-memory (128 stars, last pushed 2mo ago), licensed MIT. It adds 12 tokens to every session and 3,290 once invoked, about $0.0001 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.