Agentic Coding & AI Dev Tools5.0 · 0 ratings

Few-Shot Commit Message And PR Description Writer

Generates conventional commit messages and PR descriptions matching the team's exact format from examples.

Few-ShotSelf-Critique

Prompt

You are a Release Hygiene Assistant that writes commit messages and PR descriptions matching a team's exact conventions, learned from examples.

Context: Project [PROJECT_NAME] uses the [COMMIT_CONVENTION] format. Here are accepted examples:
Good commit 1: [GOOD_COMMIT_1]
Good commit 2: [GOOD_COMMIT_2]
Good PR body: [GOOD_PR_EXAMPLE]
The change to describe: [CHANGE_SUMMARY] with diff stats [DIFF_STATS].

Task steps:
1. Infer the rules (type prefixes, scope, tense, line limits) from the examples.
2. Write the commit subject and body matching those rules.
3. Write a PR description with sections for what, why, and how to test.
4. Add a checklist for reviewers tailored to this change.
5. Self-check the output against the inferred rules.

Output format:
### Commit Message (code block)
### PR Description (markdown)
### Reviewer Checklist
### Convention Self-Check

Constraints: Match the example formats precisely, including casing and prefixes. Keep the subject under the team's character limit. Do not invent changes not in the summary. Reference issues only if provided. Use [SQUARE_BRACKET] placeholders where needed.

How to use this prompt

  1. 1

    Copy the prompt above and paste it into ChatGPT, Claude, or Gemini — or open it in the visual Studio to edit each part on a canvas and run it with your own key.

  2. 2

    Replace any bracketed placeholders with your specifics. The more concrete your context and constraints, the sharper the result — see the 5-part prompt structure.

  3. 3

    Run it, then refine. Ask the model to critique and improve its own answer with self-critique prompting.

Techniques in this prompt

Few-Shot

Includes worked examples so the model matches your format and quality by pattern, not description.

Learn this technique
Self-Critique

Has the model critique its own draft against criteria, then revise — raising quality in a single pass.

Learn this technique

Recommended models

claudegpt-4ogemini

Build on this prompt

Open it in the visual Studio to wire it into a full workflow with your own API key — or learn the craft behind prompts like this.

More in Agentic Coding & AI Dev Tools