Agent skill

Codex Rebase

by tbhb in tbhb/vale-ai-tells

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

MITAuto-check passedDevelopment

Install Codex Rebase

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

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

GitHub CLI
$ gh skill install tbhb/vale-ai-tells codex-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/codex-rebase .claude/skills/codex-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
codex-rebase
GitHub stars
115
Token cost
~2k tokens
SKILL.md length
1,168 words
Files
8 (incl. scripts)
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 7 steps: open the task list → choose the base → settle the working tree → …
  • Bring a branch current
  • SKILL.md covers Preflight, Step 0: open the task list, 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

Codex 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 codex-resolve-rebase-conflicts. 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 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts (for example `scripts/continue-rebase.sh`, `scripts/marker-scan.sh` and `scripts/preflight.sh`).

It sits in Development, covering Git workflow. 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 MIT.

When your agent uses it

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

Example prompts

  • “/codex-rebase”

Requirements

  • A Bash shell

Workflow steps

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

  1. open the task list
  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 6 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

Codex Rebase loads about 2k tokens when it runs. Until then it costs about 129 tokens; SKILL.md has 1,168 words of instructions outside code blocks.

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

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 MIT licence (© tbhb). 1,168 words, ~2,037 tokens.

Download SKILL.mdSave it as .claude/skills/codex-rebase/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
codex-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 codex-resolve-rebase-conflicts. Use this whenever the user asks to rebase or to bring a branch current, and whenever a workflow needs the branch moved first.

Rebase workflow

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

Codex doesn't provide a skill-scoped command hook. Use only the scripts named here to pin the rebase settings and check conflict markers before continuing. The continuation script also proves an empty skip. Never use a bare stash pop, start the rebase by hand, or force-push without a lease.

Preflight

Run bash .agents/skills/codex-rebase/scripts/preflight.sh.

Step 0: open the task list

Create these with update_plan, keeping exactly one item in_progress at a time.

  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. If that durability isn't enough, stop and let the operator settle the worktree before starting. Don't invent a temporary commit or reset sequence inside this workflow.

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 .agents/skills/codex-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 .agents/skills/codex-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. When another workflow started the rebase, preflight reconstructs the durable before/base record from git's active rebase state so verification still has both ranges after the replay finishes. Then follow codex-resolve-rebase-conflicts. Keep the resolution in this thread because delegated agents share the filesystem and concurrent conflict edits are unsafe. The skill classifies each path before anything edits it and settles the mechanical ones itself.

Once you have staged every path:

text
bash .agents/skills/codex-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 .agents/skills/codex-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 codex-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, MIT. 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 7 other files (scripts) in .claude/skills/codex-rebase of tbhb/vale-ai-tells.

  • SKILL.md
  • scripts/continue-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

Codex 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.

Codex Rebase compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codex Rebase this skilltbhb/vale-ai-tells115—~2kAutomated safety check: PassMIT
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
Migrate Internal Package into GhostTryGhost/Ghost55k—~3.8kAutomated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • 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
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Writes Conventional Commits whose bodies carry action lines recording the intent, decisions and constraints behind a change, not only what changed.

    29k GitHub starsUsed in 1 repo~2.7k tokens
    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
  • Settle the conflicts a merge-backend rebase left behind. An agent skill from tbhb/vale-ai-tells.

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

Categories

Questions about Codex Rebase

What does Codex Rebase do?

Replay the current branch onto its base and establish that the result is sound. Codex 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 Codex Rebase?

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

How do I install Codex Rebase in Claude Code?

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

How do I install Codex Rebase in Codex?

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

Can I use Codex 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 codex-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/codex-rebase, .gemini/skills/codex-rebase, .github/skills/codex-rebase and .opencode/skills/codex-rebase in your project.

What does Codex Rebase need to run?

Going by SKILL.md and its folder, Codex 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 Codex 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 Codex 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 Codex Rebase use?

Codex Rebase is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codex Rebase use?

About 2k tokens (SKILL.md is roughly 8.1k 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 Codex Rebase?

Skills that share tags, products or a category with Codex Rebase: Finishing a Development Branch (obra/superpowers, 296k stars), Code Design Rationale Investigator (cursor/plugins, 10k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Migrate Internal Package into Ghost (TryGhost/Ghost, 55k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codex 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.