rebase

rebase is a command for Claude Code from ai-sdlc-framework/ai-sdlc. It costs 47 tokens per session (4,525 once invoked), scanned A, original, Apache-2.0.

A command that rebases a pull request (moves its changes onto the newest main branch) and handles straightforward merge conflicts automatically.

In plain words
What is it for?
Use it to update a pull request with the latest main branch, resolve routine conflicts, and refresh its signed attestation when the content changes.
Why use it?
It reduces the time spent repeatedly rebasing pull requests by hand. More complex conflicts and failed checks are sent back for human attention, while safer force-pushing protects other changes.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; mentions CLAUDE.md; mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the ai-sdlc plugin — 1 skill, 23 commands, 14 agents shipped together

Good fit Use it to update a pull request with the latest main branch, resolve routine conflicts, and refresh its signed attestation when the content changes.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add ai-sdlc-framework/ai-sdlc
Claude Code
/plugin install ai-sdlc

Made for: Claude Code.

Or install ai-sdlc, the plugin that ships this one along with the rest of its 1 skill, 23 commands, 14 agents.

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/ai-sdlc-framework/ai-sdlc/rebase/github.svg)](https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/rebase)
Your own site
<a href="https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/rebase"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/rebase/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

Your own site · 80×15
<a href="https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/rebase"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/rebase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,525 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.00047 $0.04525
Opus 5.5 $0.00019 $0.01810
Sonnet 5.5 $0.00009 $0.00905
Haiku 4.5 $0.00005 $0.00453

Measured today against content hash fa0e966857f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 today.

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.

ai-sdlc-plugin/commands/rebase.md · 366 lines

How it starts

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

Rebase PR #$ARGUMENTS onto latest origin/main by spawning the rebase-resolver subagent. This command exists because manual rebase loops were eating significant orchestrator time across PRs #113, #114, and #115 (AISDLC-105). The mechanical 80% (CHANGELOG overlaps, test additions, prettier drift) is delegated to the subagent; the architectural 20% (modify-vs-delete, semantic conflicts, verification failures) escalates back here for human attention.

Why this command lives in the slash command body (not a subagent middleman)

Same reason as /ai-sdlc execute: plugin subagents cannot use the Agent tool (the harness filters it out one level deep regardless of frontmatter — empirical proof in AISDLC-69.2 / AISDLC-98). The slash command body runs in the main Claude Code session which DOES have Agent, so it can spawn rebase-resolver directly.

Hard rules (NEVER violate)

  1. Merging follows governance.allowMerge in .ai-sdlc/agent-role.yaml, rendered into the session hard rules; when it permits merging, the only path is cli-merge-if-eligible; never run the raw merge command. Do not run gh pr merge.
  2. Never force-push with plain --force / -f. Always use --force-with-lease (mirrors agent-role.yaml block list).
  3. Never push to main or master. Refuse early.
  4. Never close PRs or issues. No gh pr close, gh issue close.
  5. Never delete branches. No git branch -D / -d.
  6. Edit governance config (.ai-sdlc/**) only when the task names the file and the change; never as a side effect. Runtime artifacts (attestations, reviews, transcript leaves, the decision log, the dispatch board) are written through their CLIs as today. Runs marked untrusted (AI_SDLC_UNTRUSTED_RUN) are blocked from .ai-sdlc/** and .github/workflows/** by the hook; ask a maintainer in the PR instead of retrying. .github/workflows/** is only refused when the project's .ai-sdlc/agent-role.yaml lists it under blockedPaths — not blocked by default.
  7. Never write GitHub Actions CI-skip magic tokens (AISDLC-88) — the five literal substrings ([skip ci], [ci skip], [no ci], [skip actions], [actions skip]) silently disable workflows. The re-attestation chore commit body composed by Step 5 below is sanitised the same way /ai-sdlc execute Step 10 sanitises it.

Read the full file on GitHub · 366 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. today Changed · +1 lines fa0e966857f5
  2. 2d ago Changed · +1 lines 8cb2eed1fec4
  3. 7d ago Changed cc0e9c6a975b
  4. 8d ago Changed b2f4abc167ce
  5. 10d ago Changed c3152f173ab9
  6. 12d ago Changed 186a1f84a6c5
  7. 15d ago Changed · +1 lines c467e07536c4
  8. 16d ago Changed · +17 lines abe922607866
  9. 1mo ago Changed 652054575249
  10. 1mo ago First seen · 346 lines · 47 tokens per session scan A 0fdb151de827

Subscribe to this mod's changes

rebase is a command published in the GitHub repository ai-sdlc-framework/ai-sdlc (415 stars, last pushed yesterday), licensed Apache-2.0. It adds 47 tokens to every session and 4,525 once invoked, about $0.0002 per session on Opus 5.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-30.