github-pr-best-practices
GitHubでプルリクエストを作成する際に、コミットメッセージの書き方やPRの説明文の形式など、日本語にも対応したベストプラクティスを適用し、より質の高い開発作業を実現するSkill。
📜 元の英語説明(参考)
Best practices for creating GitHub pull requests including conventional commits, PR formatting, and multi-language support (en/ja). Use when creating PRs, writing PR descriptions, or formatting commit messages.
🇯🇵 日本人クリエイター向け解説
GitHubでプルリクエストを作成する際に、コミットメッセージの書き方やPRの説明文の形式など、日本語にも対応したベストプラクティスを適用し、より質の高い開発作業を実現するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o github-pr-best-practices.zip https://jpskill.com/download/16674.zip && unzip -o github-pr-best-practices.zip && rm github-pr-best-practices.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/16674.zip -OutFile "$d\github-pr-best-practices.zip"; Expand-Archive "$d\github-pr-best-practices.zip" -DestinationPath $d -Force; ri "$d\github-pr-best-practices.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
github-pr-best-practices.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
github-pr-best-practicesフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
GitHub Pull Request のベストプラクティス
この Skill は、業界のベストプラクティスと Conventional Commits の標準に従って、高品質なプルリクエストを作成するための包括的なガイダンスを提供します。
機能
- Conventional Commits 形式の PR タイトルを生成
- 適切なセクションで PR の説明を構成
- 複数の言語をサポート(英語/日本語)
- GitHub PR テンプレートの慣例に従う
- よくある PR の間違いを回避
どのような時に使うか
この Skill は、以下のような場合に利用できます。
- 新しいプルリクエストを作成する必要がある場合
- PR のタイトルと説明を記述する必要がある場合
- コミットメッセージをフォーマットする必要がある場合
- Conventional Commits の標準に従う必要がある場合
- 英語または日本語で PR のコンテンツを生成する必要がある場合
PR タイトルの形式
Conventional Commits 標準
PR のタイトルは、Conventional Commits の形式に従う必要があります。
<type>(<scope>): <description>
重要: PR のタイトルまたは説明に絵文字を使用しないでください。
一般的なタイプ
feat: 新機能fix: バグ修正docs: ドキュメントの変更style: コードスタイルの変更(フォーマット、ロジックの変更なし)refactor: コードのリファクタリングtest: テストの追加または更新chore: メンテナンス作業、依存関係
スコープ(オプションですが推奨)
スコープは、コードベースのどの部分が影響を受けるかを示す必要があります。
- モジュール名:
feat(auth): add OAuth2 support - コンポーネント名:
fix(button): resolve click handler issue - コードの領域:
docs(api): update endpoint documentation
説明
- 命令形を使用する("add" で "added" や "adds" ではない)
- 先頭の文字を大文字にしない
- 末尾にピリオドを付けない
- 明確かつ簡潔にする(可能な場合は50文字未満)
例
良い例:
feat(auth): add OAuth2 authentication
fix(api): resolve timeout on large requests
docs(readme): update installation instructions
refactor(database): optimize query performance
test(auth): add integration tests for login flow
chore(deps): update dependencies to latest versions
悪い例:
✨ Add new feature (絵文字が含まれている)
Fixed bug (形式に従っていない、時制が間違っている)
Update. (曖昧、ピリオドがある)
FEAT: NEW STUFF (すべて大文字、曖昧)
PR の説明の構成
標準テンプレート
## Summary
- 変更点の簡単な説明(1〜3個の箇条書き)
- 何となぜに焦点を当て、どのようにではない
- 各ポイントを簡潔に保つ
## Test plan
- [ ] テストケース1
- [ ] テストケース2
- [ ] リグレッションがないことを確認済み
🤖 Generated with [Claude Code](https://claude.com/claude-code)
主要な原則
-
Summary セクション
- 最大1〜3個の箇条書き
- 何が変更されたか、そしてなぜ変更されたかを説明する
- 実装の詳細を避ける(コードに記述されている)
- 現在形を使用する
-
Test Plan セクション
- チェックボックス形式を使用する (
- [ ]) - 具体的なテストシナリオをリストする
- リグレッションテストを含める
- 具体的かつ実行可能にする
- チェックボックス形式を使用する (
-
署名
- 常に Claude Code の署名を含める
- 一番下に配置する
詳細な説明(必要な場合)
複雑な PR の場合は、署名の前に追加のセクションを追加します。
## Summary
- 主な変更点
## Background
変更の背景または動機
## Implementation Details
アプローチの概要
## Test plan
- [ ] テスト
🤖 Generated with [Claude Code](https://claude.com/claude-code)
多言語サポート
英語(デフォルト)
言語が指定されていない場合、または言語が en の場合は英語を使用します。
## Summary
- Add user authentication with OAuth2
- Implement token refresh mechanism
- Add comprehensive error handling
## Test plan
- [ ] Test OAuth2 login flow
- [ ] Test token refresh
- [ ] Test error scenarios
日本語
言語が ja の場合は日本語を使用します。
## 概要
- OAuth2によるユーザー認証を追加
- トークンリフレッシュ機能を実装
- 包括的なエラーハンドリングを追加
## テスト計画
- [ ] OAuth2ログインフローのテスト
- [ ] トークンリフレッシュのテスト
- [ ] エラーシナリオのテスト
言語選択のガイドライン
- 言語が指定されていない場合は、デフォルトで英語を使用する
- 呼び出し元によって指定された言語を使用する
- PR 全体で一貫性を保つ
- 1つの PR 内で言語を混在させない
PR テンプレートの統合
プロジェクトテンプレートの使用
プロジェクトに .github/pull_request_template.md に PR テンプレートがある場合:
- テンプレートファイルを読み取る
- その構造に正確に従う
- セクションヘッダーを変更しない
- カスタムセクションを追加しない
- 必要なすべてのセクションに入力する(該当しない場合は "N/A" を使用)
テンプレートのベストプラクティス
- セクションヘッダーを保持する: テンプレートとまったく同じように保つ
- すべてのセクションを完了する: "N/A" とマークする場合でも
- 順序に従う: テンプレートのセクションの順序を維持する
- 即興で作成しない: テンプレートの構造に固執する
GitHub CLI のベストプラクティス
gh を使用した PR の作成
基本的なコマンド構造:
gh pr create --draft --title "feat(scope): description" --body "$(cat <<'EOF'
## Summary
- Changes
## Test plan
- [ ] Tests
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
重要な注意点:
- 複数行の説明には HEREDOC 形式を使用する
- 作業中の場合は
--draftフラグから開始する - 変数の展開を防ぐために
cat <<'EOF'(引用符付き)を使用する gh pr createは自動的にブランチをプッシュする(手動プッシュは不要)
下書き vs 準備完了
次の場合に下書きとして開始する:
- 作業がまだ進行中の場合
- テストが完了していない場合
- 早期のフィードバックが必要な場合
次の場合に準備完了に変換する:
gh pr ready <PR-NUMBER>
避けるべき一般的な間違い
-
PR 作成前の手動プッシュ
- ❌
git push -u origin branch && gh pr create - ✅
gh pr create(自動的にプッシュを処理)
- ❌
-
絵文字を含める
- ❌
✨ feat: add new feature - ✅
feat: add new feature
- ❌
-
不正な Conventional Commit 形式
- ❌
Add new feature - ✅
feat: add new feature
- ❌
-
曖昧な説明
- ❌
## Summary\n- Updated stuff - ✅
## Summary\n- Add OAuth2 authentication support
- ❌
-
言語引数を無視する
- ❌ 常に英語を使用する
- ✅ 指定された言語 (en/ja) を使用する
-
テンプレート構造の変更
- ❌ カスタムセクションをテンプレートに追加する
- ✅ テンプレート構造に正確に従う
コミットの分析
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
GitHub Pull Request Best Practices
This Skill provides comprehensive guidance for creating high-quality pull requests following industry best practices and conventional commit standards.
Capabilities
- Generate conventional commit formatted PR titles
- Structure PR descriptions with proper sections
- Support multiple languages (English/Japanese)
- Follow GitHub PR template conventions
- Avoid common PR mistakes
When to Use
Use this Skill when you need to:
- Create a new pull request
- Write PR titles and descriptions
- Format commit messages
- Follow conventional commit standards
- Generate PR content in English or Japanese
PR Title Format
Conventional Commits Standard
PR titles must follow Conventional Commits format:
<type>(<scope>): <description>
Important: NO emojis in PR titles or descriptions.
Common Types
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, no logic change)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks, dependencies
Scope (Optional but Recommended)
The scope should indicate what part of the codebase is affected:
- Module name:
feat(auth): add OAuth2 support - Component name:
fix(button): resolve click handler issue - Area of code:
docs(api): update endpoint documentation
Description
- Use imperative mood ("add" not "added" or "adds")
- No capitalization of first letter
- No period at the end
- Clear and concise (under 50 characters when possible)
Examples
Good:
feat(auth): add OAuth2 authentication
fix(api): resolve timeout on large requests
docs(readme): update installation instructions
refactor(database): optimize query performance
test(auth): add integration tests for login flow
chore(deps): update dependencies to latest versions
Bad:
✨ Add new feature (has emoji)
Fixed bug (not following format, wrong tense)
Update. (vague, has period)
FEAT: NEW STUFF (all caps, vague)
PR Description Structure
Standard Template
## Summary
- Brief description of changes (1-3 bullet points)
- Focus on what and why, not how
- Keep each point concise
## Test plan
- [ ] Test case 1
- [ ] Test case 2
- [ ] Verified no regressions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Key Principles
-
Summary Section
- 1-3 bullet points maximum
- Explain what changed and why
- Avoid implementation details (those are in the code)
- Use present tense
-
Test Plan Section
- Use checkbox format (
- [ ]) - List specific test scenarios
- Include regression testing
- Be specific and actionable
- Use checkbox format (
-
Signature
- Always include the Claude Code signature
- Placed at the bottom
Detailed Explanation (When Needed)
For complex PRs, add additional sections before the signature:
## Summary
- Main changes
## Background
Context or motivation for changes
## Implementation Details
High-level overview of approach
## Test plan
- [ ] Tests
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Multi-Language Support
English (Default)
Use English when no language is specified or when language is en:
## Summary
- Add user authentication with OAuth2
- Implement token refresh mechanism
- Add comprehensive error handling
## Test plan
- [ ] Test OAuth2 login flow
- [ ] Test token refresh
- [ ] Test error scenarios
Japanese
Use Japanese when language is ja:
## 概要
- OAuth2によるユーザー認証を追加
- トークンリフレッシュ機能を実装
- 包括的なエラーハンドリングを追加
## テスト計画
- [ ] OAuth2ログインフローのテスト
- [ ] トークンリフレッシュのテスト
- [ ] エラーシナリオのテスト
Language Selection Guidelines
- Default to English if no language specified
- Use the language specified by the caller
- Be consistent throughout the entire PR
- Don't mix languages within a single PR
PR Template Integration
Using Project Templates
If the project has a PR template at .github/pull_request_template.md:
- Read the template file
- Follow its structure exactly
- Don't modify section headers
- Don't add custom sections
- Fill in all required sections (use "N/A" if not applicable)
Template Best Practices
- Preserve section headers: Keep them exactly as in template
- Complete all sections: Even if marking as "N/A"
- Follow order: Maintain the template's section order
- Don't improvise: Stick to template structure
GitHub CLI Best Practices
Creating PRs with gh
Basic command structure:
gh pr create --draft --title "feat(scope): description" --body "$(cat <<'EOF'
## Summary
- Changes
## Test plan
- [ ] Tests
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
Important notes:
- Use HEREDOC format for multi-line descriptions
- Start with
--draftflag for work in progress - Use
cat <<'EOF'(with quotes) to prevent variable expansion gh pr createautomatically pushes the branch (no manual push needed)
Draft vs Ready
Start as draft when:
- Work is still in progress
- Tests are not complete
- Need early feedback
Convert to ready when:
gh pr ready <PR-NUMBER>
Common Mistakes to Avoid
-
Manual Push Before PR Creation
- ❌
git push -u origin branch && gh pr create - ✅
gh pr create(handles push automatically)
- ❌
-
Including Emojis
- ❌
✨ feat: add new feature - ✅
feat: add new feature
- ❌
-
Incorrect Conventional Commit Format
- ❌
Add new feature - ✅
feat: add new feature
- ❌
-
Vague Descriptions
- ❌
## Summary\n- Updated stuff - ✅
## Summary\n- Add OAuth2 authentication support
- ❌
-
Ignoring Language Argument
- ❌ Always using English
- ✅ Using specified language (en/ja)
-
Modifying Template Structure
- ❌ Adding custom sections to template
- ✅ Following template structure exactly
Analyzing Commits for PR
Use All Commits, Not Just Latest
When creating a PR, analyze ALL commits from the merge base:
# Get merge base
MERGE_BASE=$(git merge-base origin/main HEAD)
# Get ALL commits from merge base
git log $MERGE_BASE..HEAD
Why this matters:
- PR should represent all work on the branch
- Latest commit might not capture full scope
- Users expect PR to reflect entire branch
Extracting PR Content from Commits
# Get commit messages for summary
git log --format="- %s" $MERGE_BASE..HEAD
# Get changed files for context
git diff --name-only $MERGE_BASE..HEAD
# Get commit count
git log --oneline $MERGE_BASE..HEAD | wc -l
Quality Checklist
Before creating a PR, verify:
- [ ] Title follows conventional commit format
- [ ] No emojis in title or description
- [ ] Summary is clear and concise (1-3 points)
- [ ] Test plan is specific and actionable
- [ ] Language matches specified preference
- [ ] Template structure is followed (if exists)
- [ ] All commits are analyzed (not just latest)
- [ ] Claude Code signature is included
Related Skills
git-analysis: Use to gather commit and branch information- Project-specific templates: Check
.github/pull_request_template.md
Additional Resources
See REFERENCE.md for:
- Detailed conventional commits specification
- Language-specific examples
- Advanced PR patterns
- GitHub CLI command reference