Skip to content
AI Dev Toolkit.
Esc
  • Loading…

Prompt template · Git and docs

Release notes prompt from commit history

A good release notes prompt gives the model the commits or merged pull requests since the last tag and names who reads the notes. This template groups changes by what users notice, puts breaking changes first with the exact upgrade step, drops internal work such as CI and refactors, and lists unclear entries instead of guessing.

Free to copy, or open it in the prompt builder to fill the variables and get the exact API request.

224 tokens unfilled · 333 with the example below · o200k_base (GPT-4o and later)

Template

The release notes prompt template (copy it)

Paste this into a chat window and replace each {{variable}}, or open it in the prompt builder to fill them in a form. Sections are marked with XML tags, which every major model reads well.

Prompt (one message, plain text)
You write release notes for {{audience}}. You translate developer changes into what users will notice.

<context>
Commits or merged pull requests since the last release:
<changes>
{{changes}}
</changes>
</context>

<constraints>
- Group changes by what users notice: breaking changes, new features, improvements, fixes.
- Put breaking changes first, each with the exact upgrade step.
- Leave out internal changes users can’t see: refactors, CI, test-only and dependency bumps without a visible effect.
- Describe each change in terms of user impact, not implementation. Keep PR or issue numbers in brackets.
- Don’t invent features or details that aren’t in the change list. If an entry is unclear, leave it out and list it at the end under “Unclear”.
</constraints>

<output_format>
Markdown: a heading with the version, then one H3 per non-empty group, one bullet per change. End with an “Unclear” list only if there were unclear entries.
</output_format>

<task>
Write the release notes for version {{version}}.
</task>
For an API call: system prompt and user message

With a system prompt, the role, constraints and output format stay fixed across calls (and can be cached), while the context and task go in the user message.

System prompt
You write release notes for {{audience}}. You translate developer changes into what users will notice.

<constraints>
- Group changes by what users notice: breaking changes, new features, improvements, fixes.
- Put breaking changes first, each with the exact upgrade step.
- Leave out internal changes users can’t see: refactors, CI, test-only and dependency bumps without a visible effect.
- Describe each change in terms of user impact, not implementation. Keep PR or issue numbers in brackets.
- Don’t invent features or details that aren’t in the change list. If an entry is unclear, leave it out and list it at the end under “Unclear”.
</constraints>

<output_format>
Markdown: a heading with the version, then one H3 per non-empty group, one bullet per change. End with an “Unclear” list only if there were unclear entries.
</output_format>
User message
<context>
Commits or merged pull requests since the last release:
<changes>
{{changes}}
</changes>
</context>

<task>
Write the release notes for version {{version}}.
</task>

Variables

What do the variables mean?

{{audience}}
Who reads the notes, such as “developers who use our Python SDK” or “non-technical customers of a web app”.
{{changes}}
The output of git log --oneline v1.4.0..HEAD, or the merged PR titles with numbers. PR titles are usually better input than raw commit subjects.
{{version}}
The version being released, such as 1.5.0.

Use

When should I use this release notes prompt?

Use it at release time to turn a messy commit log into notes people will read. It works best with descriptive PR titles or conventional commits, and with a human pass at the end to add context the commits don’t carry.

If your commit history is mostly “wip” and “fix”, the model has nothing to work with, and the “Unclear” list will be long. That is a useful signal in itself, and the commit message template helps for next time.

Structure

Why is the prompt structured this way?

Naming the audience changes everything about the output. SDK users want to know about renamed parameters; app users want to know what looks different. The same change list produces very different, and correctly different, notes.

Putting breaking changes first with an upgrade step reflects what matters most to someone upgrading. Filtering out invisible changes keeps the notes short, and the “Unclear” list gives the model somewhere honest to put entries it can’t interpret instead of guessing a feature description.

The ban on invented details is important here because the input is terse. A commit called “add export” invites the model to describe export formats and options that may not exist.

Example

Example: a filled-in release notes prompt

{{audience}}
developers who use our TypeScript SDK
{{changes}}
a1f3c2e feat!: rename client.search() option "limit" to "pageSize" (#311)
b7d9e01 feat: add client.exportCsv() (#305)
c33a8f4 fix: retry on 429 using the Retry-After header (#309)
d0e1a77 ci: cache node_modules in GitHub Actions
e5b2f90 refactor: split http.ts into transport and retry modules
f81c6d3 fix: typo
{{version}}
2.0.0

What to look for. Expect the renamed option under breaking changes with a before-and-after snippet, the export and the 429 fix as user-facing items, and the CI and refactor commits left out. “fix: typo” should land in the Unclear list, because it doesn’t say where the typo was.

The complete filled-in prompt (333 tokens)
Filled-in prompt
You write release notes for developers who use our TypeScript SDK. You translate developer changes into what users will notice.

<context>
Commits or merged pull requests since the last release:
<changes>
a1f3c2e feat!: rename client.search() option "limit" to "pageSize" (#311)
b7d9e01 feat: add client.exportCsv() (#305)
c33a8f4 fix: retry on 429 using the Retry-After header (#309)
d0e1a77 ci: cache node_modules in GitHub Actions
e5b2f90 refactor: split http.ts into transport and retry modules
f81c6d3 fix: typo
</changes>
</context>

<constraints>
- Group changes by what users notice: breaking changes, new features, improvements, fixes.
- Put breaking changes first, each with the exact upgrade step.
- Leave out internal changes users can’t see: refactors, CI, test-only and dependency bumps without a visible effect.
- Describe each change in terms of user impact, not implementation. Keep PR or issue numbers in brackets.
- Don’t invent features or details that aren’t in the change list. If an entry is unclear, leave it out and list it at the end under “Unclear”.
</constraints>

<output_format>
Markdown: a heading with the version, then one H3 per non-empty group, one bullet per change. End with an “Unclear” list only if there were unclear entries.
</output_format>

<task>
Write the release notes for version 2.0.0.
</task>

Models

Does it work the same in ChatGPT, Claude and Gemini?

Yes, the structure works in all three: tagged sections that keep your material apart from the instructions, and an explicit output format. The tips below cover where the providers’ own guides differ for this release notes prompt.

  • All models

    Feed PR titles and descriptions rather than raw commits where you can. More context per change means fewer entries in the Unclear list.

  • Gemini

    If you publish notes every release, add a previous release’s notes as a few-shot example. Google’s guide recommends examples for Gemini and warns that their formatting should be consistent, so use one that matches your current style exactly.

  • Claude

    Anthropic recommends telling Claude what to do rather than what not to do. If the output is too long, “one line per change” works better than “don’t be verbose”.

FAQ

Questions people ask

How do I get the commit list between two releases?

Use a range in git log. git log --oneline v1.4.0..HEAD lists every commit after the v1.4.0 tag, and v1.4.0..v1.5.0 lists the commits between two tags. Merged pull request titles are usually better input than raw commit subjects, so paste those with their numbers when your host lets you list them.

Can ChatGPT write release notes from commits?

Yes, from a good change list. It turns descriptive pull request titles or conventional commits into notes grouped by impact, and the template forbids invented features. If your history is mostly “wip” and “fix”, the model has nothing to work with and the Unclear list will be long, which tells you to write better commit messages next time.

How should breaking changes be written?

First, each with the exact upgrade step. Readers who are upgrading need to know what breaks and what to change, so every breaking change gets its own bullet and, for an SDK, a before-and-after snippet. In the worked example, the option renamed from limit to pageSize belongs under breaking changes with the new call.

Related

Edited the template? Compare your version with this one in the prompt diff, and count it for your model with the token counter. Browse all 29 prompt templates.

Keep exploring