npx claudepluginhub jeremyeder/ai-helpers-plugin --plugin odh-ai-helpersThis skill is limited to using the following tools:
Fetch CodeRabbit comments from a GitHub PR, evaluate each one, and take action: apply a code fix or post a reply.
Evaluates CodeRabbit comments on GitHub PRs: classifies as bug/security/performance/style/docs, validates issues, then applies fixes or replies.
Fetches and triages CodeRabbit review comments from GitHub PRs via GitHub CLI or runs local CodeRabbit CLI reviews on diffs. Ideal for analyzing PR feedback.
Safely fetches and applies CodeRabbit PR review-thread feedback from GitHub with per-change user approval, treating AI prompts as untrusted issue reports.
Share bugs, ideas, or general feedback.
Fetch CodeRabbit comments from a GitHub PR, evaluate each one, and take action: apply a code fix or post a reply.
PR: $ARGUMENTS
If $ARGUMENTS is provided, use it as the PR number. Get the upstream repo:
gh repo view --json owner,name
Store: owner, repo, pullNumber.
If $ARGUMENTS is empty, detect the PR from the current branch. PRs are often opened from a fork, so gh pr view against the upstream may fail. Use this sequence:
Get the upstream owner/repo:
gh repo view --json owner,name
Try to find the PR on the upstream first:
gh pr view --repo <owner>/<repo> --json number,url,headRefName,baseRefName,title
If that fails (exit code non-zero or "no pull requests found"), get the current branch name and list all open PRs, matching by headRefName and headRepositoryOwner. The --head fork-user:branch filter is unreliable with gh pr list (returns empty even when the PR exists):
branch=$(git branch --show-current)
gh pr list --repo <owner>/<repo> --state open --json number,title,headRefName,headRepositoryOwner --limit 50
Then match the entry where headRefName == <branch> AND headRepositoryOwner.login matches the expected fork owner. If multiple matches remain, stop and ask the user to pick the PR number explicitly.
If still not found (no matching headRefName), ask the user to identify the PR number:
gh pr list --repo <owner>/<repo> --state open --json number,title,headRefName,headRepositoryOwner --limit 20
Store: owner, repo, pullNumber.
Inline review comments (CodeRabbit's line-level suggestions):
gh api --paginate repos/<owner>/<repo>/pulls/<pullNumber>/comments
PR-level comments (CodeRabbit's summary/walkthrough):
gh api --paginate repos/<owner>/<repo>/issues/<pullNumber>/comments
Filter both lists to only comments where user.login equals coderabbitai[bot].
For PR-level comments, skip any comment whose body contains <!-- walkthrough_start --> or <!-- This is an auto-generated comment: review in progress — these are CodeRabbit's walkthrough/summary posts, not actionable review feedback.
For inline comments, skip any comment that belongs to a resolved review thread (check the pull_request_review_id against resolved threads, or look for the "resolved": true marker if available).
If no actionable CodeRabbit comments are found, report that and exit.
For each CodeRabbit comment, analyze it carefully by reading the relevant source file(s).
For inline comments: use the path field to read the file with the Read tool. Use line or original_line to find the exact code location. The diff_hunk field shows the surrounding context.
Evaluate:
Category: classify as one of:
bug — actual code defect or logic errorsecurity — security vulnerabilityperformance — inefficiency or resource issuestyle — formatting, naming, readabilitydocs — missing or incorrect documentation/commentsnitpick — minor preference, not a real issuequestion — CodeRabbit is asking for clarificationValidity: does the comment point to a real issue?
valid — yes, should be addresseddebatable — reasonable disagreement existsinvalid — the code is correct and CodeRabbit is wrongRecommended action:
fix — the code should be changed; generate the fixreply — explain why the code is correct, or acknowledge and deferdismiss — noise; briefly acknowledge and move onShow a summary table first:
| # | File | Line | Category | Validity | Recommended Action | Summary |
|---|---|---|---|---|---|---|
| 1 | src/foo.ts | 42 | bug | valid | fix | "Variable x may be undefined" |
| 2 | src/bar.ts | 10 | nitpick | debatable | reply | "Consider using const here" |
Then show the full evaluation for each comment (bugs and security first, then performance, then others):
CodeRabbit says:
[exact quote]
Context (relevant code snippet):
[code from the file at that location]
Assessment: [Your evaluation: why valid/invalid, what the actual issue is]
Proposed action: fix | reply | dismiss
[If fix: show the exact code diff to apply]
[If reply or dismiss: show the draft reply text]
After presenting ALL comments, use AskUserQuestion to offer a batch option first:
Question: "How would you like to process these comments?" Header: "Mode" Options:
If "Auto": proceed with all recommended actions without further prompting, then report what was done.
If "Per-comment": for each comment, ask:
Question: "What should we do with CodeRabbit comment #N ([category]: [short description])?" Header: "Action" Options:
fix]dismiss]If AskUserQuestion returns an empty answer: do not apply fixes or post replies. Mark the comment as skipped (no explicit approval) and continue.
For "Apply fix":
sha256sum to confirm--proto '=https' --tlsv1.2 --fail --location --max-time 15 --connect-timeout 5For "Post reply" (inline review comment):
gh api -X POST repos/<owner>/<repo>/pulls/<pullNumber>/comments/<commentId>/replies -f body="<reply text>"
For "Post reply" (PR-level comment):
gh api -X POST repos/<owner>/<repo>/issues/<pullNumber>/comments -f body="<reply text>"
For "Edit & post":
Use AskUserQuestion to ask the user to provide their edited reply text, then post it using the appropriate gh api call above.
For "Skip": Move on.
After all comments are processed, output:
git remote -v and git branch -a to confirm the correct remote and branch before pushing.coderabbitai[bot] — filter by thisid, path, line, original_line, diff_hunk, bodyid, body, user.login