git-merge-into-main

git-merge-into-main is a skill for Claude Code from LandonSchropp/agent-toolkit. It costs 41 tokens per session (819 once invoked), scanned A, original, MIT.

A workflow for merging a completed and reviewed Git branch directly into the repository's default branch, usually named main.

In plain words
What is it for?
Use it after a branch is committed and reviewed when it needs to be merged into main or another default branch.
Why use it?
It clarifies the final merge step for repositories that do not use a pull request for this integration.

Skill for Claude Code

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

Part of the ls-git plugin — 10 skills shipped together

Good fit Use it after a branch is committed and reviewed when it needs to be merged into main or another default branch.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/landonschropp/agent-toolkit/git-merge-into-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 LandonSchropp/agent-toolkit --skill git-merge-into-main
Clone the repo
git clone --depth 1 https://github.com/LandonSchropp/agent-toolkit

Made for: Claude Code.

Or install ls-git, the plugin that ships this one along with the rest of its 10 skills.

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 git-merge-into-main

README.md
[![agentmods](https://agentmods.dev/badge/skills/landonschropp/agent-toolkit/git-merge-into-main/github.svg)](https://agentmods.dev/skills/landonschropp/agent-toolkit/git-merge-into-main)
Your own site
<a href="https://agentmods.dev/skills/landonschropp/agent-toolkit/git-merge-into-main"><img src="https://agentmods.dev/badge/skills/landonschropp/agent-toolkit/git-merge-into-main/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for git-merge-into-main

Your own site · 80×15
<a href="https://agentmods.dev/skills/landonschropp/agent-toolkit/git-merge-into-main"><img src="https://agentmods.dev/badge/skills/landonschropp/agent-toolkit/git-merge-into-main.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 819 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.00041 $0.00819
Opus 5.5 $0.00016 $0.00328
Sonnet 5.5 $0.00008 $0.00164
Haiku 4.5 $0.00004 $0.00082

Measured 2mo ago against content hash 11c93d938366, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

git-merge-into-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 2mo 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/ls-git/skills/git-merge-into-main/SKILL.md · 49 lines

How it starts

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

Merge Into Main

Merges a finished branch into the default branch (e.g. main) by rebasing it on top, then fast-forwarding. For personal repos that integrate directly to main rather than through pull requests.

This skill does no reviewing and creates no commits.

Process

  1. Check preconditions: The branch must be committed with no unstaged files. It must also be reviewed by the user (not the same as a pull request review). Stop if either is missing.

  2. Rebase onto the default branch: Find the default branch with git default-branch, then rebase the branch onto it. Always rebase, even for a trivial branch. Resolve any conflicts before continuing — do not --skip or force past them.

  3. Fast-forward and push: Advance the default branch to the rebased branch with a fast-forward only (no merge commit), then push. If the default branch is checked out in another worktree, run the update from that worktree's directory — Git refuses to move a branch that is checked out elsewhere.

  4. Delete the merged branch: Once the default branch has the commits, delete the branch with git branch -d <branch> (the -d refuses if it isn't fully merged, so it's a safety check). Run it from the default-branch worktree, never from inside the branch's own worktree.

    Git won't delete a branch that is checked out anywhere, so free it first. If the branch has a worktree that is no longer needed, remove it with git worktree remove <branch-worktree>. If something else owns that worktree's lifecycle — the ls-agent:close-workspace skill removes herdr worktrees itself — leave it in place and detach it instead with git -C <branch-worktree> checkout --detach.

    If the branch was pushed, also delete the remote with git push origin --delete <branch>.

default_branch=$(git default-branch)

git rebase "$default_branch"
git -C <default-branch-worktree> merge --ff-only <branch>
git -C <default-branch-worktree> push origin "$default_branch"

git -C <default-branch-worktree> worktree remove <branch-worktree>   # or checkout --detach, if the worktree stays
git -C <default-branch-worktree> branch -d <branch>

Read the full file on GitHub · 49 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. 2mo ago Changed · +1 lines · +7 tokens per session 11c93d938366
  2. 3mo ago First seen · 48 lines · 34 tokens per session scan A f7c05b53c073

Subscribe to this mod's changes

git-merge-into-main is a skill published in the GitHub repository LandonSchropp/agent-toolkit (3 stars, last pushed today), licensed MIT. It adds 41 tokens to every session and 819 once invoked, about $0.0002 per session on Opus 5.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

git-merge-into-main compared with skills from other repositories

git-merge-into-main next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
git-merge-into-mainLandonSchropp/agent-toolkitSkill3todayMITA41Claude Code
artifactscloudflare/skillsSkill3.5k5d agoApache-2.0A66Claude Code
skill-upstream-prluongnv89/asmSkill976yesterdayMITA56Claude Code
skill-changelogluongnv89/asmSkill976yesterdayMITA53Claude Code
meanest-editorelvisun/newsjackSkill1.7k5d agoMITA33Claude Code
headline-generatorelvisun/newsjackSkill1.7k5d agoMITA88Claude Code
ai-visibility-writingelvisun/newsjackSkill1.7k5d agoMITA137Claude Code