pr-description
Generate a pull request description based on the current branch's changes, using the project's PR template format.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Generate a pull request description based on the current branch's changes, using the project's PR template format.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | pr-description |
| description | Generate a pull request description based on the current branch's changes, using the project's PR template format. |
| user-invocable | true |
| argument-hint | ["base-branch"] |
| allowed-tools | Bash(git *), Bash(gh *), Read, Write, Glob, Grep |
Generate a pull request description for the current branch using the project's .github/pull_request_template.md format.
When invoked, follow these steps in order:
development.If the user provided any additional context, instructions, or notes alongside the command invocation, respect and prioritize them. User input takes precedence over auto-generated content. For example:
Store the user's input and weave it into the final output naturally.
Read the project's PR template file to get the latest format:
Read file: .github/pull_request_template.md
Use the exact sections and structure from this file as the output format. The template may have been updated — always follow what the file says, not a cached copy.
Run these commands to understand the full scope of changes:
# Current branch name
git rev-parse --abbrev-ref HEAD
# All commits on this branch since it diverged from base
git log <base>...HEAD --pretty=format:"%h %s" --reverse
# Full diff stat
git diff <base>...HEAD --stat
# Full diff for analysis (use --no-color)
git diff <base>...HEAD --no-color
Read all the output carefully. Understand every commit and every changed file.
Search your auto-memory directory (if available) for notes related to this branch's work. Use keywords from the branch name, changed file names, or feature area to search.
Look for:
If memory contains context that is directly relevant to this PR's changes and adds information not already visible in the diff (e.g., root cause analysis, rejected approaches, non-obvious design decisions), present it to the user:
"I found these notes in memory that may be relevant to this PR. Should I include any of them?"
- [brief summary of each relevant note]
Do NOT ask about notes that simply describe the same changes the diff already shows. Only surface genuinely additive context (the "why behind the why").
Before writing the final file, present a brief summary to the user for review:
Then ask: "Does this look right? Any changes before I generate the full description?"
Wait for the user's response. If they provide revisions, incorporate them. If they approve, proceed to Step 7.
Fill in every section from the PR template (read in Step 3) with real content:
[x] the ones that apply, delete the rest.When the PR is a bug fix, prepend a ## Problem block and a ### Root cause trace table before the standard template sections. Use this format:
## Problem
[1–3 sentences describing the symptom. Mention the specific platform, hook, service, or Vue component involved. Bold the key wrong behavior.]
### Root cause trace
| Step | What happens | Problem? |
|------|-------------|---------|
| [component / entry point] | [what it does — use inline code for function names, hook names, REST routes] | ✅ Correct / ❌ Bug / [outcome description] |
| … | … | … |
[1–2 sentences closing the trace: why the existing code or missing guard wasn't enough to prevent this.]
Guidelines for the table:
TiktokFeed::refreshAccessToken, custom_feed_for_tiktok/tiktok_feeds_limit, ElementorWidget::render)✅ Correct, ❌ Bug, or a short outcome phrase when neither applies (e.g., Cache expires but stale data returned)## Anything the reviewer should know? — always for the bot reviewer
This section is ALWAYS present and ALWAYS written for an automated code review bot, not a human. It should contain information that helps the bot focus its analysis and avoid false positives. Include:
RemoteAuth only exists in core ≥ 4.3.0, guarded with class_exists()", "cache is always keyed by open_id")boot/app.php")Do NOT include: setup instructions, how-to-test steps, screenshots, or human workflow context. Those belong in the human sections below.
## How to test — human reviewer, include only when meaningful
Keep this section when the PR introduces a user-visible behavior change, new feature, UI change, or bug fix that requires verification. Write concrete, specific steps:
Omit this section entirely for refactors, config-only changes, or changes where the diff is self-evidently correct.
## Human reviewer notes — optional, add only when needed
Add this section (after ## How to test) when there is context a human reviewer needs that a bot wouldn't act on:
Omit entirely if there's nothing substantive to add.
Write the final PR description to dev-works/pr-description.md (a findable, in-project scratch location — not /tmp, which is ephemeral and hidden on macOS).
Store the exact PR title at the very top of the file as an HTML comment, so the title is preserved verbatim for branch creation and gh pr create, while staying invisible when the body is pasted into GitHub:
<!-- PR TITLE: <the exact one-line title from Step 6> -->
## What does this PR do and why?
...
Use the exact title the user approved in Step 6 — do not paraphrase or re-word it. The text after the comment is the PR body, ready to copy-paste into GitHub as-is.
Then present the path as a clickable link and output: PR description saved to [dev-works/pr-description.md](dev-works/pr-description.md)
Note:
dev-works/pr-description.mdis intentionally gitignored (see.gitignore). It is a local scratch artifact — never commit it, and nevergit add -fit. Its contents are meant to be copied into the GitHub PR body.
First check the current branch with git rev-parse --abbrev-ref HEAD, then decide:
development/master): a branch already exists — skip branch creation entirely. Do nothing in git. The skill's only output for this run is the generated title + description (already written in Step 7). Report: Already on feature branch <name> — generated title + description only, no branch created.development or master): create a branch from the exact PR title so the working changes live on a feature branch ready to push:
"Add plain-PHP mb_* fallbacks for servers missing mbstring" → add-plain-php-mb-fallbacks-for-servers-missing-mbst.git checkout -b <derived-name>. Uncommitted working changes carry over automatically — do not stash or commit them here.Branch ready: <branch-name>.Only create/switch the branch in this step — committing happens in Step 9. Do not push.
Commit the PR's changes using the exact title and description from dev-works/pr-description.md — never regenerate, paraphrase, or write a separate commit message. The commit subject and body must come verbatim from the file written in Step 7.
<!-- PR TITLE: ... --> comment (the text after PR TITLE:), with the <!-- ... --> wrapper stripped.## What does this PR do and why? section through the end, including the checked categories and all sections).Co-Authored-By: trailer required by the repo.git commit -F <tempfile> (heredocs mangle the markdown). Remove the temp file afterward..claude/ directory, or dev-works/pr-description.md (gitignored). Stage explicitly by path — do not git add -A.git commit -F <tempfile>. Do not push.Committed <short-sha>: <title>.If there are no stageable changes (everything already committed), skip the commit and report that instead — do not create an empty commit.
Silently fix before outputting:
development, not master.app/Services/Platforms/Feeds/Tiktok/TiktokFeed.php:290)..claude/ directory files (local tooling, not relevant to reviewers).## Anything the reviewer should know? is always bot-focused. Never put human workflow context here. Never omit this section.<!-- PR TITLE: ... --> comment in the file, and derive the branch name from that same title — title, file, and branch must stay consistent.dev-works/pr-description.md. It is deliberately gitignored and kept local.development/master). On an existing feature branch, report it and leave it untouched — never re-branch off a feature branch.<!-- PR TITLE: ... --> text; the commit body is the PR description body verbatim. Use git commit -F <tempfile>, never an inline regenerated summary.