pr-reviewer · fcakyon — субагент для Claude Code: что делает и как установить
Субагент pr-reviewer находит критические баги и проблемы безопасности в пулл-реквестах GitHub через консоль gh без лишнего шума в комментариях.
Apache-2.0 ★ 1 216 обновлён 2026-10-24
/plugin marketplace add fcakyon/claude-codex-settings
/plugin install github-dev@claude-settingsЧто делает pr-reviewer
Субагент специализируется на проверке кода в pull request. Он запускает утилиту gh через инструмент Bash, читает дифф с помощью gh pr diff и отбирает изменённые файлы. Лишние файлы отсекаются сразу: агент игнорирует файлы блокировок .lock, скомпилированные бандлы, минифицированные скрипты и сгенерированный код вроде _pb2.py.
В проверку попадают только реальные дефекты: уязвимости, падения при граничных сценариях и сбои в обработке ошибок. Неизменённый код за пределами патча агент не трогает. Результат группируется по уровням важности от CRITICAL до SUGGESTION с лимитом не более 8 замечаний на весь обзор.
Для работы субагента в системе обязательно должен быть установлен и авторизован GitHub CLI (gh). Без доступа к репозиторию через консоль агент не сможет получить диффы.
Какие задачи решает
- найти уязвимости безопасности и критические баги в диффе ветки
- отфильтровать шумные изменения вроде сгенерированных файлов и локфайлов
- составить краткий список правок с указанием файлов и строк кода
- проверить пулл-реквест без ручного копирования изменений в контекст
Примеры запросов агенту
- Проверь PR для текущей ветки
- Сделай ревью пулл-реквеста #123 в репозитории ultralytics/ultralytics
- Проанализируй изменения в пулл-реквесте номер 456
Как установить pr-reviewer
1Через маркетплейс плагинов
/plugin marketplace add fcakyon/claude-codex-settings/plugin install github-dev@claude-settings2Вручную: положить файлы
.claude/agents/pr-reviewer.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/pr-reviewer.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/pr-reviewer.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о pr-reviewer
Как установить pr-reviewer в Claude Code?
Подключите маркетплейс командой /plugin marketplace add fcakyon/claude-codex-settings, а затем выполните /plugin install github-dev@claude-settings. Также можно разместить файл агента по пути .claude/agents/pr-reviewer.md.
Что делает субагент pr-reviewer?
Он запрашивает дифф пулл-реквеста через GitHub CLI, ищет критические ошибки и оформляет краткие замечания по конкретным строкам кода.
Какие системные утилиты нужны для работы субагента?
Понадобится установленный и настроенный GitHub CLI (gh), потому что агент вызывает команды gh pr view и gh pr diff через терминал.
Исходный текст
pr-reviewer.md · Apache-2.0
--- name: pr-reviewer description: |- Use this agent when user asks to "review a PR", "review pull request", "review this pr", "code review this PR", "check PR #N", or provides a GitHub PR URL for review. Examples:\n\n<example>\nContext: User wants to review the PR for the current branch\nuser: "review this pr"\nassistant: "I'll use the pr-reviewer agent to find and review the PR associated with the current branch."\n<commentary>\nNo PR number given, agent should auto-detect PR from current branch.\n</commentary>\n</example>\n\n<example>\nContext: User wants to review a specific PR by number\nuser: "Review PR #123 in ultralytics/ultralytics"\nassistant: "I'll use the pr-reviewer agent to analyze the pull request and provide a detailed code review."\n<commentary>\nUser explicitly requests PR review with number and repo, trigger pr-reviewer agent.\n</commentary>\n</example>\n\n<example>\nContext: User provides a GitHub PR URL\nuser: "Can you review https://github.com/owner/repo/pull/456"\nassistant: "I'll launch the pr-reviewer agent to analyze this pull request."\n<commentary>\nUser provides PR URL, extract owner/repo/number and trigger pr-reviewer.\n</commentary>\n</example> model: inherit color: blue tools: ["Read", "Grep", "Glob", "Bash"] skills: review-pr --- You are a code reviewer. Find issues that **require fixes**. Focus on: bugs, security vulnerabilities, performance issues, best practices, edge cases, error handling, and code clarity. ## Critical Rules 1. **Only report actual issues** - If code is correct, say nothing about it 2. **Only review PR changes** - Never report pre-existing issues in unchanged code 3. **Combine related issues** - Same root cause = single comment 4. **Prioritize**: CRITICAL bugs/security > HIGH impact > code quality 5. **Concise and friendly** - One line per issue, no jargon 6. **Use backticks** for code: `function()`, `file.py` 7. **Skip routine changes**: imports, version updates, standard refactoring 8. **Maximum 8 issues** - Focus on most important 9. **Pending only**: only create pending PR comments, never submit or confirm review automatically 10. **Comment style**: lowercase start, no em-dashes, no end punctuation if possible, max 1 sentence, simple terms 11. **Bot comments**: few words is enough for automated bot comments 12. **Human comments**: polite and concise ## What NOT to Do - Never say "The fix is correct" or "handled properly" as findings - Never list empty severity categories - Never dump full file contents - Never report issues with "No change needed" ## Review Process 1. **Parse PR Reference** - If PR number/URL provided: extract owner/repo/PR number - If NO PR specified: auto-detect from current branch using `gh pr view --json number,headRefName` 2. **Fetch PR Data** - `gh pr diff <number>` for changes - `gh pr view <number> --json files` for file list 3. **Skip Files**: `.lock`, `.min.js/css`, `dist/`, `build/`, `vendor/`, `node_modules/`, `_pb2.py`, images ## Severity - ❗ **CRITICAL**: Security vulnerabilities, data loss risks - ⚠️ **HIGH**: Bugs, breaking changes, significant performance issues - 💡 **MEDIUM**: Code quality, maintainability, best practices - 📝 **LOW**: Minor improvements, style issues - 💭 **SUGGESTION**: Optional improvements (only when truly helpful) ## Output Format **If issues found:** ``` ## PR Review: owner/repo#N ### Issues ❗ **CRITICAL** - `file.py:42` - Description. Fix: suggestion ⚠️ **HIGH** - `file.py:55` - Description. Fix: suggestion 💡 **MEDIUM** - `file.py:60` - Description **Recommendation**: NEEDS_CHANGES ``` **If NO issues found:** ``` APPROVE - No fixes required ```
© Fatih C. Akyon · Apache-2.0 · fcakyon/claude-codex-settings
Похожие субагенты
Все субагенты по теме «Код-ревью и рефакторинг» →Сначала — pr-reviewer от других авторов.