/korean-tech-writing:pr-suggestfrom korean-tech-writing
Use when reviewing someone else's GitHub pull request and an improvement is best shown as code. Edit copies of the files outside the repository, turn the edits into suggestion comments that are checked to reproduce them exactly, and post one COMMENT review with a Korean body that leads with the reason. 남의 PR에 개선안을 suggestion 묶음 리뷰로 올릴 때 사용한다. "suggestion으로 제안해줘", "제안 리뷰 올려줘", "개선안을 코드로 남겨줘"에 쓴다. 내 PR을 직접 고치는 작업과 의견만 필요한 리뷰에는 쓰지 않는다.
Ships in korean-tech-writing. 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; scripts run unread.
결과는 PR 리뷰 1건이다. 리뷰 종류는 comment이고, 본문 1개와 suggestion 코멘트 여러 개로 이루어진다. PR 작성자는 Files changed 탭에서 suggestion을 batch에 담아 한 커밋으로 반영한다.
<work>라고 부른다.suggest.py가 원본과 PR diff를 git 객체에서 읽는다.pull_request_read와 pull_request_review를 쓴다. 이 도구가 없으면 GitHub CLI(gh)를 쓴다. PR이 GitHub Enterprise에 있으면 모든 gh 명령에 GH_HOST=<호스트>를 붙인다.<remote>는 PR이 열린 저장소를 가리키는 remote다. 보통 origin이고, 포크를 clone했다면 upstream이다.pull_request_read에 repository와 number를 넘긴다.gh pr view <N> -R <owner>/<repo> --json title,body,state,baseRefName,baseRefOid,headRefOid,filesbaseRefOid를 <BASE>로, headRefOid를 <SHA>로 적어 둔다. 지금 base 브랜치 끝을 <BASE>로 쓰면 안 된다. 이미 머지된 PR에서는 diff가 비어서 모든 suggestion이 거부된다.pull/<N>/head로 받는다.
git fetch <remote> <baseRefName> pull/<N>/head
git cat-file -e <BASE>^{commit} && git cat-file -e <SHA>^{commit}
git show <SHA>:<path>로 읽는다. 사람이 직접 쓰지 않은 생성 파일(문자열 카탈로그, lock 파일 등)은 제안 대상에서 뺀다. 바뀐 코드의 호출자와 피호출자도 읽는다.pull_request_read의 include에 threads와 comments를, includeResolved에 true를 넘긴다. gh에서는 다음 명령을 쓴다.
gh api repos/<owner>/<repo>/pulls/<N>/reviews --paginate
gh api repos/<owner>/<repo>/pulls/<N>/comments --paginate
gh api repos/<owner>/<repo>/issues/<N>/comments --paginate
mkdir -p <work>/proposed/<dir> && git show <SHA>:<path> > <work>/proposed/<path>.<work>/proposed/ 안의 사본만 고친다.git grep -n <symbol> <SHA>. 테스트도 포함한다.python3 -I <이 스킬 폴더>/scripts/suggest.py --repo <clone> --base <BASE> --head <SHA> \
--proposed <work>/proposed --body <work>/body.md --diff-out <work>/change.diff \
--format t3 --repository <owner>/<repo> --number <N> > <work>/review.json
--format t3 --repository … --number … 대신 --format gh를 쓴다. 두 형식은 필드 이름이 달라서 섞어 쓸 수 없다.<SHA>의 원본에 suggestion을 다시 적용해 보고, 결과가 수정본과 다르면 멈춘다.--gap을 1로 낮추거나 그 변경을 본문으로 옮긴다.path:start-end가 나오고, 마지막 줄에 파일 수, suggestion 수, 추가·삭제 줄 수가 나온다.notes.json에 {"<path>:<start>-<end>": "1~2문장"}으로 적고 --notes로 넘긴다.change.diff와 변경 범위를 사용자에게 보여 준다.review.json의 필드를 pull_request_review에 그대로 넘긴다. 이 파일에는 repository, number, verdict, expectedHeadSha, body, comments가 들어 있다.gh api -X POST repos/<owner>/<repo>/pulls/<N>/reviews --input <work>/review.json --jq '{id, html_url}'
pull_request_read로 threads를 읽는다.gh api repos/<owner>/<repo>/pulls/<N>/comments --paginate \
--jq '.[] | select(.pull_request_review_id==<review id>) | "\(.path):\(.original_start_line // .original_line)-\(.original_line)"'
gh api -X PUT repos/<owner>/<repo>/pulls/<N>/reviews/<review id> -F body=@<file>gh api -X PATCH repos/<owner>/<repo>/pulls/comments/<comment id> -F body=@<file>인라인 코멘트를 고칠 때는 새 본문에 suggestion 코드 블록을 다시 넣는다. GitHub는 코멘트 본문 안의 블록으로 suggestion을 만들기 때문이다.
What SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
Other plugins' skills for the same job
npx claudepluginhub oozoofrog/oozoofrog-plugin --plugin korean-tech-writing