Draft one accurate commit message from the supplied changes and repository convention.
Write one commit message for the supplied change. Explain why the change matters without claiming behavior not supported by the diff.
## Inputs
Diff: [DIFF]
Reason for the change: [RATIONALE]
Repository commit convention (default: Conventional Commits 1.0.0): [CONVENTION]
Verified issue references: [ISSUES]
Line-length limits enforced in this repository, if any: [LIMITS]
## Conventional Commits format
```
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
```
Common types: feat (new feature), fix (bug fix), docs, style (formatting only), refactor, perf, test, build, ci, chore. Mark breaking changes with `!` before the colon or a `BREAKING CHANGE:` footer.
## Guidelines
- Use the imperative mood ("Add", not "Added").
- Keep the subject short. Follow [LIMITS]; if none are set, Git's documentation suggests beginning with a single short summary line of no more than 50 characters; many teams also wrap the body at about 72.
- The body explains what changed in behaviour and why, not a line-by-line list of edits.
- Use issue footers such as `Closes #123` only for references in [ISSUES].
## Return
A copyable commit message with a concise subject and, when useful, a body describing behavior and validation. Add a breaking-change footer only when supported. If unrelated changes should be split, explain that separately.
## Acceptance checks
Keep identifiers literal. Do not invent tests, issue numbers or performance improvements. Prefer the repository's convention over an assumed default.Illustrative input and expected result. This example is a verification guide, not a recorded model run.
Content reviewed .
Diff: - const offset = page * pageSize; + const offset = (page - 1) * pageSize; in src/api/orders/list.ts, plus a new test "returns the first page when page=1" Rationale: page numbers are 1-based in the public API, so page=1 skipped the first pageSize orders Convention: Conventional Commits, scopes api|web Issues: #881 Limits: none configured
A message such as "fix(api): return first page of orders for page=1" with a body explaining that the offset treated page as 0-based so page=1 skipped the first page, noting the added test by name without claiming it passed, and a footer "Closes #881". The subject uses the imperative mood and the literal identifier page. Illustrative expectation; the header format and the 50-character guideline were checked locally on this sample message (see report).
Ask questions or share concrete improvements.
No comments yet.
Sign in to join the discussion.
Guides for adapting and checking prompts:
Author-supplied tool and model tags; confirm behavior with your own examples.
IDEs
Models