sync

sync is a command for Claude Code from starmynd-org/infinite-brain-harness. It costs 0 tokens per session (1,207 once invoked), scanned A, original, MIT.

A command that backs up and updates Git repositories containing mounted “brains,” meaning folders of working knowledge or project content. It treats personal repositories differently from shared ones.

In plain words
What is it for?
Use it to save local changes, fetch the latest updates, and send personal or shared brain changes to GitHub through plain Git.
Why use it?
It avoids manually committing, pulling, pushing, and handling shared-repository review rules.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions 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/starmynd-org/infinite-brain-harness/sync
Clone the repo
git clone --depth 1 https://github.com/starmynd-org/infinite-brain-harness

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/starmynd-org/infinite-brain-harness/sync.svg)](https://agentmods.dev/commands/starmynd-org/infinite-brain-harness/sync)
Your own site
<a href="https://agentmods.dev/commands/starmynd-org/infinite-brain-harness/sync"><img src="https://agentmods.dev/badge/commands/starmynd-org/infinite-brain-harness/sync.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,207 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.1 $0.00000 $0.01207
Opus 5 $0.00000 $0.00603
Sonnet 5 $0.00000 $0.00241
Haiku 4.5 $0.00000 $0.00121

Measured 6d ago against content hash 16f52136f2f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 6d 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 · 87 lines

How it starts

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

/sync: back up my work and get the latest

Sync every brain mounted under internal/. Convention: a folder named individual-* is an individual brain (push freely); every other brain mounted under internal/ is a shared brain (content is free to push, core changes go to a review branch). Backend is plain git (GitHub by default). Use GIT_TERMINAL_PROMPT=0 so git fails fast, and report any auth error as one friendly line, never as raw git output.

Step 0: Preflight

If internal/ has no mounted brains, tell the person to run /start first and stop. Ensure each brain has a git identity set (from /start); set it if empty.

Step 1: Individual brains (free)

For each internal/individual-*:

git -C "$b" add -A
git -C "$b" commit -m "<name>: <short summary>"      # skip if nothing to commit
GIT_TERMINAL_PROMPT=0 git -C "$b" pull --rebase origin HEAD
GIT_TERMINAL_PROMPT=0 git -C "$b" push origin HEAD

On an auth error, say the backup did not go through (fix git access) and continue.

Step 2: Shared brains (governed)

For each shared brain (every brain mounted under internal/ not named individual-*):

  1. Pull the latest release first: git -C "$b" fetch origin then merge the shared branch (origin/main or the brain's default). On a merge conflict on shared canon, do not force it: tell the person to ask the brain's maintainer, and include the conflicting file names.
  2. Classify local changes (git -C "$b" status --porcelain):
    • content (free): paths under outputs/ or sessions/.
    • core (needs review): anything else, especially entities/, knowledge/, _system/, workflows/, automations/, tools/, bin/, docs/, data/, and root orientation.
  3. If only content changed: commit and push to the shared branch.
  4. If any core changed: do NOT push to the shared branch. Park the whole changeset on a review branch so nothing core lands unreviewed:
    git -C "$b" switch -c "proposal/<name>-<topic>"
    git -C "$b" add -A && git -C "$b" commit -m "<name> proposal: <what and why>"
    GIT_TERMINAL_PROMPT=0 git -C "$b" push -u origin "proposal/<name>-<topic>"
    git -C "$b" switch <shared-branch>
    
    Then tell the person it changes the shared brain, so it is on a review branch; ask the brain's maintainer to review and merge. The working copy is back on the shared branch and clean.

Read the full file on GitHub · 87 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. 6d ago First seen · 87 lines · 0 tokens per session scan A 16f52136f2f9

Subscribe to this mod's changes

sync is a command published in the GitHub repository starmynd-org/infinite-brain-harness (23 stars, last pushed 6d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,207 tokens. 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.