sync

A command for bringing changes from a shared MARVIN template into the current workspace. MARVIN is the project template this command expects to find through a local source file.

In plain words
What is it for?
Use it to check for and apply MARVIN template updates. It reads the template location from .marvin-source and compares the workspace VERSION with the template VERSION.
Why use it?
It avoids manually guessing which template version is newer or which files changed. It compares versions, shows the relevant changelog entries, and follows the template's update process.

Command for Claude Code

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/sterlingchin/marvin-template/sync
Clone the repo
git clone --depth 1 https://github.com/SterlingChin/marvin-template

Made for: Claude Code.

Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 994 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.00007 $0.00994
Opus 5 $0.00003 $0.00497
Sonnet 5 $0.00001 $0.00199
Haiku 4.5 $0.00001 $0.00099

Measured 3d ago against content hash 1a07c9b3ec50, 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 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.

.claude/commands/sync.md · 141 lines

How it starts

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

/sync - Get Updates

Pull new features and commands from the MARVIN template into your workspace.

Instructions

1. Find the Template

Read .marvin-source to get the path to the template directory:

cat .marvin-source

If this file doesn't exist, tell the user:

"I can't find your template source. This usually means you set up MARVIN manually. Would you like to tell me where your template folder is?"

2. Check Version

Compare versions between the user's workspace and the template:

USER_VERSION=$(cat VERSION 2>/dev/null || echo "0.0.0")
TEMPLATE_VERSION=$(cat {template}/VERSION 2>/dev/null || echo "unknown")
echo "Current: $USER_VERSION"
echo "Template: $TEMPLATE_VERSION"

Replace {template} with the path from .marvin-source.

If versions are the same, tell the user:

"You're on the latest version ($USER_VERSION). No updates available."

And stop (unless the user explicitly asked to check files anyway).

If versions differ, extract what changed from the template's CHANGELOG.md. Read {template}/CHANGELOG.md and collect all entries between the user's version and the template's version. Show a summary:

You're on {USER_VERSION}. Template is at {TEMPLATE_VERSION}.

What's new:
{bullet points from CHANGELOG entries}

Checking for new files...

Then proceed to step 3.

If the user has no VERSION file (pre-versioning install), treat as 0.0.0 and show all CHANGELOG entries.

3. Check What's New

Compare the template's files with the user's workspace:

Files to sync:

  • .claude/commands/ - Slash commands
  • .claude/agents/ - Subagent definitions
  • .claude/skills/ - Reusable skills
  • docs/patterns/ - Architectural pattern docs

Files to NEVER sync (user's data):

  • state/ - User's goals and current state
  • sessions/ - Session logs
  • reports/ - Weekly reports
  • content/ - User's content
  • meetings/ - User's meeting notes
  • personal/ - User's personal files
  • CLAUDE.md - User's profile (contains personal config)
  • .env - User's secrets
  • .marvin-team/ - User's team config (if present)

Read the full file on GitHub · 141 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. 3d ago First seen · 141 lines · 7 tokens per session scan A 1a07c9b3ec50

Subscribe to this mod's changes

sync is a command published in the GitHub repository SterlingChin/marvin-template (1,016 stars, last pushed 15d ago), licensed MIT. It adds 7 tokens to every session and 994 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.