From workflow-cc-om
Respond to PR review comments (valid/invalid), fix valid issues, and reply with the fix commit SHA
npx claudepluginhub ai-builder-team/ai-builder-plugin-marketplace --plugin workflow-cc-omThis skill is limited to using the following tools:
You are running an interactive workflow to respond to review comments on PR **#$ARGUMENTS**, fix valid issues, and confirm with a commit SHA.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
You are running an interactive workflow to respond to review comments on PR #$ARGUMENTS, fix valid issues, and confirm with a commit SHA.
ultrathink
gh repo view --json nameWithOwner --jq .nameWithOwner 2>/dev/null || echo "UNKNOWN_REPO"gh pr view $0 --json title --jq .title 2>/dev/null || echo "UNKNOWN_TITLE"gh pr view $0 --json author --jq .author.login 2>/dev/null || echo "UNKNOWN_AUTHOR"gh pr view $0 --json headRefOid --jq .headRefOid 2>/dev/null || echo "UNKNOWN_SHA"gh pr view $0 --json baseRefName --jq .baseRefName 2>/dev/null || echo "UNKNOWN_BASE"Before starting, verify:
Store the HEAD SHA and repo nameWithOwner — you will need them later. Parse OWNER and REPO from nameWithOwner (e.g., "octocat/hello-world" → OWNER=octocat, REPO=hello-world).
Run these commands substituting OWNER and REPO:
gh api repos/OWNER/REPO/pulls/$ARGUMENTS/comments --jq '[.[] | {id: .id, path: .path, line: .line, original_line: .original_line, body: .body, user: .user.login, created_at: .created_at, in_reply_to_id: .in_reply_to_id}]'
gh api repos/OWNER/REPO/pulls/$ARGUMENTS/reviews --jq '[.[] | {id: .id, user: .user.login, body: .body, state: .state, submitted_at: .submitted_at}]'
gh api repos/OWNER/REPO/issues/$ARGUMENTS/comments --jq '[.[] | {id: .id, body: .body, user: .user.login, created_at: .created_at}]'
Process the data:
in_reply_to_id is null). Replies are context, not actionable items.If there are NO root inline comments AND NO reviews with substantive body text AND NO substantive top-level PR comments:
"No review feedback found on PR #$ARGUMENTS. Nothing to address."
Stop here.
gh pr diff $ARGUMENTS
For each file referenced by a comment, use the Read tool to read the relevant file around the commented line (±20 lines of context). Do NOT rely only on the diff — understand the full surrounding code.
For EACH item in the working list, assess:
Draft a short 1-2 sentence reply for each:
## Assessment: N comments
| # | Reviewer | Location | Verdict | Reply preview |
|---|----------|----------|---------|---------------|
| 1 | @alice | foo.ts:42 | ✅ VALID | "Good catch — will extract to a named constant." |
| 2 | @bob | bar.ts:17 | ❌ INVALID | "Not a concern — the null check at line 12 covers this path." |
For review body items without a line number, use the format {file} (review body) or (top-level review).
For top-level PR comments (issue comments), use the format (PR comment).
If there are ONLY invalid items and nothing to fix, proceed through Phase 2 (post replies) but skip Phase 3 (no fixes needed). Print a note to that effect.
Ask with AskUserQuestion (one question, not per-comment):
If the user selects "Adjust before posting", apply their edits to the reply drafts and the valid/invalid verdicts, then re-display the updated table and ask again with the same two options (no "Adjust" loop — one round of adjustment only).
For each inline comment (has a comment id and path/line):
gh api repos/OWNER/REPO/pulls/$ARGUMENTS/comments/{comment_id}/replies --method POST --field body="..."
For each review body item:
gh api repos/OWNER/REPO/issues/$ARGUMENTS/comments --method POST --field body="Re: @{reviewer}'s review — {reply}"
For each top-level PR comment (issue comment), post a new issue comment as a reply (GitHub doesn't support threading on issue comments, so reference the reviewer and quote a snippet for context):
gh api repos/OWNER/REPO/issues/$ARGUMENTS/comments --method POST --field body="Re: @{reviewer}'s comment — {reply}"
Print Replied to {N} comments. when done.
Skip this phase entirely if there are no VALID items.
For each VALID item (work through them in order):
Fixed: {brief description} in {file}:{line}Stage and commit all modified files:
git add {modified files}
git commit -m "fix: address review feedback on PR #$ARGUMENTS"
Use a separate git add call per file rather than git add . to avoid accidentally staging unrelated changes.
Ask with AskUserQuestion:
git push immediatelygit rev-parse --short HEAD
Store this as FIX_SHA.
Skip this phase if there were no VALID items (nothing was committed).
For each VALID item that was fixed:
If it was an inline comment, post a reply in the same thread:
gh api repos/OWNER/REPO/pulls/$ARGUMENTS/comments/{comment_id}/replies --method POST --field body="Fixed in {FIX_SHA}."
If it was a review body or top-level PR comment, post a new top-level comment:
gh api repos/OWNER/REPO/issues/$ARGUMENTS/comments --method POST --field body="Fixed in {FIX_SHA} — addressed @{reviewer}'s concern about {brief topic}."
Print:
Done.
- Replied to N comments (M valid, K invalid)
- Fixed M issues → commit {FIX_SHA}
If there were no valid items:
Done.
- Replied to N comments (0 valid, N invalid)
- No code changes needed
git add . — always stage specific files by nameAskUserQuestion before editingsed or awk to modify filesgh api call fails with 401/403, tell the user to run gh auth status