From syou6162-claude-code-commands
Generates and updates GitHub Pull Request titles and descriptions from git diffs, commit logs, and conversation context. Handles CI checkboxes, Japanese body text, and template prep.
npx claudepluginhub syou6162/agent-skillsThis skill uses the workspace's default tool permissions.
Pull Requestのタイトルと説明文を以下の手順で更新してください。
Guides creating complete GitHub pull requests with git status checks, descriptive titles, structured markdown descriptions, labels, issue links, and reviewers using gh CLI. Useful for team code reviews.
Drafts conventional commit PR titles and Shopware 5-section descriptions for core PRs targeting trunk. Analyzes branch against trunk, uses session context, asks for missing info.
Creates GitHub pull requests from branch changes using git analysis and gh CLI, with conventional commit titles and standardized templated descriptions including summary, changes, testing, and checklists.
Share bugs, ideas, or general feedback.
Pull Requestのタイトルと説明文を以下の手順で更新してください。
yasuhisa.esa.io や esa.io ドメインのURLは関連情報セクションにも記載禁止デフォルトブランチの取得
デフォルトブランチを取得:
git symbolic-ref refs/remotes/origin/HEAD --short | cut -d/ -f2
修正内容の確認
デフォルトブランチからの差分を確認:
# <default-branch> には手順1で取得したブランチ名を使用
git diff <default-branch>...HEAD
コミットメッセージの確認
デフォルトブランチからのコミット履歴を確認(本文も含む):
# <default-branch> には手順1で取得したブランチ名を使用
git log <default-branch>..HEAD
説明文ファイルの準備
.github/PULL_REQUEST_TEMPLATE.mdが存在する場合はコピー:
cp .github/PULL_REQUEST_TEMPLATE.md .claude_work/pr_body_draft.md
存在しない場合は新規ファイル作成:
touch .claude_work/pr_body_draft.md
Pull Requestの説明文を作成
.claude_work/pr_body_draft.md)を編集WriteツールまたはEditツールを使用することcat <<EOF > file、echo "..." > fileなど)でファイルを書き込んではいけません5.5. CIチェックボックスの確認と記入(PR template使用時)
重要: PR templateにCIチェックボックスがある場合、PR作成/更新前に必ずCI状態を確認してチェックを記入すること。後からの確認は禁止。
a. CIチェックボックスの検出:
.claude_work/pr_body_draft.md内にCIチェックボックスがあるか確認:
grep -iE '- \[ \].*(CI|test|check|テスト)' .claude_work/pr_body_draft.md
b. PRが既に存在する場合のCI状態確認:
PRが存在するか確認し、存在する場合はCI状態を確認:
# PRが存在するか確認
if gh pr view >/dev/null 2>&1; then
# CI状態を確認
gh pr checks --json name,conclusion
fi
c. CI状態に基づくチェックボックスの記入:
conclusion: SUCCESSまたはSKIPPED)している場合、Editツールでチェックを記入:
- [ ] CI → - [x] CI- [ ] テスト → - [x] テスト- [ ] Tests pass → - [x] Tests pass- [ ]のまま)d. PRが新規作成の場合:
- [ ])のままgh pr checks --watchgh pr edit --body-file .claude_work/pr_body_draft.mdでPR説明文を更新リモートへのプッシュとPull Requestの作成または更新
現在のブランチ名を確認してプッシュ:
# ブランチ名を確認
git rev-parse --abbrev-ref HEAD
# ブランチ名を指定してプッシュ(例: git push origin feature/new-feature)
git push origin <branch-name>
PRの存在確認と作成/更新:
# PRが存在するか確認
if gh pr view >/dev/null 2>&1; then
# PRが存在する場合:更新
gh pr edit --title "修正内容を考慮したタイトル" --body-file .claude_work/pr_body_draft.md
else
# PRが存在しない場合:ドラフトPRを作成
gh pr create --draft --title "修正内容を考慮したタイトル" --body-file .claude_work/pr_body_draft.md
fi
更新後の確認と文字化けチェック
# PRの内容を確認
gh pr view
.claude_work/pr_body_draft.md を確認し、UTF-8エンコーディングで保存されているか確認gh pr edit --body-file .claude_work/pr_body_draft.md で更新gh pr view で確認