Skip to main content

update-pr-description

Use when user says 'update PR description', 'refresh PR description', 'fix PR description', 'rewrite PR body', 'update my PR', or types /update-pr-description

설치로 이동

소스 정보

저장소
ROCm/rocprofiler-systems-skills
최근 소스 활동
2026년 5월 25일 12:04
감지된 SKILL.md 언어
영어
스타
4
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
update-pr-description
description
Use when user says 'update PR description', 'refresh PR description', 'fix PR description', 'rewrite PR body', 'update my PR', or types /update-pr-description
# Update PR Description Read the current PR description and branch changes, then produce an updated description that accurately reflects what is on the branch. Always edit in-place — never recreate the PR. ## Process ### Phase 0: Verify GitHub CLI ```bash gh auth status ``` ### Phase 1: Read Current PR State ```bash gh pr view --json number,title,body,baseRefName,headRefName ``` Extract: PR number, existing body (may be empty), base branch, head branch. **NEVER hardcode `main` as base branch.** Always read `baseRefName` from the PR. ### Phase 2: Analyze Branch Changes ```bash BASE=$(gh pr view --json baseRefName -q .baseRefName) HEAD=$(gh pr view --json headRefName -q .headRefName) git log --oneline "$BASE".."$HEAD" # Commit history → Motivation git diff --stat "$BASE".."$HEAD" # File stats → Technical Details git diff --name-only "$BASE".."$HEAD" # File list → Test Plan ``` ### Phase 3: Decide How to Handle Existing Description | Situation | Action | |-----------|--------| | Body is empty or placeholder | Generate fresh from branch analysis | | Body has real content | Preserve user-written Motivation, update Technical Details and Test Plan from diff | Do NOT discard user-written Motivation — it captures domain context the code cannot express. ### Phase 4: Draft the Description ```markdown ## Motivation <Why this change — problem being solved, user need, or context> ## Technical Details <Key implementation decisions, trade-offs, architecture changes> ## Test Plan - [ ] <how this was tested> - [ ] <edge cases verified> ``` Reference actual commits, files, and decisions — never use generic filler text. **Do NOT wrap prose at 80 characters.** Write each paragraph as a single continuous line. Hard line breaks inside sentences make the rendered GitHub description look broken. Only break lines at natural paragraph boundaries (blank line between sections). ### Phase 5: Show Before → After, Then Apply **ALWAYS show the diff before applying.** Never silently overwrite. ``` Current description: ────────────────────────────────────────────── <current body, or "(empty)" if blank> ────────────────────────────────────────────── Proposed description: ────────────────────────────────────────────── <new body> ────────────────────────────────────────────── ``` Use `AskUserQuestion` with a Yes/No question before applying: ``` Question: "Apply this description to PR #<NUMBER>?" Options: Yes | No ``` Only proceed if the user selects **Yes**. If **No**, ask what to change and re-draft. Apply using the GitHub API directly: ```bash gh api --method PATCH repos/{owner}/{repo}/pulls/<NUMBER> \ --field body='## Motivation ... ## Technical Details ... ## Test Plan - [ ] ...' ``` Resolve `{owner}/{repo}` with: ```bash gh repo view --json nameWithOwner -q .nameWithOwner ``` To also update the title, add `--field title='...'` to the same call. Verify the update: ```bash gh pr view <NUMBER> ``` ## Red Flags — Stop and Correct - About to call `gh pr create` — that recreates the PR. Use `gh api --method PATCH`. - Using `main` as the base branch without reading `baseRefName` from the PR. - Overwriting the body without reading and displaying the current content first. - Applying changes without showing before/after and using `AskUserQuestion` Yes/No. ## Common Mistakes | Mistake | Fix | |---------|-----| | Using `gh pr edit` or `gh pr create` | Use `gh api --method PATCH repos/{owner}/{repo}/pulls/<NUMBER>` | | Hardcoding base branch as `main` | Read `baseRefName` from `gh pr view` | | Overwriting user-written motivation | Read existing body first, preserve domain context | | Skipping confirmation | Show before/after diff, then use `AskUserQuestion` Yes/No | | Generic description | Reference actual commits, files, and decisions from the diff | | Hard-wrapping lines at 80 chars | Write prose as continuous lines; only break at paragraph boundaries |
GitHub에서 보기