PR Review Workflow for Main Branch

VerifiedSafe

Structured workflow for addressing GitHub PR review comments targeting the main branch. Categorizes and implements fixes incrementally.

Sby Skills Guide Bot
DevelopmentIntermediate
7/22/2026
Claude CodeCursorCodex
#pull-request#code-review#git#github-cli#code-fixes

Recommended for

Automated summary

This skill structures how you handle GitHub pull request review comments on a PR targeting main, from fetching the remarks through fix commits to a final report.

Strengths

  • Uses GitHub CLI to confirm the PR base is main and that the head branch matches your local branch before touching code
  • Sorts comments into critical, stylistic, design/architectural and clarification buckets so work is prioritized
  • Enforces incremental fixes with one commit per change and messages that reference the original comment
  • Adds a self-verification pass (tests, no regressions) and a report flagging comments left unaddressed and why

Limitations

  • Heavily tied to GitHub CLI (gh) and git, with no path for other review platforms
  • Assumes comments come from gh, pasted text or a file, and does not model threaded discussions or suggestion blocks
  • The document is bilingual Japanese/English and some sections are truncated, which can leave instructions ambiguous
When to use it

Use it when you need to work through review comments on a PR merging into main in a disciplined way and produce traceable fix commits.

When not to use it

Don't use it to perform a code review yourself, on a PR targeting a branch other than main, or on a repository not hosted on GitHub.

Security analysis

Safe
Quality score85/100

The skill is a read-and-fix workflow for GitHub PR review comments. It uses only read-only GitHub CLI queries (gh pr view --json) and ordinary git commit operations, with no destructive commands, no credential/secret handling, no network exfiltration, no obfuscated or decoded payloads, and no instructions to disable safety controls. Committing after each fix is a normal, reversible developer practice and the skill explicitly requires verifying changes and running tests before finalizing.

No concerns found

How this analysis is made

Examples

Traiter une PR vers main
Voici la PR https://github.com/acme/api/pull/412 qui cible main : récupère les commentaires de revue, corrige-les un par un avec un commit par correction, puis fais un résumé des points non traités.
Corriger depuis un fichier de revue
Les remarques de revue sont dans reviews.md pour la PR #87 (base main). Classe-les par criticité, applique les corrections fichier par fichier et lance les tests à la fin.
Réponse à un reviewer
gh pr view 137 --json reviews : traite chaque commentaire, et prépare une explication pour ceux qui me semblent techniquement incorrects avant de modifier le code.

name: PR Review (Main Branch) description: Skill for parsing, organizing, and implementing fixes based on GitHub Pull Request review comments for PRs merging into the main branch.

PR Review Skill (Main Branch) / PRレビュー修正スキル(mainブランチ向け)

This skill provides a structured workflow for addressing review comments from a GitHub Pull Request that aims to merge the current feature branch into the main branch. このスキルは、現在の機能ブランチを main ブランチにマージすることを目的としたGitHubプルリクエストのレビュー指摘事項に対応するための構造化されたワークフローを提供します。 このスキルは、GitHubのプルリクエストにおけるレビュー指摘事項に対応するための構造化されたワークフローを提供します。

Workflow / ワークフロー

1. Information Gathering / 情報収集

  • Accept a PR URL or PR Number as input. / PRのURLまたはPR番号を入力として受け取ります。
  • Verify the Pull Request using GitHub CLI: / GitHub CLIを使用してプルリクエストの検証を行います:
    • Check Target Branch: gh pr view <number> --json baseRefName --template '{{.baseRefName}}' マージ先ブランチが main であることを確認します。
    • Check Source Branch: gh pr view <number> --json headRefName --template '{{.headRefName}}' PRのマージ元ブランチ(headブランチ)が現在のローカルブランチと一致することを確認します。
  • Fetch Review Comments: / レビュー指摘事項を取得します:
    • Use GitHub CLI to get all comments: GitHub CLIを使用してすべてのコメントを取得します:
      gh pr view <number> --json reviews,comments
      
    • Review messages might also be provided via: 指摘事項は以下の形式で提供される場合もあります:
      • Pasted as text by the user. / ユーザーによるテキストの貼り付け。
      • Provided in a file (e.g., reviews.md or comments.json). / ファイル(例:reviews.md や comments.json)での提供。
  • Identify the target files and specific line ranges mentioned in the comments. 指摘されている対象ファイルと特定の行範囲を特定します。

2. Analysis and Categorization / 分析と分類

  • Group comments by file. / 指摘をファイルごとにグループ化します。
  • Categorize comments into: / 指摘を以下のように分類します:
    • Critical: Bug fixes or logic errors that must be fixed. / 重要: 修正必須のバグや論理エラー。
    • Stylistic: Formatting, naming, or linting suggestions. / スタイル: フォーマット、命名、リンターの提案。
    • Design/Architectural: Suggestions for refactoring or better patterns. / 設計/構成: リファクタリングやより良いパターンの提案。
    • Clarification: Questions from the reviewer that need answering or code documentation. / 確認事項: レビュワーからの質問、回答やコードのドキュメント化が必要なもの。

3. Implementation Process / 実装プロセス

  • For each file/group of comments: / 各ファイルまたは指摘グループについて:
    • Read the current file content to understand the context. / 文脈を理解するために現在のファイル内容を読み取ります。
    • Incremental Fixes: Apply the requested changes one comment at a time. 段階的な修正: 1つの指摘事項ごとに変更を適用します。
    • Commit after each fix: Perform a git commit after each logical fix is applied and verified. 各修正後のコミット: 論理的な修正を適用し検証した後に、その都度 git commit を実行します。
    • Descriptive Commit Messages: Include the details of the fix and reference the original comment. 詳細なコミットメッセージ: 修正内容の詳細を記述し、元の指摘事項を引用または参照します。
      • Example: fix: rename data variable to eventList in ConnpassService.java (PR review fix)
    • Ensure that the changes do not break other parts of the code. / 変更がコードの他の部分を壊さないことを確認します。
    • Maintain the original coding style and project conventions. / 元のコーディングスタイルやプロジェクトの規約を維持します。

4. Self-Verification / 自己検証

  • Verify each fix against the original comment. / 各修正が元の指摘事項を満たしているか検証します。
  • Run available tests to ensure no regressions. / デグレード(先祖返り)がないことを確認するためにテストを実行します。
  • If a comment suggests a change that is technically incorrect or suboptimal, prepare a brief explanation to discuss with the user. 指摘内容が技術的に誤っている、または最適でない場合は、ユーザーと議論するための簡潔な説明を準備します。

5. Reporting / 報告

  • Summarize the changes made. / 実施した変更の概要をまとめます。
  • Note any comments that were not addressed (and why). / 対応しなかった指摘事項があれば、その理由を記録します。
  • Provide a clear message that can be used as a commit message or a PR comment update. コミットメッセージやPRコメントの更新に使用できる明確なメッセージを提供します。

Best Practices / ベストプラクティス

  • Atomic Commits: If requested, group fixes into logical commits rather than one giant update. 原子的なコミット: 要求に応じて、修正を一つの巨大な更新ではなく論理的なコミット単位に分割します。
  • Context is Key: Don't just apply the suggestion blindly. Understand why it was suggested. 文脈の理解: 提案を鵜呑みにせず、「なぜ」その提案がなされたのかを理解します。
  • Explain Decisions: If you deviate from a reviewer's suggestion, explain the rationale clearly. 意思決定の説明: レビュワーの提案とは異なる対応をする場合は、その根拠を明確に説明します。

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/pr-review-workflow-for-main-branch-mrwak9mo/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/pr-review-workflow-for-main-branch-mrwak9mo' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/pr-review-workflow-for-main-branch-mrwak9mo/download' --output '.skill-downloads/pr-review-workflow-for-main-branch-mrwak9mo/SKILL.md.part' && mv '.skill-downloads/pr-review-workflow-for-main-branch-mrwak9mo/SKILL.md.part' '.skill-downloads/pr-review-workflow-for-main-branch-mrwak9mo/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/pr-review-workflow-for-main-branch-mrwak9mo/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills