원클릭으로
create-pr
Commits relevant changes, pushes a focused branch, and opens a templated draft pull request. Use when the user runs /create-pr.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Commits relevant changes, pushes a focused branch, and opens a templated draft pull request. Use when the user runs /create-pr.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Reviews a completed workstream from conversation, repository, and forge evidence, uses grilling to agree durable lessons, and updates project vision and readiness/completion definitions after confirmation. Use when ending a substantial workstream or running a project retrospective.
Reviews a roadmap from fresh project evidence and produces a verified, throughput-anchored version plan, with execution gated on confirmation. Use when reviewing a roadmap, planning releases, or sequencing a backlog.
Applies the user's ambient engineering bar: current evidence, complete in-scope solutions, reuse, real validation, right-sized value, and maintainability. Use for planning, implementing, debugging, reviewing, refactoring, architecture, or substantial technical investigation.
| name | create-pr |
| description | Commits relevant changes, pushes a focused branch, and opens a templated draft pull request. Use when the user runs /create-pr. |
| license | Unlicense OR MIT |
| compatibility | Requires git and the GitHub CLI (gh) authenticated to the target repository, plus network access. |
Explicit permission to commit relevant changes, push the branch, and open a draft pull request.
Inspect the repository:
git status --short --branchgit diffgit diff --stagedgit log --oneline -5Resolve the base branch from the remote default (do not hardcode main):
BASE_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')
Resolve whether there is work to publish. If there are no relevant working-tree changes and no commits ahead of origin/$BASE_BRANCH, stop. If changes are already committed, continue without creating an empty commit.
If the current branch is the base branch, create a focused branch first. Use the issue number or a change summary; ask when ambiguous.
Stage only relevant files. Exclude secrets and unrelated local changes.
Commit with a concise Conventional Commit message passed via HEREDOC:
type(scope): summary.feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert.Push with upstream tracking when needed: git push -u origin HEAD.
Resolve the PR template:
.github/pull_request_template.md and .github/PULL_REQUEST_TEMPLATE/..github/pull_request_template.md, or pick the matching template under .github/PULL_REQUEST_TEMPLATE/ when multiple templates are discovered.Open as a draft via GraphQL first:
gh api graphql \
-f query='mutation($repositoryId:ID!, $base:String!, $head:String!, $title:String!, $body:String!) {
createPullRequest(input: {
repositoryId: $repositoryId,
baseRefName: $base,
headRefName: $head,
title: $title,
body: $body,
draft: true
}) {
pullRequest { url number }
}
}' \
-F repositoryId="$REPOSITORY_ID" \
-f base="$BASE_BRANCH" \
-f head="$HEAD_BRANCH" \
-f title="$PR_TITLE" \
-f body="$PR_BODY"
If GraphQL is rate-limited or unavailable, fall back to REST as a draft:
gh api "repos/$OWNER/$REPO/pulls" \
-f title="$PR_TITLE" \
-f head="$HEAD_BRANCH" \
-f base="$BASE_BRANCH" \
-f body="$PR_BODY" \
-F draft=true \
--jq '.html_url'
Return the PR URL.
Do not skip git hooks or verification unless the user explicitly asks.