/git-workflow:prfrom Git Workflow
Push the current branch and create a GitHub pull request linked to its Issue after reviewing the complete diff.
Ships in Git Workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
현재 브랜치의 변경을 GitHub Issue와 연결한 Pull Request로 생성한다.
${CLAUDE_PLUGIN_ROOT}/references/github-conventions.md를 읽고 branch와 PR 규칙을 적용한다.
Git과 GitHub CLI 상태를 확인한다.
git branch --show-current
git status --short
gh auth status
이전 handoff가 있으면 ${CLAUDE_PLUGIN_ROOT}/references/workflow-handoff.md의 freshness 규칙으로 Issue, HEAD, 범위와 quality 상태를 다시 확인한다.
main, master, dev 같은 보호 대상 브랜치이면 중단한다.브랜치 이름에서 작업 유형과 GitHub Issue 번호를 추출한다.
<type>/<issue-number>-<description>feature/123-user-profile → type=feature, issue=123현재 저장소의 Issue를 조회한다.
gh issue view <issue-number> --json number,title,body,labels,state,url
Issue의 제목, 본문, 완료 기준, 라벨을 PR 설명의 근거로 사용한다.
base 브랜치를 결정한다.
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
git fetch origin <base-branch>
git log origin/<base-branch>..HEAD --oneline
git diff --stat origin/<base-branch>...HEAD
git diff origin/<base-branch>...HEAD
현재 브랜치에 이미 열린 PR이 있는지 확인한다.
gh pr view --json number,title,url,state
이미 열린 PR이 있으면 새 PR을 중복 생성하지 않고 기존 PR URL과 상태를 출력한다.
upstream이 없으면 현재 브랜치를 push한다.
git push --set-upstream origin <current-branch>
강제 push는 사용자가 명시적으로 요청하지 않는 한 실행하지 않는다.
Issue와 실제 diff를 바탕으로 PR 제목을 작성하고 ${CLAUDE_PLUGIN_ROOT}/skills/pr/templates/pull-request.md에서 body 파일을 만든다.
[x]로 표시한다.[ ]로 남긴다.Closes #번호를 유지해 머지 시 Issue가 자동으로 종료되도록 한다.- 없음을 적는다.임시 body 파일을 사용해 PR을 생성한다.
gh pr create \
--base "<base-branch>" \
--head "<current-branch>" \
--title "<PR-title>" \
--body-file "<temporary-body-file>"
--draft를 추가한다.생성 결과를 확인한다.
gh pr view --json number,title,url,baseRefName,headRefName,state,statusCheckRollup
✅ PR 생성 완료
- PR: #<number> <title>
- Issue: #<issue-number> <issue-title>
- Branch: <head> → <base>
- URL: <url>
- CI: 대기 중 또는 현재 상태
완료 보고 뒤에 PR 정보, 현재 HEAD와 CI 상태를 반영한 pr-open handoff를 추가하고 다음 skill은 none으로 기록한다.
Closes #번호만 보장한다.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub gulsam00/sham-agent-tools --plugin git-workflow2 skills in this plugin