source-command-rearrange-commits
Skill2 starsChanged 3 months agoApache-2.0View on GitHub
Reorganize current branch commits into small, logical, well-documented steps.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- dashboard-designSkill
- database-patternsSkill
- source-command-extract-knowledgeSkill
- testing-patternsSkill
- visual-auditSkill
- dashboard-designSkill
- database-patternsSkill
- design-tasteSkill
- issue-templateSkill
- testing-patternsSkill
- visual-auditSkill
- design-systemSkill
- issue-templateSkill
- testing-patternsSkill
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
- Very specific: line 8
Use this skill when the user asks to run the migrated source command rearrange-commits.
- Distinctive: line 62
Check the project's commit format invariant or AGENTS.md for valid scopes.
- Distinctive: line 63
Do NOT invent new scopes: pre-push hooks may reject them.
- Distinctive: line 73
All changes are committed (nothing left uncommitted)
- Very specific: line 81
Before PR: Run /review after rearranging, then /pr
- Distinctive: line 87
Keep commits small: easier to review and revert
- Distinctive: line 88
Never create standalone doc-count commits (e.g., "docs: update counts"): fold doc/count updates into the commit that introduced the change …
- Distinctive: line 89
NEVER use emojis in any output
≈ “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.
Files
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 statusStep 2: Preserve All Changes
- Stash uncommitted changes (if any):
git stash push -m "Pre-rearrange stash" - Soft reset all commits back to origin/main:
git reset --soft origin/main - Pop stashed changes (if any):
git stash pop
Step 3: Create Small, Logical Commits
Group changes by logical unit and commit in order:
- Schema/model/migration changes first
- Core logic/services second
- API/views/controllers third
- Tests fourth
- 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 --statEnsure:
- 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
/reviewafter 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
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
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.

