rebase-on-fresh-base-after-merge

rebase-on-fresh-base-after-merge is a skill for Claude Code, Codex from chen3feng/agent-skills. It costs 34 tokens per session (1,237 once invoked), scanned A, original, Apache-2.0.

A project-execution workflow that turns an architecture plan into tracked work, with separate branches, isolated Git worktrees, research, testing, reviews, and completion checks.

In plain words
What is it for?
Use it to execute a multi-step engineering plan, assign research and build tasks, review each item, merge successful work, and report failures.
Why use it?
It keeps parallel code changes separated and makes progress resumable and independently verified. A worktree is a separate working directory for a Git branch.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to execute a multi-step engineering plan, assign research and build tasks, review each item, merge successful work, and report failures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chen3feng/agent-skills/rebase-on-fresh-base-after-merge
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 chen3feng/agent-skills --skill rebase-on-fresh-base-after-merge
Clone the repo
git clone --depth 1 https://github.com/chen3feng/agent-skills

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 rebase-on-fresh-base-after-merge

README.md
[![agentmods](https://agentmods.dev/badge/skills/chen3feng/agent-skills/rebase-on-fresh-base-after-merge/github.svg)](https://agentmods.dev/skills/chen3feng/agent-skills/rebase-on-fresh-base-after-merge)
Your own site
<a href="https://agentmods.dev/skills/chen3feng/agent-skills/rebase-on-fresh-base-after-merge"><img src="https://agentmods.dev/badge/skills/chen3feng/agent-skills/rebase-on-fresh-base-after-merge/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 rebase-on-fresh-base-after-merge

Your own site · 80×15
<a href="https://agentmods.dev/skills/chen3feng/agent-skills/rebase-on-fresh-base-after-merge"><img src="https://agentmods.dev/badge/skills/chen3feng/agent-skills/rebase-on-fresh-base-after-merge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,237 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.00034 $0.01237
Opus 5 $0.00017 $0.00619
Sonnet 5 $0.00007 $0.00247
Haiku 4.5 $0.00003 $0.00124

Measured 12d ago against content hash b9593743891d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

rebase-on-fresh-base-after-merge 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 12d 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/rebase-on-fresh-base-after-merge/SKILL.md · 131 lines

How it starts

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

Start the next change from a fresh base

When to use

You just landed a PR (or the user says "I merged it"), and you're about to make the next change in the same repo. The working tree is still on the feature branch that was merged, or on a stale local master / main.

Problem

Three related failure modes:

  1. Branching off a stale base. Local master hasn't been fetched since the merge, so a new branch cut from it is missing the commits that were just merged upstream. The next PR will show a confusing diff (including files you didn't touch) or fail to merge cleanly.
  2. Reusing the old feature branch. Appending new commits to the already-merged branch and pushing again creates a "PR #2 on the same branch" situation — GitHub may refuse to open it, or will show the old merged commits in the diff.
  3. Uncommitted edits trapped on the wrong branch. You already made edits for the next task while still on the old branch; a naive git checkout master either fails or silently drags the edits along to a base that doesn't match them.

Symptom example:

$ git log --oneline origin/master..HEAD
fac933f Seed agent-skills with format spec and initial 7 skills   # already merged!

Solution

Standard recipe, safe with or without uncommitted edits:

# 0. (If you have unstaged edits for the next task) stash them
git -C <repo> stash push -u -m "wip-<next-task>"

# 1. Sync local refs with the remote
git -C <repo> fetch origin --prune

# 2. Find the real default branch — don't assume main or master
default=$(git -C <repo> symbolic-ref refs/remotes/origin/HEAD | sed 's@^.*/@@')

# 3. Fast-forward local default to origin
git -C <repo> checkout "$default"
git -C <repo> pull --ff-only origin "$default"

# 4. Cut the new branch from the fresh base
git -C <repo> checkout -b <new-slug>

# 5. Reapply the stashed edits (if step 0 happened)
git -C <repo> stash pop

# 6. Verify you're actually ahead of origin/$default by 0 commits
git -C <repo> log --oneline "origin/$default..HEAD"   # should be empty

Read the full file on GitHub · 131 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. 12d ago First seen · 131 lines · 34 tokens per session scan A b9593743891d

Subscribe to this mod's changes

rebase-on-fresh-base-after-merge is a skill published in the GitHub repository chen3feng/agent-skills (5 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 34 tokens to every session and 1,237 once invoked, about $0.0002 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.