一键导入
v1-pr-description
Use when writing or updating a GitHub PR title or description. Triggers on "write PR description", "update PR body", or "PR title".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when writing or updating a GitHub PR title or description. Triggers on "write PR description", "update PR body", or "PR title".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when explicitly choosing which v1tamins skill fits a task. Triggers on "which v1 skill", "v1 menu", or "/v1-menu".
Use when the user explicitly requests phone-a-friend, a counterpart review, steelman, or peer consult. Triggers on /v1-phone-a-friend or $v1-phone-a-friend only.
Use when explicitly convening several peer agents to review a PR or branch. Triggers on "review board", "multi-agent review", or "fan out a review".
Use when refining working code through a quality pass, deslop, or hindsight rewrite. Triggers on "make this diff simpler", "reduce complexity", or "deslop".
Use when diagnosing a throughput bottleneck in a process, funnel, queue, or WIP system. Triggers on "where is this process stuck?", "find the bottleneck", or "too much WIP".
Use when creating a self-contained HTML page, report, or interactive explainer. Triggers on "one-page dashboard", "shareable page", or "interactive report".
| name | v1-pr-description |
| description | Use when writing or updating a GitHub PR title or description. Triggers on "write PR description", "update PR body", or "PR title". |
| allowed-tools | ["Bash","Read","Grep"] |
Write or update a grounded pull request title and description from the actual PR diff, current PR metadata, repository guidance, and user constraints.
Typical invocations:
/v1-pr-description <PR_URL_or_NUMBER>v1-pr-description from the skills menu or use $v1-pr-description <PR_URL_or_NUMBER>Examples:
/v1-pr-description https://github.com/your-org/your-repo/pull/123
/v1-pr-description 123
In Codex, the slash examples above map directly to $v1-pr-description ....
Use the PR itself as the source of truth for base/head instead of assuming main:
gh pr view {pr} --json number,url,title,body,baseRefName,headRefName,headRefOid,files,commits
Optional helper:
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
RESOLVER=""
for candidate in \
"$REPO_ROOT/plugins/v1tamins/scripts/resolve-skill-root.sh" \
"${CLAUDE_PLUGIN_ROOT:-}/scripts/resolve-skill-root.sh" \
"$HOME/.claude/skills/v1-pr-description/../../scripts/resolve-skill-root.sh" \
"$HOME/.codex/skills/v1-pr-description/../../scripts/resolve-skill-root.sh" \
"$HOME/.claude/plugins/cache"/*/v1tamins/*/scripts/resolve-skill-root.sh \
"$HOME/.codex/plugins/cache/v1tamins/v1tamins"/*/scripts/resolve-skill-root.sh; do
[ -x "$candidate" ] && RESOLVER="$candidate" && break
done
if [ -z "${RESOLVER:-}" ]; then
echo "ERROR: Could not find resolve-skill-root.sh" >&2
exit 1
fi
SKILL_ROOT="$("$RESOLVER" v1-pr-description generate.sh)"
"$SKILL_ROOT/generate.sh" {PR_URL_or_NUMBER}
Use the helper to collect metadata, changed files, commits, and merge-base diff context. Treat its output as evidence, not as the finished PR description.
Fetch enough refs to compare against the actual base branch:
git fetch origin {baseRefName}
merge_base="$(git merge-base origin/{baseRefName} HEAD)"
git diff --stat "$merge_base"...HEAD
git diff --name-only "$merge_base"...HEAD
git log --oneline "$merge_base"..HEAD
If the current checkout does not match the PR head SHA, say so and either check out the PR branch or base the description on GitHub metadata plus fetched refs. Do not write a description from an unknown local branch.
Before drafting, build a compact ledger:
| Source | Evidence | Use |
|---|---|---|
| PR metadata | title, body, base/head, files | preserve existing context and detect stale claims |
| Diff | changed files and meaningful hunks | describe actual behavior changes |
| Commits | commit subjects and range | identify intent and follow-up fixes |
| Validation | test commands in commits, comments, checks, or user notes | report only verified validation |
| Repo guidance | AGENTS.md, CLAUDE.md, .github/pull_request_template*, .github/CODEOWNERS, relevant workflows | match local expectations |
| User constraints | required phrases, prohibited terms, title/body preferences | preserve exactly |
Read only the relevant files. Do not crawl all of .github/; inspect files that explain PR templates, ownership, or checks touched by the PR.
If the existing PR body has required footer text, checklist state, reviewer notes, linked tickets, or user-requested wording, preserve it unless the user explicitly asks to replace it.
Title:
Body:
## Summary
- ...
## Changes
- ...
## Validation
- ...
## Risk / Rollback
- ...
## Notes for Reviewers
- ...
Use bullets over prose when the PR has multiple concrete changes. Keep the description grounded in files, behavior, validation, and reviewer impact.
Add a Mermaid diagram only when it materially clarifies a flow, architecture change, state transition, migration path, or review sequence. Keep diagrams small and maintainable. Do not add a diagram for a simple list of changes.
flowchart LR
"Old path" --> "Changed component"
"Changed component" --> "New behavior"
Before editing GitHub:
If the implementation no longer matches the existing PR description, update the stale description rather than preserving inaccurate text.
Use gh pr edit when the user asked to update GitHub:
gh pr edit {pr} --title "..." --body-file /path/to/body.md
If gh is unavailable or unauthenticated, do not claim the PR was updated. Return the proposed title/body and the exact blocker.
If the user only asked for a draft, return the proposed title/body without running gh pr edit.
Report: