cleanup-commits
Rebase and reorganize commits into clean, meaningful commits for easy PR review
Skill by apocohq
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/apocohq-cleanup-commits
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/cleanup-commits
Tools it pre-approves 5
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
Bash(git*),Read,Grep,Glob
What's inside
- Skill name
cleanup-commits- Description
- Rebase and reorganize commits into clean, meaningful commits for easy PR review
- License
- MIT
- Allowed tools
- Bash(git, *),, Read,, Grep,, Glob
- Instructions
- 138 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves some shell commands
Files (1)
- SKILL.md
SKILL.md (first lines)
# Cleanup Commits for PR Review
Reorganize all commits on the current branch into clean, logical commits that are easy to review.
## Arguments
- `$0` - Base branch to rebase onto (default: `main`)
## Process
### 1. Preparation
First, verify clean working state and identify the base:
```bash
git status --porcelain
```
If there are uncommitted changes, warn the user and stop.
Get the base branch (use argument or default to `main`):
- Base branch: `${0:-main}`
### 2. Analyze Changes
Get the full picture of what changed:
```bash
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:
```bash
git diff --name-only ${0:-main}..HEAD
```
### 3. Plan Commits
Based on the diff analysis, identify logical groupings. Common patterns:
- **Feature commits**: Group related functionality together
- **Refactor commits**: Structural changes without behavior change
- **Config/setup commits**: Dependencies, configs, tooling
- **Test commits**: Test additions/changes
- **Fix commits**: Bug fixes
- **Docs commits**: Documentation updates
Create a plan listing each commit with:
- Clear subject line (imperative mood, <72 chars)
- Which files go in each commit
- Why this grouping makes sense
**Show the plan to the user and ask for confirmation before proceeding.**
### 4. Execute Rebase
After user confirms the plan:
```bash
git reset --soft ${0:-main}
git reset HEAD
```
This unstages everything while keeping all changes in working directory.
### 5. Create Commits
For each logical group in the plan:
1. Stage the relevant files:
```bash
git add <specific-files>
```
2. Create commit with descriptive message:
```bash
git commit -m "type: concise description
- Detail 1
- Detail 2"
```
Use conventional commit prefixes:
- `feat:` - New features
- `fix:` - Bug fixes
- `refactor:` - Code restructuring
- `test:` - Test changes
- `docs:` - Documentation
- `chore:` - Build, config, dependencies
### 6. Verify Result
Show the new commit history:
```bash
git log --oneline ${0:-main}..HEAD
```
Compare with original to ensure nothing was lost:
```bash
git diff ${0:-main}..HEAD --stat
```
## Important Notes
- This is a **destructive operation** - it rewrites git history
- Only use on branches that haven't been pushed, or be prepared to force push
- Always verify the final diff matches the original diff
- If something goes wrong, use `git reflog` to recoverFrom apocohq/skills, MIT.
More from apocohq/skills
- 0.518score
process-transcript
apocohq
Convert VTT meeting transcripts from meetings/incoming/ into structured markdown notes in meetings/
SkillCFreshness: C★ 4Claude Code +9 - 0.456score
meeting-minutes
apocohq
Extract substantive content from a meeting transcript, preserving important discussions verbatim and filtering out chitchat and inappropriate language
SkillDFreshness: D★ 4Claude Code +9 - 0.455score
gmail-multi-inbox
apocohq
Set up and maintain Gmail Multiple Inboxes with auto-discovered sender filters.
SkillDFreshness: D★ 4Claude Code +9 - 0.454score
design-first-engineering
apocohq
Guide software design iteration before writing any code.
SkillDFreshness: D★ 4Claude Code +9 - 0.454score
write-a-prd
apocohq
Create a PRD through user interview, codebase exploration, and module design, then submit as a GitHub issue after user approval.
SkillDFreshness: D★ 4Claude Code +9 - 0.454score
ralph-it
apocohq
Pick and implement the next user story from a PRD GitHub issue.
SkillDFreshness: D★ 4Claude Code +9 - 0.454score
adr
apocohq
Tracks Architecture Decision Records (ADRs) in docs/adrs/.
SkillDFreshness: D★ 4Claude Code +9 - 0.454score
align-repo
apocohq
Check and align a repo's .claude/settings.json and CLAUDE.md with team conventions.
SkillDFreshness: D★ 4Claude Code +9 - 0.451score
dir-tree-index
apocohq
Generate or update distributed STRUCTURE.md index files across a repo to help LLMs orient quickly in project structure and to make large knowledge…
SkillDFreshness: D★ 4Claude Code +9 - 0.450score
things-morning-organizer
apoco
Morning review and prioritization of Things todos.
SkillDFreshness: D★ 4Claude Code +9 - 0.434score
skill-creator
apocohq
Create new skills, modify and improve existing skills, and measure skill performance.
SkillDFreshness: D★ 4Claude Code +9 - 0.433score
review-work
apocohq
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
SkillDFreshness: D★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Mar 18, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/apocohq/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from apocohq
- 0.518score
process-transcript
apocohq
Convert VTT meeting transcripts from meetings/incoming/ into structured markdown notes in meetings/
SkillCFreshness: C★ 4Claude Code +9 - 0.456score
meeting-minutes
apocohq
Extract substantive content from a meeting transcript, preserving important discussions verbatim and filtering out chitchat and inappropriate language
SkillDFreshness: D★ 4Claude Code +9 - 0.455score
gmail-multi-inbox
apocohq
Set up and maintain Gmail Multiple Inboxes with auto-discovered sender filters.
SkillDFreshness: D★ 4Claude Code +9 - 0.454score
design-first-engineering
apocohq
Guide software design iteration before writing any code.
SkillDFreshness: D★ 4Claude Code +9 - 0.454score
write-a-prd
apocohq
Create a PRD through user interview, codebase exploration, and module design, then submit as a GitHub issue after user approval.
SkillDFreshness: D★ 4Claude Code +9 - 0.454score
ralph-it
apocohq
Pick and implement the next user story from a PRD GitHub issue.
SkillDFreshness: D★ 4Claude Code +9
Cite this page
cleanup-commits skill. Agent Mart. https://agentmart.dev/skills/apocohq-cleanup-commits (last updated 2026-10-24)