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.
npx agentmods add commands/swarm-ai-research/swarm/syncgit clone --depth 1 https://github.com/swarm-ai-research/swarmWrote 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.
[](https://agentmods.dev/commands/swarm-ai-research/swarm/sync)<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/sync"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/sync.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00953 |
| Opus 5 | $0.00000 | $0.00477 |
| Sonnet 5 | $0.00000 | $0.00191 |
| Haiku 4.5 | $0.00000 | $0.00095 |
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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/sync
Atomic fetch-rebase-push with auto-stash. Resolves the common "push rejected because remote advanced" problem in one step, even when you have unstaged changes — automatically stashes dirty working tree before rebase and restores after push. Also handles post-merge branch cleanup via --cleanup. Use instead of manual git pull --rebase && git push sequences. Consolidates the former /cleanup_branch command (now /sync --cleanup).
Usage
/sync [branch] [--cleanup]
Examples:
/sync(syncs current branch)/sync main(syncs the specified branch)/sync --cleanup(switch to main, pull, delete current branch locally + remotely)/sync --cleanup fix/pre-commit-scoped-lint(delete a specific merged branch)
Argument parsing
Parse $ARGUMENTS to extract:
--cleanup: Post-merge branch cleanup mode (see Phase B below)- Any remaining non-flag token is the branch name. If omitted, use current branch.
Default behavior (no flags): fetch-rebase-push
1) Stash if dirty
If the working tree has uncommitted changes, run git stash --include-untracked. Note stash was created so it can be restored at the end.
2) Fetch
Run git fetch origin.
3) Check divergence
Run git rev-list --left-right --count HEAD...origin/<branch> to see how far ahead/behind we are.
- If already up to date (0 behind, 0 ahead or only ahead): skip rebase, go to push.
- If behind: rebase onto origin/.
- If diverged (both ahead and behind): rebase onto origin/.
4) Rebase
Run git rebase origin/<branch>.
- If rebase succeeds: continue to push.
- If rebase has conflicts: abort the rebase (
git rebase --abort), restore stash if created, and report the conflicting files. Do NOT attempt to resolve conflicts automatically.
5) Push
Run git push origin <branch>.
- If no upstream is set, use
git push -u origin <branch>.
6) Restore stash
If step 1 stashed changes, run git stash pop.
7) Report
Synced:
Branch: <branch>
Rebased: <N> commits from origin/<branch>
Pushed: <M> local commits
Status: clean | stash restored
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.
- 4d ago First seen · 99 lines · 0 tokens per session scan A 1fa73139052c
sync is a command published in the GitHub repository swarm-ai-research/swarm (41 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 953 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.
Other commands, from other repositories
tma1-peer
List recent sessions on this project by agent — peers (Codex, OpenClaw, Copilot CLI) or your own.
skill-inbox
Unified entry point for managing skill suggestions and browsing all installed skills. Provides two views: suggestions (default) and all skills.
eval-merge
Use the Read tool to load .skill-compass/{skill-name}/manifest.json. Verify.
video
Create a design based on video.
good
Write good creative & smart copy [GOOD].
speckit.git.validate
Validate current branch follows feature branch naming conventions.