skills/cleanup-commits/SKILL.md
Rebase and reorganize commits into clean, meaningful commits for easy PR review
npx skillsauth add apocohq/skills cleanup-commitsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reorganize all commits on the current branch into clean, logical commits that are easy to review.
$0 - Base branch to rebase onto (default: main)First, verify clean working state and identify the base:
git status --porcelain
If there are uncommitted changes, warn the user and stop.
Get the base branch (use argument or default to main):
${0:-main}Get the full picture of what changed:
git log --oneline ${0:-main}..HEAD
git diff --stat ${0:-main}..HEAD
git diff ${0:-main}..HEAD
Also check the files changed to understand the scope:
git diff --name-only ${0:-main}..HEAD
Based on the diff analysis, identify logical groupings. Common patterns:
Create a plan listing each commit with:
Show the plan to the user and ask for confirmation before proceeding.
After user confirms the plan:
git reset --soft ${0:-main}
git reset HEAD
This unstages everything while keeping all changes in working directory.
For each logical group in the plan:
Stage the relevant files:
git add <specific-files>
Create commit with descriptive message:
git commit -m "type: concise description
- Detail 1
- Detail 2"
Use conventional commit prefixes:
feat: - New featuresfix: - Bug fixesrefactor: - Code restructuringtest: - Test changesdocs: - Documentationchore: - Build, config, dependenciesShow the new commit history:
git log --oneline ${0:-main}..HEAD
Compare with original to ensure nothing was lost:
git diff ${0:-main}..HEAD --stat
git reflog to recoverBefore:
abc1234 wip
def5678 more stuff
ghi9012 fix thing
jkl3456 wip2
After:
aaa1111 feat: add user authentication flow
bbb2222 refactor: extract validation helpers
ccc3333 test: add auth integration tests
testing
Tracks Architecture Decision Records (ADRs) in docs/adrs/. Creates, lists, and updates ADRs following project conventions. TRIGGER when: user wants to record, review, or update an architectural decision.
development
Create a PRD through user interview, codebase exploration, and module design, then submit as a GitHub issue after user approval. Use when user wants to write a PRD, create a product requirements document, or plan a new feature. Always present the PRD for user approval before submitting.
development
Morning review and prioritization of Things todos. Use this skill every morning, or whenever the user asks to review, triage, categorize, or prioritize their Things tasks. Also trigger when the user says things like 'what should I work on today', 'organize my todos', 'morning routine', or 'daily review'.
testing
Use when completing tasks, implementing major features, or before merging to verify work meets requirements