merge-strategy

merge-strategy is a skill for Claude Code, Codex from marcus/sidecar. It costs 63 tokens per session (2,071 once invoked), scanned A, original, MIT.

A guide to choosing how Git branches are combined, including merging, rebasing, squashing, and pulling changes from a shared repository.

In plain words
What is it for?
Use it when configuring pull behavior, resolving merge conflicts, creating or merging pull requests, or integrating a branch directly into another branch.
Why use it?
It explains the trade-offs and steps for bringing branches together, helping avoid unnecessary conflicts and unsafe changes to protected branches.

Skill for Claude CodeCodex

About the project

Sidecar is a terminal-based workspace for running AI coding agents alongside file trees, task issues, Git diffs, and Jira or GitHub resources in split panes. Developers use it to monitor agent sessions, inspect files and changes, manage workspaces, and handle tasks without leaving one shell. The catalogue entries extend or guide coding-agent workflows used with Sidecar.

marcus/sidecar · 1,055 stars · on GitHub

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/marcus/sidecar/merge-strategy
Any agent
npx skills add marcus/sidecar --skill merge-strategy
Clone the repo
git clone --depth 1 https://github.com/marcus/sidecar

Made for: Claude Code, Codex.

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 merge-strategy

README.md
[![agentmods](https://agentmods.dev/badge/skills/marcus/sidecar/merge-strategy.svg)](https://agentmods.dev/skills/marcus/sidecar/merge-strategy)
Your own site
<a href="https://agentmods.dev/skills/marcus/sidecar/merge-strategy"><img src="https://agentmods.dev/badge/skills/marcus/sidecar/merge-strategy.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,071 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.00063 $0.02071
Opus 5 $0.00032 $0.01035
Sonnet 5 $0.00013 $0.00414
Haiku 4.5 $0.00006 $0.00207

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

Security

Grade A, and why

merge-strategy 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 5d 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.

.claude/skills/merge-strategy/SKILL.md · 226 lines

How it starts

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

Merge Strategy Configuration

This skill covers sidecar's git merge and pull operations, their current implementation, known gaps, and recommended configuration patterns.

Current Implementation

Git Status Plugin Pull Strategies

Location: internal/plugins/gitstatus/pull_menu.go, internal/plugins/gitstatus/remote.go

The git-status plugin offers four pull strategies via a modal menu:

Strategy Command Use Case
Pull (merge) git pull Creates merge commit, preserves branch topology
Pull (rebase) git pull --rebase Replays local commits on top of upstream
Pull (fast-forward only) git pull --ff-only Only pulls if fast-forward possible (safest)
Pull (rebase + autostash) git pull --rebase --autostash Rebase with automatic stash/unstash

Workspace Plugin Merge Workflows

Location: internal/plugins/workspace/merge.go

PR Workflow:

  1. Push branch to remote
  2. Create PR via gh pr create
  3. Wait for PR merge (polling)
  4. Cleanup: delete worktree, branches, pull base

Direct Merge (No PR) at merge.go:430-498:

1. git fetch origin <baseBranch>
2. git checkout <baseBranch>
3. git pull origin <baseBranch>
4. git merge <branch> --no-ff -m "Merge branch '<branch>'"  // Hardcoded --no-ff
5. git push origin <baseBranch>

Post-Merge Pull at merge.go:500-551:

  • When on base branch: git pull --ff-only origin <branch> (hardcoded)
  • Otherwise: git fetch + git update-ref

Divergence Resolution at merge.go:644-705:

  • Rebase option: git pull --rebase origin <branch>
  • Merge option: git pull origin <branch>

Known Issues and Gaps

  1. No configurable defaults -- users must select strategy every time
  2. Limited merge strategies -- direct merge hardcoded to --no-ff, missing --ff, --ff-only, --squash, rebase-based integration
  3. No squash merge support -- no clean-history option for main branch
  4. Hardcoded commit messages -- fmt.Sprintf("Merge branch '%s'", branch), no templates
  5. Missing safety options -- no GPG signing, no --verify-signatures, no --force-with-lease
  6. Autostash inconsistency -- available for pull-rebase but not post-merge pull or divergence resolution
  7. No upstream tracking config -- remote always origin, no configurable tracking
  8. Limited conflict recovery -- only abort or dismiss, no continue/skip rebase
  9. No interactive rebase -- no squash/reorder/edit before merge

Read the full file on GitHub · 226 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. 5d ago First seen · 226 lines · 63 tokens per session scan A 4f3a164cec71

Subscribe to this mod's changes

merge-strategy is a skill published in the GitHub repository marcus/sidecar (1,055 stars, last pushed yesterday), licensed MIT. It adds 63 tokens to every session and 2,071 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-08-30.

Related

Other skills, from other repositories

pre-merge

The CI gate. Takes a feature branch from "eng says done" to "PR open against staging with green checks". Runs the project's preflight-resolved pipeline from devkit/policy.json components[]: sync → parallel correctness + security waves → coverage → regression tail → security/migration → PRD-consistency → open PR. Emits…

ndisisnd/msg · 101 tokens

intake

The planning front-door. Captures feature ideas and bugs as graded rows in the root INTAKE.md ledger. Use it when the user says "log an idea", "capture a bug", "add to the backlog", "note this down", "track this feature", or invokes /intake. Owns the requirements interview — fleshes out thin ideas, proactively…

ndisisnd/msg · 239 tokens

merge

The ship gate — the only skill that merges. --staging merges the feature→staging PR on green CI, deploys, verifies, emits a human test script and stamps the staging sign-off on approval. --production ships the double-confirmed release to main and deploys production. Never self-certifies staging; nothing reaches main…

ndisisnd/msg · 94 tokens

msg

Root menu for msg skills, plus harness modes. --init is the one-time project bootstrap — use it when the user says "initialise project", "bootstrap repo", "set up the framework", "start a new project", or asks to set up project structure in an empty repo. Other modes: --init-staging (add a staging branch), --update…

ndisisnd/msg · 162 tokens

lorekeeper-marketing

Marketing workflow for Lorekeeper — README copy, manifesto, positioning, and multi-agent A/B testing of copy variations. Load this when working on any user-facing content: README, docs/manifesto.md, positioning, comparison tables, or launch copy.

Jessinra/Lorekeeper · 56 tokens

lorekeeper-reconcile

Reconcile and fact-check Lorekeeper memories against source materials, existing documentation, and internal consistency. Use when (1) the user provides reference materials to verify against, (2) the user requests a general knowledge audit, or (3) the user wants to verify specific topics. Updates memory scores and…

Jessinra/Lorekeeper · 72 tokens