sova: Command for Claude Code

.claude/commands/rearrange-commits.md

rearrange-commits is a command for Claude Code from xsovad06/sova. It costs 23 tokens per session (536 once invoked), scanned A, original, Apache-2.0.

A Git workflow for reorganizing the commits on the current branch into small, logical steps. A commit is a saved snapshot of changes in Git.

In plain words
What is it for?
Use it to group schema, application logic, API, tests, and configuration changes into documented commits, then compare them with the main branch.
Why use it?
It makes a branch's history easier to review by separating unrelated changes and preserving a clear order.

Command for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions AGENTS.md.

This is xsovad06/sova's own configuration. It tells Claude Code how to work on sova 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 sova configures →

Reuse

Borrowing it

Nothing to install: this file belongs to xsovad06/sova. 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/xsovad06/sova/main/.claude/commands/rearrange-commits.md
Clone the repo
git clone --depth 1 https://github.com/xsovad06/sova

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 rearrange-commits

README.md
[![agentmods](https://agentmods.dev/badge/commands/xsovad06/sova/rearrange-commits.svg)](https://agentmods.dev/commands/xsovad06/sova/rearrange-commits)
Your own site
<a href="https://agentmods.dev/commands/xsovad06/sova/rearrange-commits"><img src="https://agentmods.dev/badge/commands/xsovad06/sova/rearrange-commits.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 536 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.1 $0.00023 $0.00536
Opus 5 $0.00012 $0.00268
Sonnet 5 $0.00005 $0.00107
Haiku 4.5 $0.00002 $0.00054

Measured 6d ago against content hash 7f44219243bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

rearrange-commits 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 6d 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/rearrange-commits.md · 89 lines

What it actually says

Rearrange Commits

Reorganize all commits on the current branch into clean, logical, atomic commits.

Instructions

Step 1: Analyze Current State

git branch --show-current
git log origin/main..HEAD --oneline
git diff origin/main...HEAD --stat
git status

Step 2: Preserve All Changes

  1. Stash uncommitted changes (if any):
    git stash push -m "Pre-rearrange stash"
    
  2. Soft reset all commits back to origin/main:
    git reset --soft origin/main
    
  3. Pop stashed changes (if any):
    git stash pop
    

Step 3: Create Small, Logical Commits

Group changes by logical unit and commit in order:

  1. Schema/model/migration changes first
  2. Core logic/services second
  3. API/views/controllers third
  4. Tests fourth
  5. Configuration/misc last

Commit Message Format

type(scope): short description

Detailed explanation of WHAT, WHY, and HOW.

Types: feat, fix, refactor, test, docs, chore, perf

Check the project's commit format invariant or AGENTS.md for valid scopes. Do NOT invent new scopes -- pre-push hooks may reject them.

Step 4: Verify

git log origin/main..HEAD --oneline
git diff origin/main...HEAD --stat

Ensure:

  • All changes are committed (nothing left uncommitted)
  • Each commit is atomic and self-contained
  • Commits are in logical order
  • The total diff matches what it was before reorganization

Cross-References

  • Called by: /develop-full (Phase 3) and /pr (commit organization step)
  • Before PR: Run /review after rearranging, then /pr

Rules

  • Each commit = ONE logical change
  • Earlier commits should not depend on later ones
  • Keep commits small -- easier to review and revert
  • Never create standalone doc-count commits (e.g., "docs: update counts") -- fold doc/count updates into the commit that introduced the change (the one that added the service, step, test, etc.)
  • NEVER use emojis in any output
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. 6d ago First seen · 89 lines · 23 tokens per session scan A 7f44219243bf

Subscribe to this mod's changes

rearrange-commits is a command published in the GitHub repository xsovad06/sova (2 stars, last pushed yesterday), licensed Apache-2.0. It adds 23 tokens to every session and 536 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.