Code verifiedVerified 2026-10-04

Commit Message Generator: Conventional Commits From a Raw Diff

Commit Message Generator, a backend-free/no-LLM browser tool, converts pasted git diff/HEAD or PR patch into an editable Conventional Commits draft, so…

Contents

    Writing a good commit message is the last thing anyone wants to do. The diff is already clear in your head, the Conventional Commits type is a coin-flip between feat and fix, and the scope is whatever directory name you last typed. The Commit Message Generator is a small browser tool that reads a pasted git diff and proposes a message you can edit. Paste, generate, copy, commit.

    There is no backend, no language model, and no network call. The diff never leaves the page. It is the third entry in the Code Transformation block of the tools roadmap, after the Language Transpiler and the Refactoring Assistant.

    What it produces

    Give it the output of git diff, git diff HEAD, or a copied PR patch and it returns a Conventional Commits message:

    feat(api): add withRetry and stopServer
    
    - src/api/client.ts +8 −0: add RetryOptions, withRetry
    - src/api/server.ts +4 −0: add stopServer

    The header is type(scope): summary. The type is chosen from an ordered set of heuristics over the changed paths and added lines. The scope is the deepest shared path segment of the changed files. The summary is imperative and derived from the symbols the diff actually adds or renames, not a generic filler line. Below the header, the body groups changes by file with real +N/−M counts, and if a public signature was removed or a BREAKING CHANGE marker is present, a footer is appended.

    How the heuristic picks a type

    The classifier is a fixed ladder of rules, evaluated in order, and the tool shows you which rung fired. In outline:

    • test — every changed path sits in a test directory or matches a test filename pattern.
    • docs — every changed path is a documentation file.
    • ci / build — changes confined to workflow configs, lockfiles, or build manifests.
    • style — added and removed lines differ only by whitespace or comments.
    • fix — added lines mention a fix, a bug, a regression, or reference an issue number.
    • perf — added lines mention caching, memoization, or performance keywords.
    • feat — added lines introduce new functions, classes, interfaces, or exported bindings.
    • refactor — renames and moves, or a change with no net new lines of logic. Otherwise the fallback is chore.

    Each rule that fires records its reason in a list the page renders under the message, so the guess is inspectable rather than magic.

    The trade-off is honesty about intent

    The tool reads text. It does not parse an AST, resolve types, or know what you meant. That single design choice is the whole trade-off: it is fast, dependency-free, and works on any diff from any language, but it can only reason about surface signals.

    The practical consequences are worth stating plainly. A behavior-preserving rewrite and a subtle fix can look identical at the text level, so a diff without a fix keyword in an added line may be classified feat or refactor rather than fix. A change that mixes concerns — a feature plus an unrelated dependency bump — gets one type for the whole diff, which is often the wrong call. The scope is derived from file paths, so an oddly-shaped directory tree yields an odd scope. And the summary is pattern-extracted, so it reads the symbol names it finds, not a sentence a human would write.

    When the input has no diff markers at all, the tool says so instead of inventing a message. When a rename, a binary file, or a low-confidence guess is involved, it notes that in the warnings list. A visible warning beats a confident wrong answer.

    Using it

    Open the tool, paste your diff, and press Generate Message. Five preset diffs — feature, bugfix, refactor, docs, and a breaking change — load with one click if you want to see the classifier work before you trust it with your own. The output panel shows the message, the type badge, a stats line (N files changed, +X −Y), the body, any breaking-change footer, the reasoning list, and the warnings. Copy puts the whole message on the clipboard.

    Treat the result as a reviewed draft. The roadmap card links to the scope the tool commits to: it classifies from changed paths, added symbols, and removed signatures, and it tells you which rule fired so you can overrule it. Edit the summary to say what you actually did — the tool gets you to a Conventional Commits skeleton in one paste, which is the part that was tedious.

    What’s next

    The tools roadmap lists the remaining planned builds across Code Analysis, Code Transformation, Benchmarking & Performance, and Code Reference. The Commit Message Generator closes the third of five slots in Code Transformation; the Code Formatter Comparator and API Migration Mapper are next in that block.