File tree Expand file tree Collapse file tree 1 file changed +86
-0
lines changed
Expand file tree Collapse file tree 1 file changed +86
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : create-pr
3+ description : GitHubにPull Requestを作成するスキル。コミット・プッシュ済みの状態で、現在のブランチの変更内容を分析し、適切なタイトルと説明文でPRを作成する。「PRを作成して」「プルリクエストを作って」「PR作って」などのトリガーで発動。
4+ ---
5+
6+ # PR作成スキル
7+
8+ ## 前提条件
9+
10+ - コミット済み
11+ - プッシュ済み
12+ - GitHubリポジトリと連携済み
13+
14+ ## ワークフロー
15+
16+ ### 1. 現在のブランチ情報を取得
17+
18+ ``` bash
19+ git branch --show-current
20+ ```
21+
22+ ### 2. デフォルトブランチを自動検出
23+
24+ ``` bash
25+ gh repo view --json defaultBranchRef --jq ' .defaultBranchRef.name'
26+ ```
27+
28+ ### 3. 変更内容を把握
29+
30+ デフォルトブランチとの差分コミットを取得:
31+
32+ ``` bash
33+ git log < default-branch> ..HEAD --oneline
34+ ```
35+
36+ 詳細な変更内容を確認:
37+
38+ ``` bash
39+ git diff < default-branch> ...HEAD --stat
40+ ```
41+
42+ ### 4. PRを作成
43+
44+ ``` bash
45+ gh pr create --title " <タイトル>" --body " <本文>"
46+ ```
47+
48+ ## PR本文フォーマット(日本語で出力)
49+
50+ ``` markdown
51+ ## Summary
52+ <!-- なぜこの変更が必要か(背景・目的)を1-2文で -->
53+
54+
55+ ## Design
56+ <!-- 設計の全体像をmermaid図で表現 -->
57+
58+ ### コンポーネント構成
59+ ``` mermaid
60+ graph TD
61+ A[ParentComponent] --> B[ChildComponent]
62+ B --> C[SubComponent]
63+ ```
64+
65+ ### データフロー
66+ ``` mermaid
67+ sequenceDiagram
68+ User->>Component: アクション
69+ Component->>Convex: mutation呼び出し
70+ Convex-->>Component: 結果返却
71+ ```
72+
73+ ## Changes
74+ <!-- 主要な変更点を箇条書きで -->
75+ - ** 変更1** : 具体的な説明
76+ - ** 変更2** : 具体的な説明
77+ ```
78+
79+ ## 注意事項
80+
81+ - PRのタイトルと本文は** 日本語** で作成すること
82+ - コミットメッセージを参考にしつつ、読み手にわかりやすい表現にする
83+ - mermaid図は変更内容に応じて適切なものを選択(不要なら省略可)
84+ - コンポーネント構成: 新規コンポーネント追加時
85+ - データフロー: API連携やデータの流れが重要な場合
86+ - 変更が小さい場合はDesignセクションを省略してシンプルに保つ
You can’t perform that action at this time.
0 commit comments