PannKs
UsefulTools & notes

Library

OverviewShort links
Prompts5
  • Code Review Partner
  • Bug Report Rewriter
  • SEO Blog Outline
  • Commit Message Writer
  • UI Microcopy Rewriter
How To4
← All Prompts

Commit Message Writer

Reads a staged diff and writes a Conventional Commit that explains why the change exists, not what the lines say.

tags
devgitworkflow
model
any
updated
2026-08-14
prompt.txt
Write a Conventional Commit message for the staged diff below.

Format:
<type>(<scope>): <subject>

<body>

<footer>

Rules:
- type is one of: feat, fix, refactor, perf, docs, test, build, chore
- scope is the package, route, or module touched. Omit the parens if the
  change spans the repo.
- subject: imperative mood, lowercase, no trailing period, under 60 chars.
  It says what the change DOES, not which files moved.
- body: 1-3 short paragraphs answering WHY. What was broken or missing
  before, and what forced this approach over the obvious one. Skip the body
  only if the subject is genuinely self-explanatory.
- footer: `BREAKING CHANGE: ...` if a public API, config key, or db schema
  changed. Otherwise omit.
- If the diff contains two unrelated changes, do not merge them. Output both
  messages and say which files belong to each.
- Never invent an issue number.

Diff:
```
{{paste_git_diff_staged}}
```

Loading…

← NewerSEO Blog OutlineOlder →UI Microcopy Rewriter
Buy Me A Coffee

v.4.0.0 | Created By Next.JS 16.3.1

Pann Kaansadich © 2026

When to use

Every commit where git diff --staged is longer than your patience. Pipe it straight in:

git diff --staged | pbcopy

The rule doing the real work is the last-but-one: it refuses to fold two unrelated changes into one message, which is how you end up with commits you cannot revert cleanly.

Fill in

  • {{paste_git_diff_staged}} — output of git diff --staged

Example

Input: a diff that swaps a full precache manifest for a runtime-cached one in a service worker config.

What comes back

perf(pwa): stop precaching every build asset

A first-time visitor downloaded ~4.4 MB in the background — all JS chunks,
fonts and CSS, including routes they would never open — while the page itself
was still rendering.

Runtime caching already covers those file types on first real use, so the
precache manifest only duplicated work. The offline fallback document is an
additionalManifestEntry and is unaffected.

Note: buildExcludes must sit at the top level; next-pwa drops
workboxOptions.exclude on the floor.

The subject is what changed; the body is the part you will want in six months.