pr-finalize
БесплатноБез исполняемых скриптовНе проверенFinalizes any PR for merge by verifying title/description match implementation AND performing code review for best practices. Use when asked to "finalize PR"…
от dotnet★ 23 319 звёзд на GitHubОб этом скилле
PR Finalize
Ensures PR title and description accurately reflect the implementation, and performs a code review for best practices before merge.
Standalone skill - Can be used on any PR, not just PRs reviewed by the pr-review skill.
Two-Phase Workflow
- Title & Description Review - Verify PR metadata matches implementation
- Code Review - Review code for best practices and potential issues
🚨 CRITICAL RULES
1. NEVER Approve or Request Changes
AI agents must NEVER use --approve or --request-changes flags.
| Action | Allowed? | Why |
|---|---|---|
gh pr review --approve |
❌ NEVER | Approval is a human decision |
gh pr review --request-changes |
❌ NEVER | Blocking PRs is a human decision |
2. NEVER Post Comments Directly
This skill is ANALYSIS ONLY. Never post comments using gh commands.
| Action | Allowed? | Why |
|---|---|---|
gh pr review --comment |
❌ NEVER | Review-PR.ps1 handles posting via scripts |
gh pr comment |
❌ NEVER | Review-PR.ps1 handles posting via scripts |
| Analyze and report findings | ✅ YES | This is the skill's purpose |
Correct workflow:
- This skill: Analyze PR, produce findings and write to
pr-finalize-summary.md - Human-controlled follow-up: PR finalization is not part of the automated
Review-PR.ps1flow. Only post or use the summary when a user explicitly asks for PR finalization.
Only humans control when comments are posted. Your job is to analyze and present findings.
Phase 1: Title & Description
Core Principle: Preserve Quality
Review existing description BEFORE suggesting changes. Many PR authors write excellent, detailed descriptions. Your job is to:
- Evaluate first - Is the existing description good? Better than a template?
- Preserve quality - Don't replace a thorough description with a generic template
- Enhance, don't replace - Add missing required elements (NOTE block, issue links) without rewriting good content
- Only rewrite if needed - When description is stale, inaccurate, or missing key information
Usage
# Get current state (no local checkout required)
gh pr view XXXXX --json title,body
gh pr view XXXXX --json files --jq '.files[].path'
# Review commit messages (helpful for squash/merge commit quality)
gh pr view XXXXX --json commits --jq '.commits[].messageHeadline'
# Review actual code changes
gh pr diff XXXXX
# Optional: if the PR branch is checked out locally
git diff origin/main...HEAD
Evaluation Workflow
Step 1: Review Existing Description Quality
Before suggesting changes, evaluate the current description:
| Quality Indicator | Look For |
|---|---|
| Structure | Clear sections, headers, organized flow |
| Technical depth | File-by-file changes, specific code references |
| Scanability | Easy to find what changed and where |
| Accuracy | Matches actual diff - not stale or incorrect |
| Completeness | Platforms, breaking changes, testing info |
Step 2: Compare to Template
Ask: "Is the existing description better than what my template would produce?"
- If YES: Keep existing, only add missing required elements
- If NO: Suggest improvements or replacement
Step 3: Produce Output
- Recommended PR title (if change needed)
- Assessment of existing description
- Specific additions needed (e.g., "Add NOTE block at top")
- Only full replacement if description is inadequate
Title Requirements
The title becomes the commit message headline. Make it searchable and informative.
| Requirement | Good | Bad |
|---|---|---|
| Platform prefix (if specific) | [iOS] Fix Shell back button |
Fix Shell back button |
| Describes behavior, not issue | [iOS] SafeArea: Return Empty for non-ISafeAreaView views |
Fix #23892 |
| Captures the "what" | Return Empty for non-ISafeAreaView |
Fix SafeArea bug |
| Notes model change if applicable | (opt-in model) |
(omitted) |
| No noise prefixes | [iOS] Fix... |
[PR agent] Fix... |
Title Formula
[Platform] Component: What changed (model change if any)
Examples:
[iOS] SafeArea: Return Empty for non-ISafeAreaView views (opt-in model)[Android] CollectionView: Fix scroll position reset on item update[Windows] Shell: Use NavigationView instead of custom flyout
Description Requirements
PR description should:
- Include the base sections from
.github/PULL_REQUEST_TEMPLATE.md("Description of Change" and "Issues Fixed"). The skill adds additional structured fields (Root cause, Fix, Key insight, etc.) as recommended enhancements for better agent context. - Match the actual implementation
### Description of Change
[Must match actual implementation]
### Issues Fixed
Fixes #XXXXX
Content for Future Agents
The title and description become the commit message. Future agents sear
Установить pr-finalize в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл pr-finalize?
Finalizes any PR for merge by verifying title/description match implementation AND performing code review for best practices. Use when asked to "finalize PR", "check PR description", "review commit message", before merging any PR, or when PR implementation changed during review. Do NOT use for extracting lessons (use learn-from-pr), writing tests (use write-tests-agent), or investigating build failures (use azdo-build-investigator and ci-analysis).
Как установить скилл pr-finalize?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pr-finalize запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic