Skip to main content
BuildReviewed Oct 19, 2026

Concurrent Branches

v1.0.0New

Unsigned, install at your own risk

Unverified

This skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.

Install this skill

No account required. Pick your tool, then copy.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install ffmpeg-skill-concurrent-branches

What this does: Resolve conflicts and merges when several branches are open against one repo at the same time — the hotspot files every change must touch (registry manifests, a single version field, shared tool config, one aggregated test module, tracked build output), union-vs-recompute-vs-rebuild as three different correct resolutions, generated artifacts that must never be merged, non-deterministic serialization that makes every branch conflict, renumbered identifiers that git cannot show you, and why a clean auto-merge is not a passing test. Use when rebasing or merging a long-lived branch, resolving conflict markers, reviewing a merge commit, deciding what a repo should commit vs generate, or setting up a repo that will take parallel contributions.

Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/ffmpeg-skill-concurrent-branches/SKILL.md

Setup guide →
0Save

Instructions

Merging Concurrent Branches

When several branches are open against the same repo at once, the conflicts do
not land in the code you were thinking about. They land in a small, predictable
set of hotspot files that nearly every change has to touch — a registry
manifest, a version field, shared tool config, one aggregated test module, a
tracked build output.

Each hotspot has exactly one correct resolution, and they are not the same rule.
"Take ours" / "take theirs" is right for almost none of them. Worse, getting one
wrong is silent: the dropped entry, the collided version, the stale bundle all
merge green and are found later by someone who cannot reproduce them.

Find the hotspots before you need to resolve them

Files touched by nearly every commit are the files your branch will conflict on.

# the 15 files most commits touch — your hotspot list
git log --format= --name-only -n 200 | sort | uniq -c | sort -rn | head -15

Write the resolution rule for each one into the contributing docs. Under
conflict pressure, with a stale branch and a red CI run, nobody re-derives
"the version field is recomputed, not merged" correctly.

Additive registries: union both sides, never choose one

A manifest that lists every component — plugin entries, module paths, exported
names, a feature list. Two branches each append an entry, and the conflict spans
both additions:

<<<<<<< HEAD
    "./components/exporter",
    "./components/importer"        // theirs, already merged to main

---

    "./components/exporter",
    "./components/validator"       // yours
>>>>>>> feature/validator

Both sides are correct and neither is a substitute for the other. Resolve by
keeping every entry from both sides. Taking a side deletes a component that
is still fully present in the tree — the code compiles, the tests pass, and the
component is simply never registered or installed.

Nothing catches that unless you check the registry against the filesystem:

# every registered path exists
jq -r '.plugins[].components[]' manifest.json | while read -r p; do
  [ -e "${p#./}" ] || echo "registered but missing: $p"
done
# every component on disk is registered
for d in components/*/; do
  grep -q "\"./${d%/}\"" manifest.json || echo "present but unregistered: $d"
done

Run it as a repo test, not as a merge-day ritual. It is the only thing standing
between a mis-resolved conflict and a component that quietly does not ship.

Single-value counters: recompute from the integration branch

A version field, a sequence number, a "latest migration" pointer. Both branches
bumped 2.17.0 to 2.18.0; both are wrong now, because a third branch already
merged and main is at 2.18.0 too.

Union is meaningless here and picking a side reintroduces a collision. The rule
is recompute from the current integration branch, not from either side of
the conflict — every change that merged since you branched consumed one
increment:

git fetch origin main
git show origin/main:manifest.json | jq -r '.metadata.version'   # -> 2.18.0
# your branch takes 2.19.0, regardless of what your branch said before

Do this as the last step before pushing, not during the merge. If another
branch lands while you resolve, you redo only one line.

Generated artifacts: rebuild, never merge

A committed minified bundle, a built PDF, a compiled schema, a checked-in
snapshot. Git will happily produce a merge for the text ones and force a
binary choice for the rest — and every such result is wrong, because a
derived file's only correct content is whatever the merged sources generate.

Resolve the sources, then regenerate:

git checkout --merge -- src/ ui/app.jsx   # resolve the real inputs first
make build                                 # regenerate the artifact
git add dist/bundle.js docs/handbook.pdf

Two things make this reviewable rather than a leap of faith:

  • Pin the generator version. If the bundler or typesetter is pinned, its
    output is byte-identical anywhere, and a reviewer can regenerate and diff to
    confirm the artifact matches the source. Unpinned, the artifact diff is a mix
    of your change and a tool upgrade, and nobody can tell them apart.
  • Verify only the expected regions moved. A rebuilt document reflows: a
    one-paragraph edit typically spreads across two or three consecutive pages.
    Raster-diff or diff the rebuilt artifact against one built from the base
    commit in the same environment, and say in the PR which regions changed and
    why. Anything else that moved is your merge, not your edit.

Non-deterministic serialization turns every branch into a conflict

If a tracked file is written by iterating a map, set, or dict whose order is not
stable, the whole file is rewritten on every run. Then every branch conflicts on
every line, diffs are unreviewable, and real conflicts hide inside the churn.

Sort before writing:

# BAD — map iteration order; the file is rewritten differently every time
records = [to_record(k, v) for k, v in index.items()]

# GOOD — a stable key. ISO-8601 dates sort chronologically as plain strings,
# so no date parsing is needed to get a deterministic, reviewable file.
records = sorted((to_record(k, v) for k, v in index.items()), key=lambda r: r["date"])

This applies to any code path that rebuilds a committed file from an unordered
collection, including the ones added later. Once one path forgets, the file is
churny again.

Shared tool config: take the base file, re-apply your delta

pyproject.toml, package.json, lint config, a CI workflow — files where your
branch added three lines and four other branches added their own. Reconciling
hunks by hand is where dev-dependency pins and tool sections get silently
dropped.

Take the integration branch's copy wholesale — it already carries everything
that landed while you were away — then re-add only the lines your branch
introduced:

git checkout origin/main -- pyproject.toml
# re-add just your delta, then confirm nothing else moved
git diff origin/main -- pyproject.toml

That last git diff should show your addition and nothing else. If it shows a
pin reverting or a tool section disappearing, you took a side by accident.

Aggregated test modules: keep both suites, then check for shadowing

Two branches append cases to the same test file. Union them — but a union can
produce two tests with the same name, and in Python and JavaScript the later
definition simply replaces the earlier one. The file looks longer, the suite
count looks plausible, and one branch's case never runs.

grep -oE '^\s*(def test_[A-Za-z0-9_]+|it\(.[^,]*|test\(.[^,]*)' tests/test_thing.py \
  | sort | uniq -d

The same shape bites production code: two branches independently add the same
module-level helper, the resolution keeps both, and the second shadows the
first.

Append; never renumber a shared identifier

Repos that carry stable identifiers cited from elsewhere — claim IDs in a source
ledger, migration numbers, fixture keys, snapshot names — break in a way conflict
markers cannot show you. Renumbering C7-C12 to make room is a clean,
conflict-free edit that invalidates every citation of those IDs in files your
merge never touched.

Add new identifiers by continuing the numbering past the highest one that exists
anywhere, and never reuse or renumber one. If two branches both claimed C17,
renumber yours and fix your own references; do not renumber the side that
already merged.

A clean auto-merge is not verification

Two branches editing far-apart regions of one large file merge cleanly and can
still be semantically wrong: one side's change depends on a helper the other
removed, or both added equivalent logic under different names, or one side's
edit now sits inside a branch the other made unreachable.

After any non-trivial merge, confirm both sides survived — grep the merged tree
for a distinctive string from each:

git grep -n "computes the retry budget"     # a phrase only their change added
git grep -n "REDACTION_PLACEHOLDER"         # a symbol only yours added

Present and consistent, not just present. Then read the two regions together.

Match the repo's integration style, and re-run the real gate

git log --graph --oneline -20    # merge commits, or a linear rebased history?

Follow whichever the history already uses. Then run the repo's actual CI
commands locally before pushing: a resolved merge is code that has never
existed anywhere before
, and neither branch's CI run covered it. A green check
on your branch and a green check on main say nothing about their union. See
reproducing-ci-locally for deriving the commands the runner actually uses.

Checklist

  • Hotspot files identified from git log --name-only before branching
  • Registry/manifest conflicts resolved by union; every entry from both sides kept
  • Registry checked against the filesystem in both directions, in CI
  • Version/counter fields recomputed from origin/main, not taken from either side
  • Generated artifacts rebuilt from merged sources, never text- or binary-merged
  • Generator version pinned so a reviewer can regenerate and diff
  • Files serialized from maps/sets sorted by a stable key
  • Shared tool config taken from base, delta re-applied, git diff shows only your lines
  • Merged test modules checked for duplicate test names
  • New shared identifiers appended; none reused or renumbered
  • A distinctive string from each side found in the merged tree
  • Repo's real CI gate run locally on the merged result before pushing

Note for this repository (ffmpeg-skill)

This is exactly the pattern seen across the PR #28-#37 merge cascade for the
0.10.0 release: CHANGELOG.md was the hotspot file nearly every PR touched,
and the correct resolution every time was "union both sides, never choose
one" (keep every bullet, verify no leftover conflict markers). package.json's
version field is the single-value-counter case: it should be recomputed
once, after all merges land, not carried through each individual merge.

Learn More

  • reproducing-ci-locally (also added to this repo's .claude/skills/) —
    running the runner's real commands on the merged tree

Source: wdm0006/python-skills (MIT).

This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
building-python-mcp-serversBuilds robust Python MCP (Model Context Protocol) servers with FastMCP — tool design, error contracts, event-loop-safe blocking work, subprocess/CLI wrapping, single-file vs packaged distribution, global-state-free testing, and prompt-injection awareness. Use when writing an MCP server, exposing a tool or CLI to an LLM client, debugging tool registration/packaging, or testing MCP tools.0 installsreproducing-ci-locallyRun the CI gate on your machine so it agrees with the runner — deriving the exact command, paths, markers, and env from the workflow file instead of the Makefile, unblocking gate steps that short-circuit and hide the next failure, pinning the linter version CI resolves, building the interpreter/toolchain environment the runner builds, and confirming the run is green instead of explaining a red job away. Use when a check passes locally but fails in CI (or the reverse), when a lint/format job goes red on an untouched file, when setting up a local dev loop for an unfamiliar repo, or before pushing a branch you expect to merge.0 installsprobing-edge-valuesFind the option values an ffmpeg-skill tool accepts without anyone having decided what they mean — zero, a negative number, a value far past any real frame or clip — by running tests/edge_values.py over every numeric option in the contract, then reading each call that ran or hung against the option's help, and checking the few properties a tool should keep (doing it twice changes nothing more, an inverse returns the source's shape, the output is what probe.py says). Use when looking for defects nobody has reported, before a tool moves from beta to stable, after adding a numeric option, or when a report says a tool "hung", "wrote a strange file" or "accepted nonsense".0 installsmanaging-python-releasesManages Python library releases including semantic versioning, changelog maintenance (Keep a Changelog format), release automation with GitHub Actions, and deprecation workflows. Use when planning releases, writing changelogs, automating release pipelines, or communicating breaking changes.0 installsrunning-github-actions-efficientlyCut GitHub Actions minutes and wall-clock time without losing coverage — the OS billing multiplier (macOS 10x / Windows 2x / Linux 1x), trigger hygiene that stops push+pull_request double-firing, concurrency that cancels superseded runs, dependency caching keyed on lockfiles, matrix discipline, and auditing scheduled crons that bill 24/7. Use when CI is burning included minutes, when runs feel slow, when setting up a new repo's workflows, or when reviewing an existing workflow for waste.0 installsshipping-across-surfacesLand a change everywhere the same fact is stated — enumerating the full surface inventory (landing copy, docs, machine-readable summaries, changelog badges repeated across every page, sitemap, README, descriptions embedded in code, and untyped frontend consumers of typed responses), generating a surface instead of restating it, drift tests where you cannot generate, never hand-maintaining a copy of a surface another codebase owns, shipping a paired PR when you change a format a different codebase decodes, and keeping overloaded product words apart. Use when adding or renaming a user-facing feature, editing product/marketing copy or docs, renaming a serialized response field, changing a serialization or share-link format, wiring one repo's output into another's checks, or reviewing a PR that touched only one place a fact appears.0 installs

More from ffmpeg-skill

View source →
ffmpeg-skillEdit video and audio with local FFmpeg: cut, join, reframe, speed, captions, overlays, silence removal, sync, loudness, HDR to SDR, platform exports and checks. Use whenever the user mentions a video or audio file (mp4, mov, wav, m4a), footage, captions, a reel or short, YouTube/TikTok delivery, LUFS or ffmpeg, even without saying "edit". Needs FFmpeg 6.1+ and Python 3.10+; stdlib only, no cloud.24 installsreviewing-ffmpeg-skill-changesReview a change to the ffmpeg-skill repository for the failures its own contract makes possible — a claim in a result document that is true at one layer and false at the layer a caller reads, a new flag that reaches the code but not the contract/docs/demo surfaces, a "bug" that docs/design-decisions.md already decided with a pinning test, a fix with no regression test, a new runtime dependency or a raw ffmpeg shell call that breaks the scope boundary, a SKILL.md line added without one trimmed, a review that re-derives findings from a summary instead of the tree at the reviewed commit. Use when asked to review a PR or diff in this repository, when authoring code here and needing a pre-commit check, or when triaging an external review or audit report about this codebase.5 installsffmpeg-skillEdit video and audio with local FFmpeg: cut, join, reframe, speed, captions, overlays, silence removal, sync, loudness, HDR to SDR, platform exports and checks. Use whenever the user mentions a video or audio file (mp4, mov, wav, m4a), footage, captions, a reel or short, YouTube/TikTok delivery, LUFS or ffmpeg, even without saying "edit". Needs FFmpeg 6.1+ and Python 3.10+; stdlib only, no cloud.4 installskeeping-git-repos-cleanPrevents, detects, and remediates files that should never be committed — secrets (.env, API tokens, hardcoded credentials) and dev artifacts (build output, scratch databases, editor/OS files). Covers .gitignore (and why it does not untrack), git rm --cached, auditing tracked files, history scrubbing, and credential rotation. Use when a repo has committed secrets or junk, when setting up a new repo's ignore rules, or when reviewing what a repo actually tracks.1 installsci-pipeline-synthesizerGenerate GitHub Actions CI/CD pipeline configurations for automated building and testing of library and package projects. Use when creating or updating CI workflows for npm packages, Python packages, Go modules, Rust crates, or other library projects that need automated build and test pipelines. Includes templates for common package ecosystems with best practices for dependency caching, matrix testing, and artifact publishing.0 installsbuilding-the-review-pageBuild or change the standalone review page (scripts/_review.py, `npx ffmpeg-skill review`) — the editor-style screen where a person looks at a render project and its result and composes an instruction for their agent. Covers the fixed constraints (one offline HTML file, nothing executed, no new dependency, not a contract tool), the 16:10 three-column layout, the numbering scheme every element carries (S, C, T, A, M, R, P,0 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.656 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.561 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.373 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.269 installsfounder-consumerThe consumer panel. Spins up a swarm of buyer sub-agents (default 100, --quick for 20) trained on the user's target customer, each with a different income, age, buying behaviour and objection, shows every one the same pitch, and runs the business through 100 buyer scenarios to see who buys, who doesn't, and why. Tallies the answers into buy rates by segment, the reasons people pass in their own words, what would flip a no, and price answers for founder-pricing. Use when the user says "would people buy this", "test it on customers", "run the consumer panel", "simulate buyers", "who is my customer", or "validate demand".198 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.186 installs

Frequently asked questions about concurrent-branches

What does the concurrent-branches skill do?

Resolve conflicts and merges when several branches are open against one repo at the same time — the hotspot files every change must touch (registry manifests, a single version field, shared tool config, one aggregated test module, tracked build output), union-vs-recompute-vs-rebuild as three different correct resolutions, generated artifacts that must never be merged, non-deterministic serialization that makes every branch conflict, renumbered identifiers that git cannot show you, and why a clean auto-merge is not a passing test. Use when rebasing or merging a long-lived branch, resolving conflict markers, reviewing a merge commit, deciding what a repo should commit vs generate, or setting up a repo that will take parallel contributions. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the concurrent-branches skill?

Run `npx @skills-hub-ai/cli install ffmpeg-skill-concurrent-branches` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/ffmpeg-skill-concurrent-branches/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does concurrent-branches work with?

concurrent-branches runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the concurrent-branches skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use concurrent-branches after installing it?

In Claude Code, type `/ffmpeg-skill-concurrent-branches` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the concurrent-branches skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/ffmpeg-skill-concurrent-branches)](https://skills-hub.ai/skills/ffmpeg-skill-concurrent-branches)
HTML
<a href="https://skills-hub.ai/skills/ffmpeg-skill-concurrent-branches"><img src="https://skills-hub.ai/api/badges/skill/ffmpeg-skill-concurrent-branches" alt="Install on Skills Hub"></a>

More options in the badge docs.