Agent skill

Rebase

by tbhb in tbhb/vale-ai-tells

Replay the current branch onto its base and establish that the result is sound.

Apache-2.0Auto-check passedDevelopment

Install Rebase

skills CLI
$ npx skills add tbhb/vale-ai-tells --skill rebase -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install tbhb/vale-ai-tells rebase --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/tbhb/vale-ai-tells.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/rebase .claude/skills/rebase && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rebase
GitHub stars
115
Token cost
~2.1k tokens
SKILL.md length
1,172 words
Files
9 (incl. scripts)
Skills in repo
27
Repo updated
First seen
Licence
Apache-2.0

At a glance

Replay the current branch onto its base and establish that the result is sound.

  • Works in 7 steps: the checklist → choose the base → settle the working tree → …
  • Bring a branch current
  • SKILL.md covers Preflight, Step 0: the checklist, Step 1: choose the base and Step 2: settle the working tree, plus 6 more sections
  • Runs Shell scripts from its folder; calls git, mise and bash

What it does

Rebase is an agent skill from tbhb/vale-ai-tells. Replay the current branch onto its base and establish that the result is sound. Preflight settles the base by comparing the local default branch against origin's copy. The rebase runs under pinned settings. A range-diff afterwards says what the replay did to each commit. The gates then run against a tree no commit ever saw. Conflicts route to the resolve-rebase-conflicts skill. Use this whenever the user asks to rebase or to bring a branch current, and whenever a workflow needs the branch moved first.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts (for example `scripts/continue-rebase.sh`, `scripts/guard-rebase.sh` and `scripts/marker-scan.sh`).

It sits in Development, covering Git workflow. It works with Git. The repository describes itself as: In today's rapidly evolving landscape, vale-ai-tells is a comprehensive, cutting-edge Vale style package that empowers writers to seamlessly delve into the rich tapestry of AI…. The licence is Apache-2.0.

When your agent uses it

  • Bring a branch current
  • Whenever a workflow needs the branch moved first

Example prompts

  • “/rebase”

Requirements

  • A Bash shell

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. the checklist
  2. choose the base
  3. settle the working tree
  4. start the rebase
  5. resolve what it stops on
  6. verify the result
  7. report

What it can do on your machine

Read from SKILL.md and the folder at commit 4c7abc9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 7 files in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • mise
    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rebase loads about 2.1k tokens when it runs. Until then it costs about 128 tokens; SKILL.md has 1,172 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~128
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from tbhb/vale-ai-tells at commit 4c7abc9, republished under its Apache-2.0 licence (© tbhb). 1,172 words, ~2,071 tokens.

Download SKILL.mdSave it as .claude/skills/rebase/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
rebase
description
Replay the current branch onto its base and establish that the result is sound. Preflight settles the base by comparing the local default branch against origin's copy. The rebase runs under pinned settings. A range-diff afterwards says what the replay did to each commit. The gates then run against a tree no commit ever saw. Conflicts route to the resolve-rebase-conflicts skill. Use this whenever the user asks to rebase or to bring a branch current, and whenever a workflow needs the branch moved first.
license
Apache-2.0

Rebase workflow

Move the branch onto its base, then establish that what came out is right.

A guard hook runs alongside. It refuses a rebase started by hand and a continue past a conflict git never checked. It also refuses a dropped commit that isn't empty, a bare stash pop, and a force push without a lease.

Preflight

!bash ${CLAUDE_SKILL_DIR}/scripts/preflight.sh

Step 0: the checklist

Track these steps with the session's task-list tools where it carries them. Newer harnesses leave those tools out by default, and a session without them works the list in order as written.

  1. Choose the base
  2. Settle the working tree
  3. Start the rebase
  4. Resolve whatever it stops on
  5. Verify the result
  6. Report

Preflight reporting a merge or cherry-pick in progress stops everything. Say what's in the way and hand back. A rebase already in progress is the other case, and that one resumes at step 4.

Step 1: choose the base

Preflight computed this under == rebase base ==. Take its recommendation.

  • Local default branch carries everything the remote has, so rebase onto the local branch.
  • Local default branch sits behind the remote, so rebase onto origin/<default> and skip the stale local copy.

The commit skill's preflight makes the same decision, and both reach the same answer. Where the operator names a different base, use theirs and say why it differs.

Nothing to replay means nothing to do. Say so and stop.

Step 2: settle the working tree

--autostash handles a dirty tree, and start-rebase.sh passes it. It scopes the save to this rebase and never touches the shared stash stack, which is what makes it the sanctioned form here.

The stashed work sits outside the worktree while you resolve a conflict, so nothing you see there reflects it. It can also conflict on the way back once the replay finishes.

Where the work needs to survive a cancelled rebase as well, park it in a throwaway commit first:

text
git commit -am wip --no-verify

That's the one sanctioned --no-verify in this repository, and git reset --soft HEAD~1 afterwards removes it before anything reaches history.

Never a bare git stash pop or git stash apply. Worktrees share one global stash stack whose indices shift whenever any worktree pushes, so a bare pop takes whatever sits at stash@{0} right then. The guard hook refuses it.

Step 3: start the rebase

text
bash .claude/skills/rebase/scripts/start-rebase.sh <base>

Don't type the git rebase yourself. The script pins off rebase.updateRefs, an operator preference that quietly moves other local branches pointing into the replayed range. It pins off rebase.autoSquash as well, which would otherwise collapse a fixup! commit that earned its own review. Recording the pre-rebase tip is the third thing it does. Without that record, step 5 has nothing to compare against.

Exit 0 means the replay finished, so go to step 5. A 1 means it stopped, so go to step 4.

Read the output for a line about rerere replaying a recorded resolution. That's git staging a resolution from an earlier rebase without stopping, and nothing has read it since. Treat every such path as unverified.

Step 4: resolve what it stops on

text
bash .claude/skills/rebase/scripts/rebase-status.sh

That says which commit stopped, how far through the replay it sits, which paths remain unmerged, and what git staged without asking.

Then invoke the resolve-rebase-conflicts skill. It classifies each path before anything edits it and settles the mechanical ones itself, which covers most of them in this repository. Don't resolve conflicts here. The classification is what keeps a mechanical case from turning into a judgement call.

Once you have staged every path:

text
bash .claude/skills/rebase/scripts/continue-rebase.sh

That reads the staged blobs for conflict markers before it advances. git checks only that no path remains unmerged, so a file you staged with <<<<<<< still in it continues straight into a commit.

Repeat from rebase-status.sh at each further stop. Where git calls a commit empty because the change is already in the base, continue-rebase.sh --skip-empty drops it after proving the index matches HEAD.

Giving up stays available, and it costs nothing:

text
git rebase --abort

Reach for it when the conflicts say somebody cut this branch from the wrong place. Resolving thirty of them to reach that conclusion helps nobody.

Show full SKILL.md (486 more words)Show less

Step 5: verify the result

text
bash .claude/skills/rebase/scripts/verify-rebase.sh

A rebase that ends without complaint has proved one thing: every commit applied. It has proved nothing else, and what it leaves unproved is where the trouble sits.

A resolution can lose a hunk. The commit still applies. Its message still describes the change it no longer makes, and no gate anywhere notices, because a commit that does less than it claims isn't a syntax error. The range-diff this script prints is what surfaces it. That view pairs each old commit against its replayed self, marking = where the commit came through unchanged and ! where its content moved. Expect a ! wherever you resolved a conflict. Treat one anywhere else as a question to answer before moving on.

A tree can break with no commit at fault. The base adds a gate, the branch adds a file that gate rejects, and neither side fails on its own. That combination first exists after the rebase.

Run the gate the script names:

text
mise run check

Or mise run lint where the repository has no check. Either way, run it against the tree as it now stands rather than against any commit in isolation, because the tree is the thing nothing has tested yet.

A failure here is an ordinary fix rather than a rebase problem. Correct it, and commit through the commit skill. Where the fix belongs inside a commit the rebase just replayed, say so and let the operator choose between a follow-up commit and an amend.

Where the branch runs long enough for a mid-history break to matter, the thorough form runs the gate at every commit:

text
git -c rebase.updateRefs=false rebase --exec 'mise run lint' <base>

The script also names any path the repository declares generated through rebase-resolve=regenerate. The resolution took one side of those whole, on the understanding that the generator would overwrite it. Run the generator now, and commit what it changes.

Step 6: report

Say what the base was, how many commits replayed, which paths conflicted, and how you settled each one. Give what the gates reported, and name anything the range-diff flagged.

Then hand back. Pushing is the caller's call. A rebase rewrites the branch, so the push needs git push --force-with-lease origin HEAD. The guard refuses a bare --force, because the lease is what keeps the push from discarding whatever arrived while this session worked. Where a pull request is open, pr and watch-pr take it from there.

Where this sits

The commit skill rebases onto the base itself as its last step, and for a clean replay that's the whole story. Come here when that rebase stops on a conflict, when the branch needs moving without a commit in hand, or when the result needs the verification step this skill runs.

Preconditions

  • a git repository with a resolvable default branch
  • the resolve-rebase-conflicts skill deployed alongside this one
  • a mise run check or mise run lint task for the verification to run

Preflight checks each and says which are missing.

© tbhb, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (scripts) in .claude/skills/rebase of tbhb/vale-ai-tells.

  • SKILL.md
  • scripts/continue-rebase.sh
  • scripts/guard-rebase.sh
  • scripts/marker-scan.sh
  • scripts/preflight.sh
  • scripts/rebase-status.sh
  • scripts/start-rebase.sh
  • scripts/verify-rebase.sh
  • tokens.json

Open the folder on GitHubat commit 4c7abc9

Compare with similar skills

Rebase next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rebase compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rebase this skilltbhb/vale-ai-tells115—~2.1kAutomated safety check: PassApache-2.0
Player-Facing Patch NotesDonchitos/Claude-Code-Game-Studios26k—~2.5kAutomated safety check: NotesMIT
Git Teacher Savefivetaku/gptaku-plugins-codex128—~777Automated safety check: NotesMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Code Design Rationale Investigatorcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT

Similar skills

  • Player-Facing Patch Notes

    Donchitos/Claude-Code-Game-Studios

    Writes player-facing patch notes from git history and changelogs, filtering out framework and maintenance commits and rewriting developer wording for players.

    26k GitHub stars~2.5k tokensUpdated 9 days ago
    DevelopmentAuto-check: notes
  • Git Teacher Save

    fivetaku/gptaku-plugins-codex

    Commits changed files to Git, explained in plain language for non-developers.

    128 GitHub stars~777 tokensUpdated 1 mo ago
    DevelopmentAuto-check: notes
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Official

    Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

    10k GitHub starsUsed in 9 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    55k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed

More from tbhb/vale-ai-tells

All 27 skills in this repo
  • Analyze Session

    tbhb/vale-ai-tells

    Query a Claude Code transcript without reading it into context, then write the retrospective to disk so it remains available after the session ends.

    115 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Codex Analyze Session

    tbhb/vale-ai-tells

    Query a Codex transcript without reading it into context, then write the retrospective to disk so it remains available after the session ends.

    115 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Codex Fix PR

    tbhb/vale-ai-tells

    Diagnose failing pull request checks, reproduce them locally, make focused fixes, commit them through codex-commit, and refresh the published description when needed.

    115 GitHub stars~575 tokensUpdated yesterday
    Auto-check passed
  • Codex Merge PR

    tbhb/vale-ai-tells

    Squash merge a pull request. An agent skill from tbhb/vale-ai-tells.

    115 GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • Codex PR

    tbhb/vale-ai-tells

    Open or update a pull request for the current branch with an independently drafted and reviewed PRAGENTDESC.md.

    115 GitHub stars~846 tokensUpdated yesterday
    Auto-check passed
  • Codex Rebase

    tbhb/vale-ai-tells

    Replay the current branch onto its base and establish that the result is sound.

    115 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Rebase

What does Rebase do?

Replay the current branch onto its base and establish that the result is sound. Rebase is an agent skill from tbhb/vale-ai-tells. Replay the current branch onto its base and establish that the result is sound.

When should I use Rebase?

Rebase fits situations like: bring a branch current; whenever a workflow needs the branch moved first.

How do I install Rebase in Claude Code?

Run `npx skills add tbhb/vale-ai-tells --skill rebase -a claude-code`. Or copy the skill folder (.claude/skills/rebase in tbhb/vale-ai-tells) into .claude/skills/rebase in your project. Claude Code loads it when a task matches its description.

How do I install Rebase in Codex?

Run `npx skills add tbhb/vale-ai-tells --skill rebase -a codex`. Or copy the skill folder (.claude/skills/rebase in tbhb/vale-ai-tells) into .agents/skills/rebase in your project. Codex loads it when a task matches its description.

Can I use Rebase in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tbhb/vale-ai-tells --skill rebase -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rebase, .gemini/skills/rebase, .github/skills/rebase and .opencode/skills/rebase in your project.

What does Rebase need to run?

Going by SKILL.md and its folder, Rebase needs a shell for the scripts in its folder and the command-line tools its instructions call (git, mise and bash). Our summary lists: A Bash shell.

Does Rebase access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Rebase safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Rebase use?

Rebase is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rebase use?

About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rebase?

Skills that share tags, products or a category with Rebase: Player-Facing Patch Notes (Donchitos/Claude-Code-Game-Studios, 26k stars), Git Teacher Save (fivetaku/gptaku-plugins-codex, 128 stars), Finishing a Development Branch (obra/superpowers, 296k stars) and Code Design Rationale Investigator (cursor/plugins, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rebase?

tbhb (a GitHub user) maintains it in tbhb/vale-ai-tells, which has 115 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on October 7, 2026.

Source: tbhb/vale-ai-tells on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.