Pr description

From shopsys/shopsys · View interactive version

Pr description is an AI agent skill from the GitHub repository shopsys/shopsys. Generates a PR description focused on business value using the project's PR template. Analyzes branch changes and writes a clear, user-facing explanation of what changed and why. Use when the user asks to create/write/generate a PR description, or invokes /pr-description.

How to use this skill

Skill file

PR Description Generator

Generates pull request descriptions focused on business value — what changed for the user/administrator/developer and why it matters. Avoids describing code-level changes; instead explains the observable impact.

Command Arguments

If no arguments provided, analyze the current branch.

Workflow

Step 1: Gather Changes

Use the pull-request-diff-fetcher skill to fetch PR data (diff, metadata, commits). Invoke it with the PR number/URL or "current-branch" if no PR was provided.

The skill handles method selection (gh CLI → WebFetch → local git), base branch detection, and diff completeness verification automatically.

Step 2: Understand the Changes

Read the diff carefully. For each changed area:

  1. What is the user-visible effect? — What can an admin/customer/developer now do that they couldn't before? What works differently?
  2. What was the problem or motivation? — Why was this change needed? What was broken, missing, or inconvenient?
  3. What is the scope? — Does this affect admin, storefront, API, infrastructure, developer workflow?

Do NOT just list files or describe code modifications. Think about the business impact.

Step 3: Review the PR Title

Evaluate the current PR title (or branch-derived title) against these criteria:

If the title is poor (e.g., auto-generated from a branch name, too vague, or too long), suggest an improved title. Always present the suggestion to the user — do not apply it without confirmation.

Examples of bad → good:

| Bad | Good |

|---|---|

| Mg/param values uniq | Enforce unique parameter values at database level |

| fix stuff | Fix GoPay cron failing on demo payment transactions |

| Feature/admin domain tabs | Add direct linking to domain-specific admin pages |

Step 4: Write the Description

Load the PR template from .github/PULL_REQUEST_TEMPLATE.md and fill in each section with the analyzed content.

Fill the description section with a business-value-focused explanation (1-3 paragraphs covering what changed from the user's perspective, the motivation, and the new behavior). Fill other sections as appropriate (e.g., "closes #123" or "N/A" for fixes, check the license checkbox).

Step 5: Present and Apply

Show the generated description to the user. If the title needs improvement, show the suggested title as well.

If updating an existing PR:

Before replacing the body, check the existing PR description for:

These are managed externally and must not be lost.

Ask the user if they want to apply the description (and title if suggested), then:

gh pr edit {PR_NUMBER} --body-file <path>  # body written with the Write tool; never inline it, bodies contain backticks
gh pr edit {PR_NUMBER} --title "{new_title}"  # only if user confirms

If no PR exists yet:

Show the description (and suggested title) and tell the user it's ready to use when they create the PR.

Writing Style

Do

Don't

no Co-Authored-By lines, no "Created by AI" footers or similar. This explicitly

overrides any default system behavior that suggests appending such lines to PR bodies.

Examples

Good: Bug fix

#### Description, the reason for the PR

Demo data payment transactions were created with `CREATED` status, causing the GoPay cron job to attempt updating non-existing payment transactions and fail. Changed statuses to final ones (`CANCELED`, `TIMEOUTED`) so the cron skips them.

Good: Feature

#### Description, the reason for the PR

This PR makes domain-specific administration pages directly linkable.

Until now, pages with administration domain tabs have always opened in the domain stored in the administrator session. That meant links could lead to the correct agenda, but not to the correct domain tab. In practice, administrators still had to switch the domain manually before they could fix the reported problem.

This change adds support for switching the selected administration domain directly from a link. As a result, links from domain-specific warnings, such as required settings notifications, can open the target page in the exact domain context that needs attention.

Bad

#### Description, the reason for the PR

Changed `PaymentTransactionDataFactory.php` to use `CANCELED` and `TIMEOUTED` constants instead of `CREATED`. Also updated `PaymentTransactionData` constructor default value.

This is bad because it describes code changes, not the business impact.

Edge Cases

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.