rebase

rebase is a command for Codex from opsmill/infrahub-mcp. It costs 19 tokens per session (1,088 once invoked), scanned A, original, Apache-2.0.

A command that rebases your current Git branch onto the latest base branch. Rebasing replays your branch’s commits on top of newer commits from another branch.

In plain words
What is it for?
Use it to update a branch, resolve merge conflicts while preserving local changes, and optionally force-push the result and monitor CI.
Why use it?
It helps bring a feature branch up to date and handle conflicts before merging. It requires a clean working tree and stops on protected branches such as main or stable.

Command for Codex

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.

agentmods
npx agentmods add commands/opsmill/infrahub-mcp/rebase
Clone the repo
git clone --depth 1 https://github.com/opsmill/infrahub-mcp

Made for: 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

README.md
[![agentmods](https://agentmods.dev/badge/commands/opsmill/infrahub-mcp/rebase.svg)](https://agentmods.dev/commands/opsmill/infrahub-mcp/rebase)
Your own site
<a href="https://agentmods.dev/commands/opsmill/infrahub-mcp/rebase"><img src="https://agentmods.dev/badge/commands/opsmill/infrahub-mcp/rebase.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,088 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00019 $0.01088
Opus 5 $0.00010 $0.00544
Sonnet 5 $0.00004 $0.00218
Haiku 4.5 $0.00002 $0.00109

Measured 4d ago against content hash 418640db1a0e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rebase 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 4d 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.

.agents/commands/rebase.md · 145 lines

How it starts

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

Rebase Branch

Introduction

Rebase the current branch onto the latest base branch, resolving any merge conflicts by preserving the intent of local changes. Optionally force-push and monitor CI status on GitHub.

Arguments

#$ARGUMENTS

Supported arguments:

  • push — After a successful rebase, force-push the branch upstream and monitor GitHub Actions CI until completion.

Main Tasks

1. Assess Current State

  • Verify we are NOT on stable or main:
    git branch --show-current
    
    If on a protected branch, stop immediately.
  • Check for uncommitted changes:
    git status --short
    
    If there are uncommitted changes, stop — rebase requires a clean working tree.
  • Determine the base branch (default: stable):
    git log --oneline stable..HEAD | wc -l
    
  • Count local commits to know what to expect after rebase:
    git log --oneline stable..HEAD
    

2. Update Base Branch & Rebase

  1. Fetch the latest remote state:
    git fetch origin
    
  2. Start the rebase:
    git rebase origin/stable
    
  3. If the rebase completes cleanly, skip to Phase 4.

3. Resolve Merge Conflicts

If conflicts occur:

  1. Identify conflicting files:
    git diff --name-only --diff-filter=U
    
  2. For each conflicting file:
    • Read the file and understand both sides of the conflict
    • Preserve local intent — our changes take priority since we're landing our work on top of the latest base
    • Resolve the conflict, keeping the logic consistent
    • Stage the resolved file:
      git add <file>
      
  3. Continue the rebase:
    git rebase --continue
    
  4. Repeat until all conflicts are resolved.

When to ask the user:

  • Both sides modify the same logic in incompatible ways
  • A file was deleted on one side and modified on the other
  • Merge markers appear in generated files

4. Verify Rebase Result

Read the full file on GitHub · 145 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. 4d ago First seen · 145 lines · 19 tokens per session scan A 418640db1a0e

Subscribe to this mod's changes

rebase is a command published in the GitHub repository opsmill/infrahub-mcp (10 stars, last pushed today), licensed Apache-2.0. It adds 19 tokens to every session and 1,088 once invoked, about $0.0001 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.