merge-and-rebase
Ship a finished feature branch end to end - commit and push, open a pull/merge request against the trunk branch, merge it without squashing, then rebase the…
Skill by jtsang4
Chalk Labs
Need help deploying merge-and-rebase?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jtsang4-merge-and-rebase
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/merge-and-rebase
What's inside
- Skill name
merge-and-rebase- Description
- Ship a finished feature branch end to end - commit and push, open a pull/merge request against the trunk branch, merge it without squashing, then rebase the feature branch onto the updated trunk. Use when the user says work on this branch is done and asks to submit, raise a PR/MR, merge it, land it, or sync the branch back onto main.
- License
- MIT
- Instructions
- 76 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# 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. If the branch is already committed and pushed with nothing outstanding, say so and move on rather than manufacturing an empty commit. ## Stage 2: Open the Request Create a pull request or merge request from the feature branch into the trunk branch. Write a title and description that let a reviewer understand the change without reading every commit: what problem it solves, the approach taken, and anything a reviewer should look at closely. Fill in the repository's PR/MR template if one exists. Link the related issue or ticket when the branch name, commits, or the user's instructions make it identifiable. **Do not squash.** This is the default for this workflow and it applies at every point squashing can be configured: - If the request-creation step exposes a squash option, set it off. - If the platform's form has a "squash commits when merge request is accepted" checkbox — as GitLab does — uncheck it after creating the request. - If the merge step later offers a strategy choice, choose the ordinary merge commit, not squash. Override this only when the user explicitly asks for a squash on this particular change, or when the target repository enforces squash-only merges at the platform level. In the enforced case, tell the user that the platform is forcing it rather than silently complying. If a request for this branch already exists, reuse it and update its description if it is stale, instead of opening a duplicate. ## Stage 3: Merge It Merge the request into trunk using whatever capability the environment actually provides, in this order of preference: 1. **A repository CLI or platform tool already available on the host** — a forge CLI, an API client, or a configured integration. This is the most reliable path; use it when it exists and is authenticated. 2. **A skill or connector in the current environment** that manages this platform's requests. 3. **A browser automation tool**, driving the request's web page directly — open the request, verify the squash setting is off, pick the merge-commit strategy, and click merge. Do not invent a tool that is not present. If none of the three paths is available, stop and hand the user the request URL with an explicit note that the merge needs to happen manually. Before merging, check the gates the platform reports: required approvals, status checks, and conflicts with trunk. If checks are still running, say so and ask whether to wait or proceed. If the request is blocked by review requirements or a failing check, do not attempt to bypass it — report the blocker and stop. If trunk has conflicting changes, resolve them on the feature branch and push before merging, and describe the resolution to the user. After merging, confirm the merge actually landed rather than assuming the command succeeded. ## Stage 4: Rebase onto the New Trunk Bring the feature branch onto the merged trunk so continued work starts from current code: 1. Fetch the remote so the local view of trunk includes the merge. 2. From the feature branch, rebase onto the updated trunk. 3. Resolve conflicts if any appear, explaining each resolution. If the rebase is going badly, abort it and tell the user rather than forcing through a resolution you are unsure about. Because the branch's commits are already in trunk after the merge, this usually leaves the feature branch sitting cleanly on top of trunk with nothing extra. That is the expected outcome, not an error. The rebase rewrites local history, so the branch will diverge from its remote copy. Do not force-push automatically. Mention the divergence and, if the user wants the remote updated, force-push with a lease so a concurrent push cannot be clobbered. If the branch was deleted on the remote as part of the merge, point that out and confirm whether the user wants to keep working on it locally, delete it, or start a fresh branch from trunk. ## Reporting Close with what actually happened at each stage: the commit that was pushed, the request URL, the merge strategy used, and the branch's final state relative to trunk. If any stage was skipped, blocked, or done differently than described here, say which one and why.
From jtsang4/efficient-coding, MIT.
More from jtsang4/efficient-coding
- 0.600score
diffusion-map
jtsang4
扩散图谱:围绕一个主题(学习一个领域、构思一个项目,或任何需要逐步展开的信息),先确立几个支柱,再随着对话由你判断把信息结构向外生长、重组,持久化在本地以便跨会话继续,并用本地网页实时呈现,可回溯每个节点背后的 Claude Code / Codex 对话。只在用户显式调用时使用。
SkillAFreshness: A★ 2Claude Code +9 - 0.559score
paseo-relay
jtsang4
Connect to other Paseo hosts through Relay using authorized pairing information; discover projects, workspaces and agents, inspect sessions and timelines, and…
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
problem-framing
jtsang4
Reassess a problem when a solution accumulates branches, special cases, or layers, or discussion repeatedly fails to converge.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
agent-native-redesign
jtsang4
Rethink a project, product, workflow, or scenario around abundant AI agent execution capacity.
SkillBFreshness: B★ 2Claude Code +9 - 0.512score
i-diagram
jtsang4
Create professional SVG diagrams of any type — architecture diagrams, flowcharts, sequence diagrams, structural diagrams, mind maps, timelines…
SkillCFreshness: C★ 2Claude Code +9 - 0.512score
general-skill-creator
jtsang4
Create, modify, evaluate, and package portable Agent Skills for coding agents.
SkillCFreshness: C★ 2Claude Code +9 - 0.507score
assess-source-project-fit
jtsang4
Assess whether external material such as a paper, article, repository, design, talk, internal document, or benchmark offers meaningful improvements for an…
SkillCFreshness: C★ 2Claude Code +9 - 0.501score
plan-coaching
jtsang4
规划教练。通过访谈引导用户形成能被批准和推行的规划材料,或对已有规划稿做评审与拷问。当用户要写规划、Roadmap、立项或方向提案,或要求 review 规划文档时使用。
SkillCFreshness: C★ 2Claude Code +9 - 0.496score
coaching-engine
jtsang4
report-coaching 和 plan-coaching 共享的访谈引擎。当这两个 skill 要求遵循访谈规则时加载,一般不单独使用。
SkillCFreshness: C★ 2Claude Code +9 - 0.466score
plan-me
jtsang4
通过访谈从零梳理一份规划材料。
SkillCFreshness: C★ 2Claude Code +9 - 0.448score
cubox-research
jtsang4
Search a user's Cubox collection deeply by topic, theme, or question.
SkillDFreshness: D★ 2Claude Code +9 - 0.445score
exa-web-search
jtsang4
Free AI search via Exa MCP.
SkillDFreshness: D★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 25, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/jtsang4/efficient-coding
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from jtsang4
- 0.600score
diffusion-map
jtsang4
扩散图谱:围绕一个主题(学习一个领域、构思一个项目,或任何需要逐步展开的信息),先确立几个支柱,再随着对话由你判断把信息结构向外生长、重组,持久化在本地以便跨会话继续,并用本地网页实时呈现,可回溯每个节点背后的 Claude Code / Codex 对话。只在用户显式调用时使用。
SkillAFreshness: A★ 2Claude Code +9 - 0.559score
paseo-relay
jtsang4
Connect to other Paseo hosts through Relay using authorized pairing information; discover projects, workspaces and agents, inspect sessions and timelines, and…
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
agent-native-redesign
jtsang4
Rethink a project, product, workflow, or scenario around abundant AI agent execution capacity.
SkillBFreshness: B★ 2Claude Code +9 - 0.557score
problem-framing
jtsang4
Reassess a problem when a solution accumulates branches, special cases, or layers, or discussion repeatedly fails to converge.
SkillBFreshness: B★ 2Claude Code +9 - 0.512score
general-skill-creator
jtsang4
Create, modify, evaluate, and package portable Agent Skills for coding agents.
SkillCFreshness: C★ 2Claude Code +9 - 0.512score
i-diagram
jtsang4
Create professional SVG diagrams of any type — architecture diagrams, flowcharts, sequence diagrams, structural diagrams, mind maps, timelines…
SkillCFreshness: C★ 2Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get merge-and-rebase running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
merge-and-rebase skill. Agent Mart. https://agentmart.dev/skills/jtsang4-merge-and-rebase (last updated 2026-10-24)