Few-Shot Commit Message And PR Description Writer
Generates conventional commit messages and PR descriptions matching the team's exact format from examples.
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
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
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
Run it, then refine. Ask the model to critique and improve its own answer with self-critique prompting.
Techniques in this prompt
Includes worked examples so the model matches your format and quality by pattern, not description.
Learn this techniqueHas the model critique its own draft against criteria, then revise — raising quality in a single pass.
Learn this techniqueRecommended models
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
Autonomous Coding Agent Task Scoping Brief
Turns a vague feature request into a bounded, verifiable task brief an autonomous coding agent can execute safely.
ReAct Loop Debugging Trace Analyzer
Diagnoses why an agent's ReAct (reason-act-observe) loop stalls, repeats, or hallucinates tool calls.
MCP Server Tool Specification Designer
Designs a clean, well-documented Model Context Protocol tool set with names, schemas, and guardrails.
Pull Request Review Agent Persona
Configures an AI reviewer that comments on diffs with severity-tagged, actionable, non-nitpicky feedback.