merge-main

merge-main is a skill for Claude Code from cboone/agent-harness-plugins. It costs 85 tokens per session (1,149 once invoked), scanned A, original, MIT.

A Git workflow for bringing the repository's base branch, usually called main, into the feature branch you are working on.

In plain words
What is it for?
Use it when you need to fetch and merge main or another base branch, with checks for uncommitted changes, branch selection, conflicts, and pushing.
Why use it?
It helps keep your branch up to date and provides a process for handling conflicts before changes are pushed.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the merge-main plugin — 1 skill shipped together

Good fit Use it when you need to fetch and merge main or another base branch, with checks for uncommitted changes, branch selection, conflicts, and pushing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cboone/agent-harness-plugins/merge-main
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.

Any agent
npx skills add cboone/agent-harness-plugins --skill merge-main
Clone the repo
git clone --depth 1 https://github.com/cboone/agent-harness-plugins

Made for: Claude Code.

Or install merge-main, the plugin that ships this one along with the rest of its 1 skill.

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-main

README.md
[![agentmods](https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/merge-main.svg)](https://agentmods.dev/skills/cboone/agent-harness-plugins/merge-main)
Your own site
<a href="https://agentmods.dev/skills/cboone/agent-harness-plugins/merge-main"><img src="https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/merge-main.svg" alt="Measured on agentmods" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,149 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.00085 $0.01149
Opus 5 $0.00043 $0.00575
Sonnet 5 $0.00017 $0.00230
Haiku 4.5 $0.00009 $0.00115

Measured 7d ago against content hash 9d2b1fd9e778, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

merge-main 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 7d 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.

plugins/merge-main/skills/merge-main/SKILL.md · 162 lines

How it starts

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

Merge Main

Fetch and merge the repository's base branch into the current feature branch.

Options

The user may provide these options inline:

  • --base <branch>: Override the auto-detected base branch (e.g., --base develop)

Workflow

1. Pre-Flight Checks

Run these commands in parallel to understand the current state:

# Check for uncommitted changes
git status

# Detect the repository's default branch
gh repo view --json defaultBranchRef -q '.defaultBranchRef.name'

# Confirm which branch we are on
git branch --show-current

If --base <branch> was specified, use that value instead of the detected default branch.

If gh is not available, fall back to detecting the default branch with:

git remote show origin | grep 'HEAD branch' | sed 's/.*: //'

If the current branch is the default branch itself, warn the user that merging the base branch into itself is a no-op and stop.

2. Handle Uncommitted Changes

If git status shows uncommitted changes (staged or unstaged):

  1. Warn the user that there are uncommitted changes.
  2. Ask whether to:
    • Stash: Run git stash before proceeding, then git stash pop after the merge completes.
    • Commit first: Invoke the /commit skill, then continue with the merge.
    • Abort: Stop without doing anything.

3. Fetch and Merge

git fetch origin <base-branch>
git merge origin/<base-branch>

Where <base-branch> is the detected or overridden base branch name.

4. Handle Merge Result

Clean Merge

If the merge completes without conflicts:

  1. Report success.
  2. Show a summary of what was merged:
git log HEAD@{1}..HEAD --oneline
Already Up to Date

If git reports "Already up to date.", report that the branch is already current with the base branch and stop.

Conflicts

If the merge produces conflicts, proceed to the conflict resolution workflow below.

5. Conflict Resolution

When merge conflicts occur:

Read the full file on GitHub · 162 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. 7d ago First seen · 162 lines · 85 tokens per session scan A 9d2b1fd9e778

Subscribe to this mod's changes

merge-main is a skill published in the GitHub repository cboone/agent-harness-plugins (2 stars, last pushed 1mo ago), licensed MIT. It adds 85 tokens to every session and 1,149 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.

Related

Other skills, from other repositories

release-check

Pre-release verification checklist. Validates features, tests, docs, security, and quality gates before shipping. Delegates to the Centinela (QA) agent.

davepoon/buildwithclaude · 36 tokens

05-review

Review a diff read-only on three axes, code, behavior versus the plan, and relevancy, into one verdict report. Use before shipping a change. Not for fixing findings or auditing a codebase.

ai-driven-dev/framework · 44 tokens

00-repo-init

Initialize a project repository with git init, a default branch, a bootstrap commit, CONTRIBUTING.md, and optionally the remote. Use when the user wants to init or set up a new repo, or publish to a remote. Not for committing, opening a PR, or tagging.

ai-driven-dev/framework · 61 tokens

01-commit

Create an atomic git commit with a conventional message, optionally pushing. Use when the user wants to commit changes, optionally pushing the branch. Not for amending, rebasing, opening a pull request, or tagging a release.

ai-driven-dev/framework · 49 tokens

02-pull-request

Create a draft pull or merge request from the current branch, in whatever VCS tool the project uses. Use when the user wants to open a pull or merge request. Not for committing, pushing, or merging a branch.

ai-driven-dev/framework · 50 tokens

03-release-tag

Cut a semver release with an annotated tag and release notes. Use when the user wants to release, tag a release, bump the version, or cut a version. Not for a plain commit, a pull request, or amending an existing tag.

ai-driven-dev/framework · 55 tokens