coderabbit-rules-from-pr-reviews
БесплатноЗапускает вложенные скриптыНе проверенFetch and filter human review comments from recent merged PRs in a GitHub repository
от openshift-eng★ 123 звезды на GitHubОб этом скилле
CodeRabbit Rules from PR Reviews - Fetch Comments
This skill runs a Python script that fetches human review comments from recent merged PRs in a given GitHub repository. It handles all GitHub API calls, bot filtering, noise removal, rate limiting, and pagination, returning clean JSON output for AI analysis.
When to Use This Skill
Use this skill as Step 2-3 of the /teams:coderabbit-rules-from-pr-reviews command to collect review comments. The script replaces manual gh api calls with a single Python invocation.
Prerequisites
- GitHub CLI (
gh): Must be installed and authenticated. - Python 3: Python 3.6 or later.
Script Location
plugins/teams/skills/coderabbit-rules-from-pr-reviews/fetch_pr_comments.py
Usage
# Default: 30 most recent merged PRs
python3 plugins/teams/skills/coderabbit-rules-from-pr-reviews/fetch_pr_comments.py openshift/origin
# Custom count
python3 plugins/teams/skills/coderabbit-rules-from-pr-reviews/fetch_pr_comments.py openshift/origin --count 50
# Full URL
python3 plugins/teams/skills/coderabbit-rules-from-pr-reviews/fetch_pr_comments.py https://github.com/openshift/origin
What the Script Does
- Parses the repo argument — accepts
owner/repoor full GitHub URL - Fetches recent merged PRs via
gh pr list - For each PR, fetches two types of comments:
- Inline code review comments (
/pulls/{number}/comments) - General discussion comments (
/issues/{number}/comments)
- Inline code review comments (
- Filters out noise:
- Bot accounts: logins ending in
[bot]or matching known bots (coderabbitai,openshift-ci,openshift-bot,openshift-merge-robot,codecov,dependabot,renovate,k8s-ci-robot, etc.) - Prow commands: comments where every line starts with
/ - Approvals:
/lgtm,/approve,/hold, etc. - Short comments: less than 20 characters
- Bot accounts: logins ending in
- Rate limiting: 0.5s sleep between API calls, with retry logic for rate limit errors
Output Format
JSON to stdout, progress to stderr:
{
"repo": "openshift/origin",
"prs_analyzed": 30,
"total_comments": 142,
"unique_reviewers": 18,
"reviewers": ["alice", "bob", "carol"],
"prs": [
{
"number": 29500,
"title": "Fix flaky test in e2e suite",
"author": "dave",
"url": "https://github.com/openshift/origin/pull/29500",
"merged_at": "2026-03-25T14:30:00Z"
}
],
"comments": [
{
"pr": 29500,
"user": "alice",
"body": "This error should be wrapped with fmt.Errorf to preserve context",
"path": "pkg/cmd/server/start.go",
"type": "review",
"pr_title": "Fix flaky test in e2e suite",
"pr_author": "dave"
},
{
"pr": 29500,
"user": "bob",
"body": "We should add a unit test for this edge case",
"path": "",
"type": "issue",
"pr_title": "Fix flaky test in e2e suite",
"pr_author": "dave"
}
]
}
Field Descriptions
repo: The normalizedowner/repostringprs_analyzed: Number of merged PRs fetchedtotal_comments: Number of human review comments after filteringunique_reviewers: Count of distinct human reviewersreviewers: Sorted list of reviewer loginsprs[].number: PR numberprs[].title: PR titleprs[].author: PR author loginprs[].url: PR URLprs[].merged_at: Merge timestampcomments[].pr: PR number the comment belongs tocomments[].user: Reviewer logincomments[].body: Full comment textcomments[].path: File path (for inline review comments; empty for discussion comments)comments[].type:"review"for inline code comments,"issue"for general discussioncomments[].pr_title: Title of the PRcomments[].pr_author: Author of the PR
Notes
- Uses only Python standard library (no pip dependencies)
- Diagnostic/progress messages go to stderr, JSON data to stdout
- Handles GitHub API pagination for PRs with many comments
- Retries on rate limits with exponential backoff
- Analyzing 30 PRs typically takes 1-2 minutes (~60 API calls)
Установить coderabbit-rules-from-pr-reviews в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл coderabbit-rules-from-pr-reviews?
Fetch and filter human review comments from recent merged PRs in a GitHub repository
Как установить скилл coderabbit-rules-from-pr-reviews?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл coderabbit-rules-from-pr-reviews запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic