marvin-template: Command for Claude Code

.claude/commands/sync.md

sync is a command for Claude Code from SterlingChin/marvin-template. It costs 7 tokens per session (994 once invoked), scanned A, original, MIT.

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

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

This is SterlingChin/marvin-template's own configuration. It tells Claude Code how to work on marvin-template 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 marvin-template configures →

About the project

MARVIN is a personal AI assistant built to remember conversations, track goals, organize work, and connect to external applications. People use it as a chief-of-staff-style extension for Claude Code or GitHub Copilot CLI, with integrations including Google Workspace, Microsoft 365, Slack, Linear, Notion, and Telegram. The catalogue entries provide commands, agents, skills, and instructions that define MARVIN's workflows.

SterlingChin/marvin-template · 1,024 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to SterlingChin/marvin-template. 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/SterlingChin/marvin-template/main/.claude/commands/sync.md
Clone the repo
git clone --depth 1 https://github.com/SterlingChin/marvin-template

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 sync

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/sterlingchin/marvin-template/sync"><img src="https://agentmods.dev/badge/commands/sterlingchin/marvin-template/sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. 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.00007 $0.00994
Opus 5.5 $0.00003 $0.00398
Sonnet 5.5 $0.00001 $0.00199
Haiku 4.5 $0.00001 $0.00099

Measured 2mo ago against content hash 1a07c9b3ec50, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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/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. 2mo 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,024 stars, last pushed 2mo ago), licensed MIT. It adds 7 tokens to every session and 994 once invoked, about $0.0000 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-30.