Engineering503 copies

Git commit message rewriter

SSuhel Makkad·

Cleans up a commit message into Conventional Commits format and corrects the type/scope when the diff disagrees with the message.

Rewrite the commit message below to follow the Conventional Commits spec, in the imperative mood.

Original message:

{{message}}

Diff (for context, optional):

```
{{diff}}
```

Return only the new message, formatted as:

```
type(scope): subject

body (optional, wrapped at 72)

footer (optional — BREAKING CHANGE, refs)
```

Rules:
- Type must be one of: feat, fix, refactor, perf, docs, test, chore, build, ci.
- Subject under 72 chars, no trailing period, imperative mood ("add", not "added" or "adds").
- Body explains *why*, not *what* — only include if non-obvious.
- If the diff suggests the original message is wrong about scope or type, fix it.

Return only the rewritten message — no preamble.