claudette: Command for Claude Code

.claude/commands/rebase-on-main.md

rebase-on-main is a command for Claude Code from utensils/claudette. It costs 0 tokens per session (453 once invoked), scanned A, original, MIT.

A Git command procedure that updates your current branch by replaying its commits on top of the latest origin/main branch.

In plain words
What is it for?
It helps prepare a feature branch for review or merging while protecting uncommitted work and stopping when a conflict is unclear.
Why use it?
It provides a careful way to catch up with the main branch, handle merge conflicts, and check that formatting and tests still pass.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is utensils/claudette's own configuration. It tells Claude Code how to work on claudette itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claudette configures →

Reuse

Borrowing it

Nothing to install: this file belongs to utensils/claudette. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/utensils/claudette/main/.claude/commands/rebase-on-main.md
Clone the repo
git clone --depth 1 https://github.com/utensils/claudette

Made for: Claude Code.

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-on-main

README.md
[![agentmods](https://agentmods.dev/badge/commands/utensils/claudette/rebase-on-main.svg)](https://agentmods.dev/commands/utensils/claudette/rebase-on-main)
Your own site
<a href="https://agentmods.dev/commands/utensils/claudette/rebase-on-main"><img src="https://agentmods.dev/badge/commands/utensils/claudette/rebase-on-main.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 453 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.00000 $0.00453
Opus 5 $0.00000 $0.00227
Sonnet 5 $0.00000 $0.00091
Haiku 4.5 $0.00000 $0.00045

Measured 8d ago against content hash 028aa5c4f21a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

rebase-on-main 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 8d 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.

.claude/commands/rebase-on-main.md · 35 lines

What it actually says

Rebase the current branch on origin/main and resolve any conflicts.

Steps

  1. Check for uncommitted changes — Ensure the working tree is clean:

    • Run git status to check for uncommitted changes
    • If there are uncommitted changes, warn the user and stop — do not stash or discard work
  2. Fetch and rebase — Update the branch:

    • Run git fetch origin main
    • Run git rebase origin/main
    • If the rebase completes cleanly, skip to step 4
  3. Resolve conflicts — For each conflicting file:

    • Run git diff to see the conflict markers
    • Read the conflicting file to understand both sides of the conflict
    • Resolve the conflict by preserving the intent from both branches
    • Run git add <file> to mark as resolved
    • Run git rebase --continue to proceed
    • Repeat until all conflicts are resolved
    • If a conflict is ambiguous or risky, stop and ask the user for guidance
  4. Verify — Ensure the rebase didn't break anything:

    • Detect the project's toolchain from config files (e.g., package.json, Makefile, mix.exs, Cargo.toml, pyproject.toml)
    • Run the project's format command (e.g., prettier, mix format, cargo fmt, ruff format)
    • Run the project's lint command (e.g., eslint, mix credo, cargo clippy, ruff check)
    • Run the project's typecheck command if applicable (e.g., tsc --noEmit, mypy, mix dialyzer)
    • Run the project's test command (e.g., jest, mix test, cargo test, pytest)
    • If any check fails, investigate and fix the issue
  5. Report — Summarize what happened:

    • How many commits were rebased
    • Whether any conflicts were resolved (and what they were)
    • Whether all checks pass
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. 8d ago First seen · 35 lines · 0 tokens per session scan A 028aa5c4f21a

Subscribe to this mod's changes

rebase-on-main is a command published in the GitHub repository utensils/claudette (75 stars, last pushed 6d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 453 tokens. 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.