agentleFS
xsovad06xsovad06/sova/.agents/skills/source-command-rearrange-commits/SKILL.md

source-command-rearrange-commits

Skill2 starsChanged 3 months agoApache-2.0View on GitHub

Reorganize current branch commits into small, logical, well-documented steps.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill when the user asks to run the migrated source command rearrange-commits.

    line 8
  2. Distinctive:

    Check the project's commit format invariant or AGENTS.md for valid scopes.

    line 62
  3. Distinctive:

    Do NOT invent new scopes: pre-push hooks may reject them.

    line 63
  4. Distinctive:

    All changes are committed (nothing left uncommitted)

    line 73
  5. Very specific:

    Before PR: Run /review after rearranging, then /pr

    line 81
  6. Distinctive:

    Keep commits small: easier to review and revert

    line 87
  7. Distinctive:

    Never create standalone doc-count commits (e.g., "docs: update counts"): fold doc/count updates into the commit that introduced the change …

    line 88
  8. Distinctive:

    NEVER use emojis in any output

    line 89

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

source-command-rearrange-commits

Use this skill when the user asks to run the migrated source command rearrange-commits.

Command Template

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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.