sync

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

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/lugassawan/swe-workbench/sync
Clone the repo
git clone --depth 1 https://github.com/lugassawan/swe-workbench
Per session 75 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 497 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 $0.00075 $0.00497
Opus 5 $0.00037 $0.00249
Sonnet 5 $0.00015 $0.00099
Haiku 4.5 $0.00007 $0.00050

Measured yesterday against content hash 05c4557a8fcb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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 · 29 lines

What it actually says

Target: $ARGUMENTS

Strategy resolution

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

  • --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.

Invoke swe-workbench:workflow-branch-sync, passing the resolved strategy (merge or rebase) and CHECK_REDUNDANCY=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).
  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. 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.

No push happens without an explicit yes from the user.

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. yesterday 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 (2 stars, last pushed 2d ago), licensed MIT. It adds 75 tokens to every session and 497 once invoked, about $0.0004 per session on Opus 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.