sync_artifacts

sync_artifacts is a command for Claude Code from swarm-ai-research/swarm. It costs 0 tokens per session (1,549 once invoked), scanned C, original, MIT.

A command for staging, committing, and pushing changes to a Git repository that stores project artifacts such as research outputs.

In plain words
What is it for?
Use it to sync artifact files, supply a commit message, or migrate artifacts to another repository path.
Why use it?
It provides a repeatable way to sync changes and checks whether there is anything to commit before doing so.

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/swarm-ai-research/swarm/sync_artifacts
Clone the repo
git clone --depth 1 https://github.com/swarm-ai-research/swarm

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_artifacts

README.md
[![agentmods](https://agentmods.dev/badge/commands/swarm-ai-research/swarm/sync_artifacts.svg)](https://agentmods.dev/commands/swarm-ai-research/swarm/sync_artifacts)
Your own site
<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/sync_artifacts"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/sync_artifacts.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,549 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00000 $0.01549
Opus 5 $0.00000 $0.00775
Sonnet 5 $0.00000 $0.00310
Haiku 4.5 $0.00000 $0.00155

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

Security

Grade C, and why

sync_artifacts scanned grade C with 2 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf /tmp/sync_artifacts_migrate

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sL "https://raw.githubusercontent.com/<owner/repo>/main/<file-path>" \
.claude/commands/sync_artifacts.md · 205 lines

How it starts

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

/sync_artifacts

Stage, commit, and push changes in the swarm-artifacts repo. Handles pre-commit validation and Co-Authored-By automatically.

Usage

/sync_artifacts [message] /sync_artifacts --migrate <owner/repo> <path>

Examples:

  • /sync_artifacts (auto-generates commit message from diff)
  • /sync_artifacts "Add new claim cards from collusion study"
  • /sync_artifacts --migrate swarm-ai-research/swarm runs/20260221_104316_langgraph_governed

Behavior

1. Locate the artifacts repo

Check these paths in order:

  1. $SWARM_ARTIFACTS_DIR environment variable (if set)
  2. /Users/raelisavitt/swarm-artifacts (default)
  3. ../swarm-artifacts relative to the main repo root

If none exist, report: "Cannot find swarm-artifacts repo. Set $SWARM_ARTIFACTS_DIR or clone it."

2. Check for changes

cd <artifacts-repo>
git status --short

If no changes (staged or unstaged), report "swarm-artifacts is clean, nothing to sync." and stop.

3. Show what changed

git diff --stat        # unstaged
git diff --cached --stat  # staged

Report the summary to the user.

4. Stage files

Stage all changed files, excluding:

  • .DS_Store
  • *.db
  • .env*
  • credentials*
git add -A -- ':!.DS_Store' ':!*.db' ':!.env*' ':!credentials*'

5. Commit

If the user provided a message via $ARGUMENTS, use it. Otherwise, auto-generate from the staged diff:

  • Count files by category (vault/, scripts/, schemas/, runs/)
  • Summarize: "Update N vault notes, M scripts" or similar

Always append Co-Authored-By: Claude Opus 4.6 <[email protected]>.

git commit -m "$(cat <<'EOF'
<message>

Co-Authored-By: Claude Opus 4.6 <[email protected]>
EOF
)"

If pre-commit hooks fail:

  • Read the error output
  • If it's an index consistency error (notes not in _index.md), auto-fix by adding the missing references to vault/_index.md, re-stage, and retry the commit
  • If it's a validation error (schema, YAML), report the errors and stop

Read the full file on GitHub · 205 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. 4d ago First seen · 205 lines · 0 tokens per session scan C 29cde0c8510e

Subscribe to this mod's changes

sync_artifacts 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 1,549 tokens. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.