home/dot_agents/skills/create-pr/SKILL.md
ブランチの変更をGitHub PRとして作成する。baseBranch引数でベースブランチを指定。PRタイトル・説明文を生成しghコマンドで投稿する。
npx skillsauth add kryota-dev/dotfiles create-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
このタスクは、現在のブランチの変更内容を分析し、Pull Requestの下書きを自動生成してGitHubに投稿します。git diffによる差分分析、PRテンプレートの活用、GitHub CLIを使用したPR作成を行います。
gh) がインストールされていることgh auth login)git コマンドが利用可能であること以下のコマンドを使用してブランチ情報を取得してください:
git branch --show-currentgit remote get-url origin からowner/repoを抽出gh api user --jq .login でユーザー名を取得現在のブランチとベースブランチの差分を取得し、分析してください:
# ファイル一覧の取得
git diff --name-only origin/${BASE_BRANCH}..HEAD
# 詳細な差分の取得
git diff origin/${BASE_BRANCH}..HEAD
# コミット履歴の取得
git log --oneline origin/${BASE_BRANCH}..HEAD
PR作成前に既存のPRがないか確認してください:
gh pr list --head $(git branch --show-current) --state open --json number,title,url
AskUserQuestionツールを使用してユーザーに確認を取ること
以下の情報を分析してPR下書きを作成してください:
@.github/PULL_REQUEST_TEMPLATE.md を読み込み、差分分析結果に基づいてテンプレート内の項目を自動的に埋めてください。
以下の手順で下書きファイルを保存してください:
ディレクトリ構造の作成:
.claude/pull-requests/drafts/{branchName}/
/が含まれる場合は、ディレクトリを分割feature/create-app → .claude/pull-requests/drafts/feature/create-app/ファイル名の生成:
{timestamp}.md
timestamp: YYYYMMDD-HHMMSS形式(例: 20241225-143022)完全なパス例:
.claude/pull-requests/drafts/feature/create-app/20241225-143022.md
.claude/pull-requests/drafts/hotfix-bug/20241225-150315.md
下書きファイルを作成後、以下の確認を行ってください:
AskUserQuestionツールを使用してユーザーに確認を取ること
ユーザーが「はい」と回答した場合のみ、以下を実行してください:
PR作成の実行:
gh pr create \
--title "自動生成されたPRタイトル" \
--body-file .claude/pull-requests/drafts/{branchName}/{timestamp}.md \
--base "${BASE_BRANCH}" \
--head "${CURRENT_BRANCH}" \
--assignee "@me"
--title: 自動生成されたPRタイトル--body-file: 下書きファイルのパス--base: ユーザーが指定したベースブランチ名--head: 現在のブランチ名--assignee "@me": 作成者を自動アサインPR番号の取得:
PR作成コマンドの出力URLからPR番号を抽出、またはJSON形式で取得:
PR_INFO=$(gh pr create --title "..." --body-file "..." --base "..." --head "..." --assignee "@me" --json number,url,title)
PR_NUMBER=$(echo "$PR_INFO" | jq -r '.number')
PR_URL=$(echo "$PR_INFO" | jq -r '.url')
下書きファイルのリネーム:
.claude/pull-requests/drafts/{branchName}/{timestamp}.md.claude/pull-requests/{prNumber}.mdブランチディレクトリの削除: 下書きファイルのリネーム完了後、空になったブランチディレクトリのみを削除
.claude/pull-requests/drafts/{branchName}/ が空の場合のみ/が含まれる場合は、最深のディレクトリから順に空かどうかを確認feature/create-app の場合
.claude/pull-requests/drafts/feature/create-app/ が空なら削除.claude/pull-requests/drafts/feature/ が空なら削除(上位ディレクトリも確認)feature/issue-123 → #123fix: resolve #456 → #456TBDと記載feat: {機能名}fix: {修正内容}docs: {更新内容}refactor: {対象範囲}変更内容に応じて以下のチェック項目を生成:
[ ] コードレビューが完了している[ ] テストケースが追加されている[ ] デザインレビューが完了している[ ] API仕様書が更新されている[ ] 環境設定の影響を確認済み.github/PULL_REQUEST_TEMPLATE.mdを必ず読み込んで使用すること✅ **PR作成完了**
- **PR番号**: #123
- **タイトル**: feat: ユーザー認証機能の追加
- **URL**: https://github.com/owner/repo/pull/123
- **下書きファイル**: `.claude/pull-requests/123.md`
- **ベースブランチ**: main
- **ヘッドブランチ**: feature/auth
PRが正常に作成されました。レビューをお待ちください。
📝 **PR下書き保存完了**
- **下書きファイル**: `.claude/pull-requests/drafts/feature/auth/20241225-143022.md`
- **ブランチ**: feature/auth
- **ベースブランチ**: main
下書きが保存されました。後でPRを作成する場合は、再度このタスクを実行してください。
development
`cc-code-review` エージェントを起動して独立したコンテキストでコードレビューを実行する。 現在のセッションのバイアスのないフレッシュな視点で、プロジェクトの CLAUDE.md を踏まえたレビューを行う。 トリガー: "cc-code-review", "ccでレビュー", "別の視点でレビュー", "セカンドオピニオン" 使用場面: (1) PRのコードレビュー (2) ブランチ差分のレビュー (3) 特定ファイルのレビュー (4) 現在の変更のレビュー
tools
Comprehensive guide for the `wtp` (Worktree Plus) CLI by satococoa — an enhanced Git worktree manager. Use this whenever the user wants to create, list, remove, or navigate Git worktrees with wtp, mentions `wtp add`/`wtp cd`/`wtp list`/`wtp remove`/`wtp exec`, asks about automatic worktree paths from branch names, post-create hooks (copy/symlink/command) in `.wtp.yml`, branch tracking for worktrees, or shell integration (`wtp shell-init`, `wtp hook`, tab completion, auto-cd). Trigger this even when the user just describes the workflow — e.g. 'spin up a worktree for this feature branch', 'jump to my auth worktree', 'clean up the worktree and its branch' — without naming wtp explicitly, as long as wtp is the available tool.
tools
Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector).
data-ai
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.