sync

sync is a command for Claude Code from lugassawan/swe-workbench. It costs 102 tokens per session (671 once invoked), scanned A, original, MIT.

A command for bringing a Git branch up to date with the project's default branch by merging or rebasing changes.

In plain words
What is it for?
Use it to sync a branch with merge or rebase, optionally check for redundant changes, review per-file conflict resolutions, and prepare for a later push.
Why use it?
It helps incorporate recent shared-branch work and guides you through conflicts so incompatible edits can be resolved deliberately.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents.

Part of the swe-workbench plugin — 61 skills, 25 commands, 23 agents, 4 hooks shipped together

Good fit Use it to sync a branch with merge or rebase, optionally check for redundant changes, review per-file conflict resolutions, and prepare for a later push.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/lugassawan/swe-workbench/sync
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.

Clone the repo
git clone --depth 1 https://github.com/lugassawan/swe-workbench

Made for: Claude Code.

Or install swe-workbench, the plugin that ships this one along with the rest of its 61 skills, 25 commands, 23 agents, 4 hooks.

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/lugassawan/swe-workbench/sync/github.svg)](https://agentmods.dev/commands/lugassawan/swe-workbench/sync)
Your own site
<a href="https://agentmods.dev/commands/lugassawan/swe-workbench/sync"><img src="https://agentmods.dev/badge/commands/lugassawan/swe-workbench/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/lugassawan/swe-workbench/sync"><img src="https://agentmods.dev/badge/commands/lugassawan/swe-workbench/sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 671 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.00102 $0.00671
Opus 5.5 $0.00041 $0.00268
Sonnet 5.5 $0.00020 $0.00134
Haiku 4.5 $0.00010 $0.00067

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

commands/sync.md · 32 lines

How it starts

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

Target: $ARGUMENTS

Strategy resolution

Parse $ARGUMENTS left to right for --rebase, --check-redundancy, and --check-alignment:

  • --rebase present: strip the flag from the target text and use rebase strategy.
  • --rebase absent: use the merge strategy (default).
  • --check-redundancy present: strip the flag from the target text and resolve CHECK_REDUNDANCY=on.
  • --check-redundancy absent: resolve CHECK_REDUNDANCY=off (default) — plain sync stays unchanged.
  • --check-alignment present: strip the flag from the target text and resolve CHECK_ALIGNMENT=on.
  • --check-alignment absent: resolve CHECK_ALIGNMENT=off (default).

Invoke swe-workbench:workflow-branch-sync, passing the resolved strategy (merge or rebase), CHECK_REDUNDANCY=on|off, and CHECK_ALIGNMENT=on|off.

Output

The swe-workbench:workflow-branch-sync skill produces a per-file resolution summary followed by a push prompt:

  1. Sync result — clean (fast-forward/no-conflict) or resolved-with-conflicts, and the strategy used (merge/rebase). Prefixed by the fetch status line from the skill's remote-ref refresh (origin/<default> updated <old>→<new> or unchanged).
  2. Per-file resolution — one line per conflicting file: which side was kept (mine/main/manual) and the one-line rationale surfaced by the swe-workbench:conflict-resolver subagent.
  3. Redundancy assessment (only when --check-redundancy was passed — opt-in) — any whole-file candidates the branch added that the default branch already grew independently elsewhere, auto-applied (whole-file, zero references) or escalated to you per candidate.
  4. Alignment assessment (only when --check-alignment was passed — opt-in) — evaluates branch changes against main's recent history to detect architectural drift or paradigm shifts, escalating to you if drift is detected.
  5. Push prompt — the result is left local; the skill asks before pushing. Merge pushes with git push; rebase pushes with git push --force-with-lease — never a plain force push.

Read the full file on GitHub · 32 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. 21d ago Changed · +10 tokens per session 1b947ed9b238
  2. 27d ago Changed · +3 lines · +17 tokens per session 10be76b8ac1e
  3. 1mo ago First seen · 29 lines · 75 tokens per session scan A 05c4557a8fcb

Subscribe to this mod's changes

sync is a command published in the GitHub repository lugassawan/swe-workbench (3 stars, last pushed yesterday), licensed MIT. It adds 102 tokens to every session and 671 once invoked, about $0.0004 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-31.