create-pr

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

create-pr

create-pr

変更内容を分析してセキュリティチェック後に GitHub PR を作成します。
Analyzes changes and creates a GitHub PR after performing security checks.

前提条件

Prerequisites

  • gh
    CLI がインストールされ、認証済みであること
  • 現在のブランチがベースブランチからフォークされていること
  • The
    gh
    CLI is installed and authenticated
  • The current branch is forked from the base branch

フロー

Flow

Step 1: 変更内容を分析する

Step 1: Analyze changes

bash
git log main..HEAD --oneline
git diff main...HEAD --stat
ベースブランチはリポジトリの規約に従う(
main
/
develop
等)。
bash
git log main..HEAD --oneline
git diff main...HEAD --stat
Follow the repository's conventions for the base branch (e.g.,
main
/
develop
).

Step 2: セキュリティチェック(必須)

Step 2: Security Check (Mandatory)

Agent ツールでセキュリティ確認を行う。
確認項目:
  • 認証・認可の実装漏れ
  • API キー・シークレットのハードコーディング
  • XSS の可能性
  • 入力バリデーションの欠如
  • OWASP Top 10
問題が見つかった場合はユーザーに警告し、対処後に PR 作成を再試行するよう案内する。
Perform security checks using Agent tools.
Check items:
  • Missing authentication/authorization implementations
  • Hardcoded API keys/secrets
  • Potential XSS vulnerabilities
  • Lack of input validation
  • OWASP Top 10
If issues are found, warn the user and guide them to retry PR creation after resolving the issues.

Step 3: PR タイトルを生成する

Step 3: Generate PR Title

Conventional Commits 形式:
type(scope): subject
例:
feat(auth): ソーシャルログイン機能を追加
fix(api): レスポンスのエラーハンドリングを修正
Conventional Commits format:
type(scope): subject
Examples:
feat(auth): Add social login functionality
fix(api): Fix response error handling

Step 4: PR body を生成する

Step 4: Generate PR Body

markdown
undefined
markdown
undefined

Summary

Summary

  • 変更内容の箇条書き
  • Bullet points of changes

Test plan

Test plan

  • 動作確認手順1
  • 動作確認手順2
  • エッジケース確認
  • Operation verification step 1
  • Operation verification step 2
  • Edge case verification

Design

Design

  • Figma: (あれば記載)
🤖 Generated with Claude Code
undefined
  • Figma: (Include if applicable)
🤖 Generated with Claude Code
undefined

Step 5: PR を作成する

Step 5: Create PR

bash
gh pr create \
  --base main \
  --title "type(scope): subject" \
  --body "$(cat <<'EOF'
...
EOF
)"
ユーザーに PR URL を返す。
bash
gh pr create \
  --base main \
  --title "type(scope): subject" \
  --body "$(cat <<'EOF'
...
EOF
)"
Return the PR URL to the user.

注意事項

Notes

  • ベースブランチはリポジトリの規約に従う
  • セキュリティ問題が未解決の場合は PR 作成を中止する
  • Draft PR を作成する場合は
    --draft
    フラグを追加する(ユーザーに確認)
  • sandbox 環境での
    GIT_SSL_NO_VERIFY=1
    併用
    :詳細は後述の「sandbox 環境での実行」節を参照
  • Follow the repository's conventions for the base branch
  • Abort PR creation if security issues are unresolved
  • Add the
    --draft
    flag when creating a Draft PR (confirm with the user)
  • Use
    GIT_SSL_NO_VERIFY=1
    in sandbox environments
    : Refer to the "Execution in Sandbox Environments" section below for details

sandbox 環境での実行

Execution in Sandbox Environments

sandbox で本スキルを実行する場合、ネットワーク越しの GitHub 操作には
GIT_SSL_NO_VERIFY=1
の併用を検討してください。本スキルの主なリモート操作は
git push
/
gh pr create
で、「リモート書き込み」判定は です。コマンド分類の詳細と TLS 検証無効化の注意事項は
docs/sandbox-tls.md
を参照してください。
When executing this skill in a sandbox environment, consider using
GIT_SSL_NO_VERIFY=1
for GitHub operations over the network. The main remote operations of this skill are
git push
/
gh pr create
, which are classified as requires remote write access. For details on command classification and precautions for disabling TLS verification, refer to
docs/sandbox-tls.md
.