/empire-git:pr-review-postfrom empire-git
Posts a GitHub PR review with verdict and inline comments in a single API call. Automates gh CLI workflow for code review submissions, approvals, and change requests.
Ships in empire-git. 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.
None: SKILL.md is the whole skill.
Posts ONE review — verdict, summary, and inline comments — in a single GitHub API call. The caller supplies the confirmed event, summary, and comment list; this skill owns the mechanics of anchoring, payload building, posting, and retrying.
CRITICAL:
APPROVE | REQUEST_CHANGES | COMMENT), summary body (may be empty), and the comment list (path, line, optional start_line, side, body).OWNER/REPO from the PR's OWN base repo, never from gh repo view (cwd may be a different repo or fork): gh pr view "$PR" --json number,url then parse OWNER/REPO from .url and set PR from .number.SHA=$(gh pr view "$PR" --json headRefOid -q .headRefOid). If the caller validated comments against an earlier SHA and it changed, warn that anchors may have drifted and get re-confirmation before posting.side: RIGHTside: LEFT, only when that line sits inside a displayed diff hunkstart_line + line (same side)Build with jq into a temp file; pass every comment body and the summary as --arg values, NEVER via string interpolation (bodies hold quotes, backticks, $()):
payload=$(mktemp)
# Append each comment as data, never interpolated into the JSON:
comments='[]'
comments=$(jq -c --arg path "$P" --argjson line "$N" --arg side RIGHT --arg body "$Q" \
'. + [{path: $path, line: $line, side: $side, body: $body}]' <<<"$comments")
# repeat per comment; for a span add --argjson start_line and --arg start_side
jq -n --arg commit "$SHA" --arg event "$EVENT" --arg body "$SUMMARY" --argjson comments "$comments" \
'{commit_id: $commit, event: $event, body: $body, comments: $comments}' >"$payload"
Payload shape:
{
"commit_id": "<SHA>",
"event": "COMMENT|APPROVE|REQUEST_CHANGES",
"body": "<summary or empty>",
"comments": [
{ "path": "src/x.ts", "line": 42, "side": "RIGHT", "body": "..." },
{
"path": "src/x.ts",
"start_line": 40,
"start_side": "RIGHT",
"line": 44,
"side": "RIGHT",
"body": "..."
}
]
}
comments present, any event MAY omit body; with no comments, COMMENT and REQUEST_CHANGES require a non-empty body (APPROVE MAY always be empty).gh api --method POST "repos/$OWNER/$REPO/pulls/$PR/reviews" --input "$payload"
rm -f "$payload"
SHA): re-resolve the anchor or SHA and retry the single call, max 2 retries. If a retry changes an anchor the caller already validated, re-confirm that comment first. Never split into multiple posts; surface to the caller after repeated failure.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub marcoskichel/empire --plugin empire-git12 skills in this plugin
/activity-reportGenerate a concise activity report of the user's GitHub work over a period, grouped by area or feature instead of PR by PR. Use when user says "activity report", "weekly report", "what did I do this week", "what did I ship", "work summary", "summarize my week", "status update for my manager", "what did <user> ship", or `/empire-git:activity-report [start-date] [end-date] [author]`.
/pr-comment-replyRender the canonical reply text for a PR review comment. Use when drafting, writing, or posting a "PR comment reply", "review comment reply", "reply to this comment", "respond to this review comment", "answer the reviewer", "reply on the PR thread", or any text bound for `gh api` review-thread replies, `gh pr comment`, or a GitHub review comment box. Triggers on "reply to the comment", "answer this review comment", "respond to the reviewer", "draft a reply", "post a reply on the PR". Outputs plain text for the caller to post unchanged.
/pr-descriptionRender the canonical PR description body. Use when drafting, writing, updating, or regenerating a "PR description", "PR body", "pull request description", "pull request body", "PR summary", "PR template", "GitHub PR body", or any text bound for `gh pr create --body`, `gh pr create --body-file`, `gh pr edit --body`, `gh pr edit --body-file`, or a GitHub PR template. Triggers on "draft a PR", "write the PR", "summarize this branch for review", "regenerate PR body". MUST be invoked before any `gh pr create --body*` or `gh pr edit --body*` per empire-git rules. Outputs markdown for stdin.
/pr-mergeGate then merge a single pull request safely. Use when the user says "merge this PR", "merge the PR", "land this", "ship this PR", "merge when green". Verifies CI is green (investigates and attempts a fix when red), rebases and resolves conflicts when the branch is behind, triages unresolved review threads intelligently (resolve, fix, or ask — never blindly block), then merges and deletes the branch. Fast-forwards the local base checkout (e.g. updates `master`) when it is checked out.
/pr-merge-stackMerge an entire stack of dependent PRs bottom-up: merge the base PR, pull the base branch, rebase the next PR onto it, wait for CI, merge, repeat until the stack is empty. Use when the user says "merge the stack", "merge pr stack", "land the stack", "merge all these PRs", "merge the chain", "ship the whole stack", or names several stacked PRs to merge in order. Infers the stack from conversation; asks when it can't. Offers admin merge (skip review requirements) up front — CI must still pass either way.
/worktree-cleanupBatch cleanup across MULTIPLE stale worktrees and orphaned branches. Use when tidying up accumulated worktrees, asking about old branches, cleaning up the workspace, or saying "stale worktrees", "orphan branches", "prune worktrees", "clean up old branches", "purge stale worktrees", "housekeeping". For finishing ONE specific worktree, use worktree-close instead. Also triggers for `/empire-git:worktree-cleanup [--dry-run] [--days N]`.