merge-and-rebase

merge-and-rebase is a skill for Claude Code, Codex from jtsang4/efficient-coding. It costs 82 tokens per session (1,343 once invoked), scanned A, original, MIT.

A workflow for finishing a feature branch: commit and push the changes, open a pull or merge request, merge it, and rebase the branch onto the updated trunk branch. A feature branch is a separate line of development, while the trunk is the main shared branch.

In plain words
What is it for?
Use it when a finished branch needs to be submitted, merged, and synchronized with the latest main branch.
Why use it?
It provides a defined sequence for delivering completed branch work while checking that the repository state matches the intended operation.

Skill for Claude CodeCodex

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/jtsang4/efficient-coding/merge-and-rebase
Any agent
npx skills add jtsang4/efficient-coding --skill merge-and-rebase
Clone the repo
git clone --depth 1 https://github.com/jtsang4/efficient-coding

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-and-rebase

README.md
[![agentmods](https://agentmods.dev/badge/skills/jtsang4/efficient-coding/merge-and-rebase.svg)](https://agentmods.dev/skills/jtsang4/efficient-coding/merge-and-rebase)
Your own site
<a href="https://agentmods.dev/skills/jtsang4/efficient-coding/merge-and-rebase"><img src="https://agentmods.dev/badge/skills/jtsang4/efficient-coding/merge-and-rebase.svg" alt="Measured on agentmods" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,343 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.00082 $0.01343
Opus 5 $0.00041 $0.00672
Sonnet 5 $0.00016 $0.00269
Haiku 4.5 $0.00008 $0.00134

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

Security

Grade A, and why

merge-and-rebase 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 4d 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.

skills/merge-and-rebase/SKILL.md · 80 lines

How it starts

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

Merge and Rebase

The user has finished a change on a feature branch. Carry it through four stages: commit and push, open a request against trunk, merge it, then rebase the feature branch onto the new trunk. Stop and ask whenever the repository state contradicts what the user described.

Before Starting

Establish the ground truth from the repository itself, not from assumptions:

  • The current branch, and confirmation that it is not the trunk branch. If the user is standing on trunk, stop and ask what they intended.
  • The trunk branch name as this repository actually uses it — main, master, develop, or something else. Read it from the remote's default branch or the repo's own conventions rather than guessing.
  • The hosting platform and remote, so you know whether the target is a GitHub pull request, a GitLab merge request, or another forge's equivalent.
  • Whether the working tree has uncommitted changes, and whether they are all part of the feature the user means to ship.

Report anything surprising — unrelated modified files, a detached HEAD, an unexpected upstream, an already-open request for this branch — before acting on it.

Stage 1: Commit and Push

Review the actual diff before writing anything. Understand what changed and why.

Stage the changes that belong to this feature. Leave unrelated edits, stray debug output, local scratch files, and secrets out of the commit; call them out to the user instead of silently including or discarding them.

Write the commit message in the style this repository already uses — check recent history for whether it follows Conventional Commits, a ticket-prefix convention, or plain prose, and match it. Describe why the change exists, not a file-by-file inventory. Do not add promotional trailers or co-author lines that the repo does not already use.

Push the branch to the remote, setting upstream if it has none. If the push is rejected because the remote branch moved, inspect the divergence and ask before overwriting anything.

Read the full file on GitHub · 80 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. 4d ago First seen · 80 lines · 82 tokens per session scan A 343fc77a83db

Subscribe to this mod's changes

merge-and-rebase is a skill published in the GitHub repository jtsang4/efficient-coding (2 stars, last pushed 3d ago), licensed MIT. It adds 82 tokens to every session and 1,343 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