/han-github:post-code-review-to-pr [optional context about the PR or areas to focus on]from han-github
Runs a full code review and posts review comments to the current branch's GitHub PR. Requires gh CLI and an existing PR. Use for posting feedback to GitHub; for local review use code-review.
Ships in han-github. 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.
When running a PR code review, follow the process outlined here.
which gh 2>/dev/null || echo "not installed"which jq 2>/dev/null || echo "not installed"If gh is not found, inform the user it must be installed and configured; if jq is not found, inform the user it must
be installed. In either case, immediately stop.
git branch --show-current 2>/dev/null || echo unknowngit symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null || echo unknowngh pr diff --name-only 2>/dev/null || echo "no pr"bash "${CLAUDE_PLUGIN_ROOT}/scripts/han-config-dir.sh" 2>/dev/null || echo "$HOME/.claude"cat .han/config.md 2>/dev/null || echo ""As your first action, use the Read tool on .han/config.md inside the personal config directory path above. A read
that returns no file is no personal configuration: continue silently. When that file or the project .han/config.md
probe supplies content, apply it per config-rule.md, which governs precedence
between the two files, relative-path resolution, and what to do with a file that reads but cannot be used.
If changed files is empty or reads no pr, or gh pr view --json number,url fails, inform the user no reviewable PR
exists for the current branch and stop.
Invoke the /code-review skill to perform the full code review. Pass along any user-provided focus areas or context
from the original arguments.
/code-review writes its report to a file and names the path in its closing message; it does not print the review into
the conversation. Capture that path — Step 3 reads the report from it. After /code-review completes, proceed
immediately to Step 3 — do not stop here.
Ask the user whether they'd like to post the review to the PR on GitHub using AskUserQuestion with options "Yes, post
the review to GitHub" and "No, just the local review". If the user declines, proceed to Step 5.
If the user accepts:
${CLAUDE_SKILL_DIR}/scripts/pr-metadata.sh, which outputs JSON with owner_repo,
pr_number, head_sha, pr_author_login, and current_user_login.Because the review body will be publicly visible on the PR, run a clarity pass on the draft before posting.
Match the body's length to what the review found. Every finding earns its place by naming a specific problem at a
specific location. Skip filler sections, a restated summary of the diff, and boilerplate the reader can see for
themselves on the PR. Stay inside what the review covered: this step edits wording and severity, and never adds a
finding /code-review did not raise.
/tmp/post-code-review-to-pr-draft.md) using the Write tool.han-core:junior-developer agent in artifact-review mode with the prompt: "You are reviewing the
text of a code review that is about to be posted publicly on a GitHub pull request. The review is at {draft_path}. Do
not re-review the code — review the review. Flag findings whose wording is unclear, severity is mis-assigned (CRIT
used where WARN would be accurate, or vice versa), language is accusatory or blaming rather than evidence-based, or
file_path:line_number references are missing or invalid. Return a short list of specific edits with before/after
text; return an empty list if the review reads well as-is."${CLAUDE_SKILL_DIR}/scripts/create-review-tempfile.sh. Write the final,
edited review body to that path using the Write tool (not Bash).pr_author_login matches current_user_login (self-authored PR), post as a PR
comment (GitHub rejects formal reviews from PR authors) by running
${CLAUDE_SKILL_DIR}/scripts/post-pr-comment.sh {pr_number} {temp_file_path}. If they differ, determine event type
(REQUEST_CHANGES if any CRIT or WARN findings exist, COMMENT if only SUGG) and post as a formal review by running
${CLAUDE_SKILL_DIR}/scripts/post-pr-review.sh {owner/repo} {pr_number} {head_sha} {event_type} {temp_file_path}.If any Critical or Warning issues were identified, ask the user using AskUserQuestion — "Would you like me to create a
plan to fix the identified issues?" with options "Yes, create a fix plan" and "No, just the review". If yes, enter plan
mode and create a detailed implementation plan listing each Critical and Warning item by task ID, with specific code
changes, file paths, and line numbers, ordered by priority (Critical first). If no Critical or Warning issues were
found, the review is complete — suggestions alone do not warrant a fix plan.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
pull-request, code-review, github-pr, review-comments, gh-cli
3 skills in this plugin
/update-pr-descriptionGenerate a PR description from the current branch's changes against a GitHub PR, using the gh CLI. Use when writing, drafting, or updating pull request descriptions, PR summaries, or PR bodies. Does not review code or post review comments — use code-review for local review or post-code-review-to-pr for posting a review to GitHub.
/work-items-to-issuesBreak a work-items.md file (produced by /plan-work-items) into independently-grabbable GitHub issues, one per slice, in each slice's target repo. Use when you want to turn a work-items file into GitHub issues, publish work items as issue tickets, or create implementation tickets that can be worked on and tracked on GitHub. Does not produce the work-items file itself — use plan-work-items to break a plan into work items first. Does not review code or post pull request comments — use post-code-review-to-pr for that.
npx claudepluginhub amirbiron/han --plugin han-githubOther plugins' skills for the same job