workflow-branch-sync

workflow-branch-sync is a skill for Claude Code, Codex from lugassawan/swe-workbench. It costs 55 tokens per session (5,946 once invoked), scanned A, original, MIT.

A Git workflow for bringing a feature branch up to date with the default branch and helping resolve conflicts one file at a time. It explains each conflict and waits for confirmation before pushing.

In plain words
What is it for?
Use it to sync an outdated branch, compare conflicting changes, choose the feature or default-branch version, and prepare the branch for review.
Why use it?
It makes branch synchronisation and conflict decisions reviewable, without automatically pushing changes or silently choosing one side.

Skill for Claude CodeCodex

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

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 skills/lugassawan/swe-workbench/workflow-branch-sync
Any agent
npx skills add lugassawan/swe-workbench --skill workflow-branch-sync
Clone the repo
git clone --depth 1 https://github.com/lugassawan/swe-workbench

Made for: Claude Code, Codex.

Or install swe-workbench, the plugin that ships this one along with the rest of its 60 skills, 25 commands, 32 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 workflow-branch-sync

README.md
[![agentmods](https://agentmods.dev/badge/skills/lugassawan/swe-workbench/workflow-branch-sync.svg)](https://agentmods.dev/skills/lugassawan/swe-workbench/workflow-branch-sync)
Your own site
<a href="https://agentmods.dev/skills/lugassawan/swe-workbench/workflow-branch-sync"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/workflow-branch-sync.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,946 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.00055 $0.05946
Opus 5 $0.00028 $0.02973
Sonnet 5 $0.00011 $0.01189
Haiku 4.5 $0.00006 $0.00595

Measured yesterday against content hash 22721e1631e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

workflow-branch-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.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/detect-conflicts.sh, scripts/preflight-guard.sh, scripts/redundancy-scope.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/workflow-branch-sync/SKILL.md · 209 lines

How it starts

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

Workflow: Branch Sync

Announce at start: "I'm using the workflow-branch-sync skill to bring this branch up to date and help resolve any conflicts."

When to Invoke

  • User's branch has fallen behind the default branch and they want it brought up to date.
  • User asks for help resolving merge/rebase conflicts, or wants guidance on "which side is correct".
  • Invoked by /swe-workbench:sync.

What This Skill Does NOT Do

  • Does not open, merge, or comment on a PR — that is swe-workbench:workflow-commit-and-pr / the user's action.
  • Does not resolve any conflict without first showing both sides and a recommendation with rationale.
  • Does not auto-push — ever. The push is a separate, explicitly prompted step at the end.
  • Does not rewrite history beyond the single merge or rebase the user asked for.

Sync Contract

Step 1 — Preflight Guard

command -v swe-workbench-skill-script >/dev/null 2>&1 || {
  echo "swe-workbench runtime commands not on PATH — reinstall or update the swe-workbench plugin." >&2
  exit 1
}
eval "$(swe-workbench-skill-script workflow-branch-sync preflight-guard.sh)"

Emits CURRENT_BRANCH, DEFAULT_BRANCH (detected — never hardcode main), IS_DEFAULT, DETACHED, DIRTY.

  • IS_DEFAULT=1: refuse. Report "already on $DEFAULT_BRANCH — nothing to sync onto itself" and stop.
  • DETACHED=1: refuse. Report "detached HEAD — checkout a branch first" and stop.
  • DIRTY>0: offer stash-or-abort before touching history — git stash push -u -m "branch-sync: pre-sync stash" if the user opts to stash, otherwise stop and let the user commit or discard first. Never proceed with a dirty tree. If the user stashes, set STASHED=1 — Step 7 restores it before reporting.

Step 2 — Overlap Advisory (optional)

If the rimba MCP server is active in the session, invoke its conflict-check tool with dry_merge: true as an informational heads-up only — it detects cross-worktree file overlaps between rimba-managed worktrees, not the authoritative conflict set for this sync. Surface any overlap it reports, but never block or skip Step 3 on its account. Skip silently if rimba MCP is not active.

Read the full file on GitHub · 209 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 209 lines · 55 tokens per session scan A 22721e1631e2

Subscribe to this mod's changes

workflow-branch-sync is a skill published in the GitHub repository lugassawan/swe-workbench (2 stars, last pushed 2d ago), licensed MIT. It adds 55 tokens to every session and 5,946 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

release

Cut a brooks-lint release: set the version in package.json, propagate it across all four plugin manifests and every version-bearing text file (README badges, docs site metadata), write the CHANGELOG entry, validate, then commit, push, tag, and publish the GitHub release. Triggers when the maintainer asks to "release"…

hyhmrright/brooks-lint · 135 tokens

brooks-audit

Architecture audit that maps module dependencies, checks layering integrity, and flags structural decay across a codebase, drawing on twelve classic engineering books. Triggers when: user asks to audit architecture, review folder/module structure, check for circular imports, understand how the codebase is organized…

hyhmrright/brooks-lint · 143 tokens

brooks-test

Test quality review drawing on twelve classic engineering books — with primary focus on xUnit Test Patterns, The Art of Unit Testing, How Google Tests Software, and Working Effectively with Legacy Code — that diagnoses structural problems in an existing test suite: brittleness, mock abuse, coverage illusions, slow…

hyhmrright/brooks-lint · 161 tokens

review

Perform a structured code review by composing validation checklists from relevant atoms based on what code changed. Loads atoms conditionally -- clean-code always, architecture/DDD/security/tests only when the delta touches their domain. Produces a severity-ordered report with specific locations and fixes. Use when…

techygarg/lattice · 95 tokens

skill-review

Deep behavioral audit of a Lattice skill — proposes 3 review personas relevant to the skill, runs independent scenario analysis from each persona's perspective, then merges only the high-confidence, practical findings into a severity-ordered gap report with proposed fixes. Structural validation (conventions…

techygarg/lattice · 180 tokens

context-anchoring

Manage per-feature living documents that capture decisions, constraints, and reasoning across AI sessions during active development. Scoped to feature-level work — design, implementation, bugfix, refactor — not for codebase-wide assessments or product-wide specifications (those define their own document lifecycles).…

techygarg/lattice · 147 tokens