AgentStack
SKILL verified MIT Self-run

Generate Pr Notes

skill-jamesyang124-agent-skills-generate-pr-notes · by jamesyang124

Automatically generate pull request notes based on git changes. Analyzes commits or branch diffs and creates comprehensive PR descriptions with a title, summary, changes, technical details, and breaking changes. Use when creating a PR, writing PR description, summarizing changes for review, or asked to generate PR notes.

No reviews yet
0 installs
2 views
0.0% view→install

Install

$ agentstack add skill-jamesyang124-agent-skills-generate-pr-notes

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Generate Pr Notes? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Generate PR Notes

Install this skill globally

Install once — available in all projects.

# Claude
mkdir -p ~/.claude/skills/generate-pr-notes
cp /.agent-settings/skills/tools/generate-pr-notes/SKILL.md \
   ~/.claude/skills/generate-pr-notes/SKILL.md
# Add to ~/.claude/CLAUDE.md: - **generate-pr-notes** (`~/.claude/skills/generate-pr-notes/SKILL.md`)

# Copilot
mkdir -p ~/.copilot/skills/generate-pr-notes
cp /.agent-settings/skills/tools/generate-pr-notes/SKILL.md \
   ~/.copilot/skills/generate-pr-notes/SKILL.md

# Gemini
mkdir -p ~/.gemini/skills/generate-pr-notes
cp /.agent-settings/skills/tools/generate-pr-notes/SKILL.md \
   ~/.gemini/skills/generate-pr-notes/SKILL.md

Dependencies

No external skills or MCPs required. Requires git to be available in the shell.


Automatically generate pull request notes based on git changes.

Description

This skill analyzes git changes and generates comprehensive pull request notes. It can work with either a single commit or all changes in the current branch compared to the main/master branch.

Usage

/generate-pr-notes

Instructions

Use the Task tool with subagent_type="general-purpose" to spawn an agent that will generate pull request notes. Pass the following instructions to the agent.

CRITICAL: After the agent completes, follow these steps IN ORDER:

  1. Output verbatim — display the agent's full response exactly as returned in the terminal. Do NOT summarize or modify it.
  1. Extract content — strip the outer `markdown opening fence and the closing ` fence from the agent output to get the raw markdown text only.
  1. Determine output path — before writing, run these two commands via Bash:
  • Repo name: basename $(git rev-parse --show-toplevel)
  • Short hash: git rev-parse --short HEAD

Construct the output path as /tmp/pr-notes--.md (e.g. /tmp/pr-notes-agent-skills-a1b2c3d.md). Use the Write tool to save the extracted markdown to that path.

  1. Copy to clipboard — detect the OS by running uname -s via Bash, then use the appropriate command (substitute the computed path from step 3):
  • macOS (Darwin): pbcopy
  • Linux (Linux): try xclip -selection clipboard ; if that fails, try xsel --clipboard --input
  • Windows / PowerShell (Windows_NT): try clip
  • If all commands fail or the platform is unrecognized, skip silently.
  1. Confirm to user — print exactly ONE line after the code block output (use the actual computed path from step 3):
  • If clipboard copy succeeded: PR notes saved to and copied to clipboard.
  • If clipboard copy failed or unavailable: PR notes saved to (clipboard unavailable — paste manually from the file).

You are a specialized agent for generating pull request notes. Follow these steps:

  1. Determine the scope of changes:
  • First, check the current git status and branch information
  • Interactively ask the user the following THREE questions (use whatever input mechanism your agent supports — interactive prompt, structured options, or chat):
  1. Which scope they prefer:
  • "Single commit" (the most recent commit only)
  • "Entire branch" (all changes compared to a base branch)
  1. Which base branch to compare against (ask upfront regardless of scope, it applies when "Entire branch" is selected):
  • "main"
  • "master"
  • "release"
  • "Other" — if selected, follow up with a free-text prompt asking the user to type in the branch name or commit hash manually
  1. Jira ticket ID (optional, free-text):
  • Ask: "Jira ticket ID? Type the ID (e.g. PROJ-1234) or type n to skip"
  • Treat any of the following as "no ticket": n, no, none, skip, n/a, -
  • If a real ticket ID is given, prefix the Title with it in square brackets: [PROJ-1234] Your title here
  • Otherwise omit any Jira reference entirely
  1. Retrieve the diff:
  • For single commit: Use git show HEAD or git diff HEAD~1 HEAD
  • For branch changes:
  • Use the base branch or commit hash selected by the user in step 1
  • First run git fetch origin to ensure remote refs are up to date
  • If the input is a branch name: Use git diff origin/...HEAD (with three dots for the merge base), substituting the user's chosen branch
  • If the input looks like a commit hash: Use git diff ...HEAD
  • Always prefer the remote branch (e.g. origin/main, origin/master, origin/release) as the base over local branches
  • If the remote ref does not exist, fall back to the local branch and warn the user
  1. Analyze the changes:
  • Review all modified files
  • Identify the nature of changes (new features, bug fixes, refactoring, etc.)
  • Look for patterns and group related changes together
  1. Generate comprehensive PR notes with the following sections:

## Title

  • Provide a single short sentence that describes the overall change
  • Maximum 128 characters (including any Jira prefix) — be concise and direct
  • If a Jira ticket ID was provided, prefix the title with it in square brackets: [TICKET-ID] Your title here
  • If no Jira ticket ID was provided, omit any prefix

## Summary

  • Provide a concise overview of what changed and why (2-4 sentences)
  • Focus on the "why" and business value, not just the "what"

## Changes

  • List key changes organized by category:
  • ✨ New Features (maximum 5 items - prioritize the most impactful features)
  • 🐛 Bug Fixes
  • 🔧 Configuration
  • Use only categories that are relevant
  • Be specific but concise for each item
  • Avoid redundant information that's already mentioned in other sections

## Technical Details

  • Highlight important implementation details (maximum 5 items - prioritize the most critical technical updates)
  • Note any architectural changes or patterns introduced
  • Mention dependencies added or updated
  • Do not repeat information already covered in the Changes section

## Breaking Changes (if applicable)

  • Clearly call out any breaking changes
  • Provide migration guidance if needed
  1. Format the output - CRITICAL FORMATTING REQUIREMENTS:

WORD COUNT LIMIT: The entire output must NOT exceed 3000 words. Keep the content concise and focused.

AVOID REDUNDANCY: Do not repeat information across sections. Each detail should appear only once in the most appropriate section.

YOUR ENTIRE RESPONSE MUST BE WRAPPED IN A MARKDOWN CODE BLOCK:

Output this exact structure:

``` ``markdown ## Title [TICKET-123] Single sentence describing the PR ← include Jira prefix if provided, omit entirely if not

## Summary [2-4 sentences about what changed and why]

## Changes

### ✨ New Features

  • [item 1]
  • [item 2]
  • [maximum 5 items - only list the most important features]

### 🐛 Bug Fixes

  • [item]

### 🔧 Configuration

  • [item]

## Technical Details

  • [item 1]
  • [item 2]
  • [maximum 5 items - focus on critical technical updates, no repetition from Changes section]

## Breaking Changes [if applicable, otherwise omit this section entirely] `` ```

ABSOLUTE RULES - NO EXCEPTIONS:

  • First line MUST be exactly: ```markdown
  • Second line MUST be exactly: ## Title
  • Last line MUST be exactly: ````
  • TITLE LENGTH: The title line must NOT exceed 128 characters — use a short, direct sentence
  • STOP WRITING immediately after the closing ```
  • Use ## for main sections (Title, Summary, Changes, Technical Details, Breaking Changes)
  • Use ### ONLY for change categories under Changes section
  • New Features section must have AT MOST 5 items
  • Technical Details section must have AT MOST 5 items
  • Each piece of information should appear in only ONE section - no redundancy
  • LINE LENGTH: Every line must NOT exceed 250 characters. If a sentence is too long, split it into two separate bullet points or shorten it.

FORBIDDEN - NEVER INCLUDE THESE:

  • Any text before ```markdown
  • Any text after the closing ```
  • Separators like --- or === anywhere in the markdown content
  • Headers like "Pull Request Notes" or "PR Description"
  • "Files Changed:" sections or file statistics
  • Phrases like "Here are the notes:", "Based on...", "Perfect!", etc.
  • Agent IDs or metadata

CRITICAL: Your response must be ONLY the markdown code block. The user should be able to copy everything between (and including) the ```markdown and closing ``` for use in their PR description.

  1. OUTPUT TO TERMINAL - MANDATORY:
  • After you generate the PR notes, they MUST be displayed in the terminal
  • The calling assistant will output your response verbatim to the user, then also write the content to a /tmp/pr-notes--.md file and attempt to copy it to the clipboard
  • Do NOT add any additional commentary after generating the notes

Important Notes

  • Always read the actual diff before generating notes - never make assumptions
  • If the diff is very large, summarize thoughtfully rather than listing every change
  • MANDATORY: The total output must not exceed 3000 words - be concise and prioritize the most important information
  • MANDATORY: New Features section must contain at most 5 items - focus on the most impactful features
  • MANDATORY: Technical Details section must contain at most 5 items - focus on the most critical technical updates
  • MANDATORY: Avoid redundant information - each detail should appear in only ONE section
  • MANDATORY: Every line must NOT exceed 250 characters — split long sentences into separate bullet points or shorten them
  • DO NOT include a Testing section in the output
  • Tailor the tone and detail level to the size and complexity of the changes
  • If there are no changes to analyze, inform the user clearly
  • Output must be clean markdown with no wrapper text for easy copy/paste
  • MANDATORY: The generated notes MUST be displayed in the terminal output for the user to copy/paste directly

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.