Skip to content
describing-PRs logo

describing-PRs

Generate a PR description for the current branch. Writes Markdown to .git/magit/posts/new-pullreq for use with magit-forge.

SKILL.md

Full skill instructions

PR Description Generator

Generate a well-structured PR description for the current feature branch.

When to Use This Skill

Use this skill when:

  • Preparing to create a pull request
  • Needing a PR description for the current branch
  • Integrating with magit-forge for PR creation

Process

  1. Determine the base branch

    Run the helper script to find the base branch:

    BASE=$(~/​.claude/​skills/​describing-PRs/​scripts/​find-merge-base.py)
    

    The script outputs a branch name (e.g., origin/​main) that represents the base branch for comparison. It handles cases where you branched from another feature branch, not just main/​master.

    Options:

    • --fetch: Fetch latest remote refs before determining base branch
    • --debug: Show how the base branch is determined

    Strategy (implemented in the script):

    • Try @{upstream} first (the current branch's configured upstream)
    • Try origin/​HEAD (the remote's default branch)
    • Fall back to common defaults: origin/​main, origin/​master, origin/​develop
    • If neither works, find the closest remote branch by commit distance
  2. Gather context about the branch

    Using the base branch found above:

    git branch --show-current
    git log --oneline <base-branch>..HEAD
    git diff --no-ext-diff <base-branch>..HEAD --stat
    git diff --no-ext-diff <base-branch>..HEAD
    
  3. Analyze the changes

    • Identify the purpose of the changes
    • Group related commits by theme
    • Note any breaking changes or important considerations
  4. Generate the PR description

    Write a Markdown file with:

    • Title: A concise summary (will be used as PR title)
    • Summary: 2-3 sentences explaining the overall purpose
    • Changes: Bullet points of key modifications
    • Testing: How the changes were tested (if applicable)
    • Notes: Any reviewer notes, breaking changes, or follow-up items
  5. Write to the output file

    Create the directory and write the description:

    mkdir -p .git/​magit/​posts
    

    Write Markdown content to .git/​magit/​posts/​new-pullreq

Output Format

The generated file should follow this structure:

# <PR Title>

## Summary

<Brief explanation of what this PR accomplishes and why>

## Changes

- <Key change 1>
- <Key change 2>
- ...

## Testing

<How changes were tested, or "N/​A" if not applicable>

## Notes

<Any additional context for reviewers, breaking changes, or follow-up work>

Formatting Guidelines

  • Wrap all symbols, variables, function names, file paths, and code references in backticks (e.g., myFunction, CONFIG_VALUE, src/​utils.ts)
  • Use fenced code blocks for multi-line code snippets
  • Keep bullet points concise and scannable

Important Notes

  • The file path .git/​magit/​posts/​new-pullreq is used by magit-forge
  • Always overwrite the existing file if present
  • Keep the description concise but informative
  • Focus on the "why" more than the "what" (the diff shows the "what")

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View