reword-commits
/reword-commits
Rewrite every in-scope commit message (subject AND body) to a single line with git history reword. Use when the user asks to reword, rewrite, or clean up commit messages.
- Author
- motlin ↗
- Repository
- claude-code-plugins ↗
- Licence
- Apache-2.0
- Last repository change
- 26.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Rewrite every in-scope commit message (subject AND body) to a single line with git history reword. Use when the user asks to reword, rewrite, or clean up commit messages.
Original author description
Rewrite every in-scope commit message (subject AND body) to a single line with git history reword. Use when the user asks to reword, rewrite, or clean up commit messages.
How it works
- Constraints
- Scope
- Reading Each Commit
- Drafting and Confirming
- Applying
- Reporting
SKILL.md preview
---
name: reword-commits
description: Rewrite every in-scope commit message (subject AND body) to a single line with git history reword. Use when the user asks to reword, rewrite, or clean up commit messages.
---
# Reword Commits
Use the `code:cli` and `git:git-workflow` skills. The message format in `git:git-workflow` is the target.
Rewrite every commit message in scope. Don't triage, and don't skip commits whose subjects already look fine: every commit gets a fresh proposal.
## Constraints
Use `git history reword` only: no interactive rebase, `git commit --amend`, `git filter-branch`, `git filter-repo`, or `git replay`. No branch switching, no force-pushing, and no changes to content, authors, dates, parents, or trees. Messages only.
## Scope
By default, reword the current branch's commits that aren't on its upstream: `<upstream>..HEAD`, falling back to `main..HEAD` or `master..HEAD`. If none apply, ask which base to use via AskUserQuestion.
If the user asks for "all branches", collect each local branch's commits not on its upstream (or the `main`/`master` fallback). A commit shared across branches is rewritten once, since `git history reword` updates every branch that contains it.
Anything else the user wrote is extra guidance on top of `git:git-workflow`. If the set is empty, say so and stop.
## Reading Each Commit
Read the full message, subject and body, for every commit. A body is itself a violation of the single-line rule.
```bash
git log --format='%H%n%B%n--END-COMMIT--' <range>
git show --no-patch --format=%B <sha>
```
If a message's intent is unclear, read the diff with `git show <sha>`.
## Drafting and Confirming
For each commit, draft one line that distills the full prior message (subject and body) and applies the user's extra guidance. Show before/after for every commit, noting any body being collapsed:
```text
<short-sha> BEFORE: <current subject> [+ N-line body]
AFTER: <proposed single-line message>
```
Then ask via AskUserQuestion:
- "Apply all rewrites" (recommended)
- "Apply a subset" (ask which SHAs)
- "Regenerate proposals"
- "Cancel"
## Applying
Run `git history reword <sha>` for each approved commit, oldest first, with a `GIT_EDITOR` that overwrites the whole message file so the body is dropped too:
```bash
MSG="<new single-line message>" GIT_EDITOR='sh -c "printf %s\\n \"$MSG\" > \"$1\"" --' git history reword <sha>
```
If any invocation fails, stop, report the SHA and error, and leave the rest alone. Don't fall back to `rebase -i` or `--amend`.
## Reporting
- Commits inspected and rewritten, with before/after.
- For "all branches": which branches now point at rewritten history.
- A note that pushed branches need a force-push to update the remote. Don't push.
Versions
The database has no other skills named reword-commits.
Database snapshot: 13.11.2026 · package version e37a1e3335ac (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 95fix-git-history
Rewrite poor git commit messages into a clear conventional-commit history. Reads the last N commits with their diffs, proposes a clean conventional message for each by reading what the code actually changed, then opens a light-theme review UI where the user approves all or each… - 100commit-message
Generate conventional commit messages - use when creating commits, writing commit messages, or asking for git commit help - 95git-commits
Write clear, semantic git commit messages and PR/MR titles following Conventional Commits. Use when the user asks to write commit messages, format git history, improve commit quality, or set a PR/MR title, or mentions "commit message", "conventional commits", "merge message", or… - 100commit-helper
Helps write Git commit messages following the Conventional Commits specification. Use this skill when the user asks to commit changes, write commit messages, format commits, or mentions git commits. - 100git-commit-formatter
Formats git commit messages according to Conventional Commits specification. Use this when the user asks to commit changes or write a commit message. - 100commit-message
Generate descriptive commit messages by analyzing git diffs. Use when the user asks for help writing commit messages, reviewing staged changes, or wants to commit with a well-formatted message following conventional commits format.