원클릭으로
pr
Create a pull request with an auto-generated description
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Create a pull request with an auto-generated description
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | pr |
| description | Create a pull request with an auto-generated description |
| allowed-tools | Bash, Read, Grep, Glob |
Determine the base branch by running:
git remote show origin
Look for the "HEAD branch" line to identify whether the default branch is master or main. Use that as the base branch.
Ensure the current branch is pushed to origin. If it does not already track a remote branch, push with:
git push -u origin HEAD
Gather context for the PR description:
Get all commit messages on this branch:
git log <base>..HEAD --oneline
Get the full diff of changes:
git diff <base>...HEAD
Extract a ticket ID from the current branch name using the pattern [A-Z]+-[0-9]+ (e.g. MCB-29 from ben/MCB-29-add-admin-tool). If a ticket ID is found, prepare a Linear link: https://linear.app/issue/<TICKET>.
Generate a PR title — a concise summary of the changes, under 70 characters.
Generate a PR description in this format:
## Summary
<1-3 bullet points describing what changed and why>
## Test plan
<bulleted checklist of how to verify the changes>
<Linear ticket link if a ticket ID was found, otherwise omit>
Create the PR using gh pr create targeting the detected base branch. Use a HEREDOC for the body to preserve formatting:
gh pr create --base <base> --title "the pr title" --body "$(cat <<'EOF'
## Summary
...
## Test plan
...
https://linear.app/issue/TICKET-123
EOF
)"
Enable auto-merge (unless the user passed --no-auto-merge or no-auto-merge as an argument):
gh pr merge --auto --merge
Output the PR URL returned by gh pr create.
gh pr create fails because a PR already exists, inform the user and show the existing PR URL.--no-auto-merge to skip it.