Agent skill

Git Rebase Main

by oocx in oocx/tfplan2md

Safely rebase the current feature branch on top of the latest origin/main.

MITAuto-check passedDevelopment

Install Git Rebase Main

skills CLI
$ npx skills add oocx/tfplan2md --skill git-rebase-main -a claude-code

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

GitHub CLI
$ gh skill install oocx/tfplan2md git-rebase-main --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/oocx/tfplan2md.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/git-rebase-main .claude/skills/git-rebase-main && 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
git-rebase-main
GitHub stars
174
Token cost
~456 tokens
SKILL.md length
138 words
Files
1
Skills in repo
28
Repo updated
First seen
Licence
MIT

At a glance

Safely rebase the current feature branch on top of the latest origin/main.

  • Works in 4 steps: Pre-flight Checks → Fetch and Rebase → Handle Conflicts → …
  • Preparing a branch for PR
  • SKILL.md covers Purpose, Hard Rules, Actions and Golden Example
  • Calls git

What it does

Git Rebase Main is an agent skill from oocx/tfplan2md. Safely rebase the current feature branch on top of the latest origin/main. Use when preparing a branch for PR, UAT, or release.

Its SKILL.md is about 460 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. It works with Git. The repository describes itself as: Convert terraform plans (json) into human readable markdown for easier review of changes in pull requests. The licence is MIT.

When your agent uses it

  • Preparing a branch for PR

Example prompts

  • “/git-rebase-main”

Workflow steps

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

  1. Pre-flight Checks
  2. Fetch and Rebase
  3. Handle Conflicts
  4. Force Push (with confirmation)

What it can do on your machine

Read from SKILL.md and the folder at commit 88d5240. 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

    Shell commands in SKILL.md call:

    • git

    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

Git Rebase Main loads about 456 tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 138 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from oocx/tfplan2md at commit 88d5240, republished under its MIT licence (© oocx). 138 words, ~456 tokens.

Download SKILL.mdSave it as .claude/skills/git-rebase-main/SKILL.md (or your agent's skills folder).
name
git-rebase-main
description
Safely rebase the current feature branch on top of the latest origin/main. Use when preparing a branch for PR, UAT, or release.

Git Rebase Main

Purpose

Ensure the current feature branch includes all the latest changes from main before proceeding with code review, UAT, or release. This prevents merge conflicts and ensures tests run against the latest codebase.

Hard Rules

Must
  • Fetch from origin before rebasing.
  • Handle rebase conflicts by stopping and reporting to the user.
  • Verify the branch is not main before rebasing.
Must Not
  • Force-push without user confirmation.
  • Rebase if there are uncommitted changes.

Actions

1. Pre-flight Checks
bash
# Ensure we're not on main
current_branch=$(git branch --show-current)
if [[ "$current_branch" == "main" ]]; then
  echo "ERROR: Cannot rebase main onto itself. Switch to a feature branch first."
  exit 1
fi

# Ensure working directory is clean
if [[ -n "$(git status --porcelain)" ]]; then
  echo "ERROR: Working directory has uncommitted changes. Commit or stash them first."
  exit 1
fi
2. Fetch and Rebase
bash
git fetch origin
git rebase origin/main
3. Handle Conflicts

If the rebase fails due to conflicts:

  1. Report the conflicting files to the user.
  2. Do NOT attempt to auto-resolve.
  3. Wait for user to resolve and run git rebase --continue.
4. Force Push (with confirmation)

After a successful rebase, the branch history has changed. Ask the user before force-pushing:

bash
git push --force-with-lease origin HEAD

Golden Example

bash
$ git fetch origin && git rebase origin/main
First, rewinding head to replay your work on top of it...
Applying: feat: add new formatting option
$ git push --force-with-lease origin HEAD

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

Files

Just SKILL.md in .agents/skills/git-rebase-main of oocx/tfplan2md.

Open the folder on GitHubat commit 88d5240

Compare with similar skills

Git Rebase Main 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.

Git Rebase Main compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Git Rebase Main this skilloocx/tfplan2md174—~456Automated safety check: PassMIT
Code Design Rationale Investigatorcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Worktrunk Tend CI Guidancemax-sixty/worktrunk9k—~6.4kAutomated safety check: PassCustom licence
Ansible Backport Creatoransible/ansible71k—~1.2kAutomated safety check: PassGPL-3.0
Cap Feature Building WorkflowCapSoftware/Cap23k—~2.5kAutomated safety check: WarnCustom licence
Hunk Release Workflowmodem-dev/hunk9.5k—~3.8kAutomated safety check: PassMIT

Similar skills

  • 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
  • Worktrunk Tend CI Guidance

    max-sixty/worktrunk

    Adds Worktrunk-specific rules to the tend CI workflows: Codecov polling, Rust test commands, labels and review criteria for pull requests handled in CI.

    9k GitHub stars~6.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Creates backports of a merged Ansible devel pull request onto the right stable branches by cherry-picking its merge commit onto new backport branches.

    71k GitHub stars~1.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Builds a Cap feature in an isolated Git worktree with disposable dev resources, verification, a recorded demo and a neutral pull request, started with /building.

    23k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check: warnings
  • Hunk Release Workflow

    modem-dev/hunk

    Maintainer workflow for preparing, publishing, verifying and curating Hunk releases, with confirmation gates before tags, publishes and public edits.

    9.5k GitHub stars~3.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Build Px4 macOS

    PX4/PX4-Autopilot

    Build PX4 board firmware on macOS in the px4-dev Docker container, including git worktrees, and stage commit-labeled artifacts without flashing hardware.

    13k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed

More from oocx/tfplan2md

All 28 skills in this repo
  • Create Agent Skill

    oocx/tfplan2md

    Create a new Agent Skill following project standards and templates.

    174 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Detect and analyze edge crossings and overlaps in SVG workflow diagrams using geometric intersection algorithms and visual analysis.

    174 GitHub stars~4.3k tokensUpdated today
    Auto-check passed
  • Generate PNG screenshots for release notes using the repository's HtmlRenderer and ScreenshotGenerator tools.

    174 GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Next Issue Number

    oocx/tfplan2md

    Determine the next available issue number across all change types (feature, fix, workflow, website) by checking both local docs and remote branches, then reserve it by pushing an empty branch.

    174 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Run Uat

    oocx/tfplan2md

    Run User Acceptance Testing by creating a PR with rendered markdown on GitHub or Azure DevOps.

    174 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Convert the mermaid diagram in docs/workflow.md to a blueprint-styled SVG for the website.

    174 GitHub stars~1.3k tokensUpdated today
    Auto-check passed

Works with

Questions about Git Rebase Main

What does Git Rebase Main do?

Safely rebase the current feature branch on top of the latest origin/main. Git Rebase Main is an agent skill from oocx/tfplan2md. Safely rebase the current feature branch on top of the latest origin/main.

When should I use Git Rebase Main?

Git Rebase Main fits situations like: preparing a branch for PR.

How do I install Git Rebase Main in Claude Code?

Run `npx skills add oocx/tfplan2md --skill git-rebase-main -a claude-code`. Or copy the skill folder (.agents/skills/git-rebase-main in oocx/tfplan2md) into .claude/skills/git-rebase-main in your project. Claude Code loads it when a task matches its description.

How do I install Git Rebase Main in Codex?

Run `npx skills add oocx/tfplan2md --skill git-rebase-main -a codex`. Or copy the skill folder (.agents/skills/git-rebase-main in oocx/tfplan2md) into .agents/skills/git-rebase-main in your project. Codex loads it when a task matches its description.

Can I use Git Rebase Main 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 oocx/tfplan2md --skill git-rebase-main -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/git-rebase-main, .gemini/skills/git-rebase-main, .github/skills/git-rebase-main and .opencode/skills/git-rebase-main in your project.

What does Git Rebase Main need to run?

Going by SKILL.md and its folder, Git Rebase Main needs the command-line tools its instructions call (git).

Does Git Rebase Main 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 Git Rebase Main 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. Review the folder before installing.

What licence does Git Rebase Main use?

Git Rebase Main 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 Git Rebase Main use?

About 456 tokens (SKILL.md is roughly 1.8k 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 Git Rebase Main?

Skills that share tags, products or a category with Git Rebase Main: Code Design Rationale Investigator (cursor/plugins, 10k stars), Worktrunk Tend CI Guidance (max-sixty/worktrunk, 9k stars), Ansible Backport Creator (ansible/ansible, 71k stars) and Cap Feature Building Workflow (CapSoftware/Cap, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Git Rebase Main?

oocx (a GitHub user) maintains it in oocx/tfplan2md, which has 174 GitHub stars. The repository holds 28 skills in this directory. The repository was last updated on October 7, 2026.

Source: oocx/tfplan2md on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.