SuperAPI AI Directory

create-pr

Data & analytics

View repository

Updated 10-15 21:40

About this skill

create-pr

Analyze the changes and create a GitHub PR after a security check.

Prerequisites

  • gh CLI is installed and authenticated
  • The current branch is forked from the base branch

Flow

Step 1: Analyze the changes

git log main..HEAD --oneline
git diff main...HEAD --stat

The base branch follows the repository's conventions (main / develop , etc.).

Step 2: Security check (required)

Perform a security check with the Agent tool.

Check items:

  • Missing authentication/authorization implementation
  • Hardcoding API keys and secrets
  • Possible XSS
  • Lack of input validation
  • OWASP Top 10

If a problem is found, warn the user and advise them to retry creating the PR after addressing it.

Step 3: Generate the PR title

Conventional Commits format: type(scope): subject

Example:

feat(auth): ソーシャルログイン機能を追加
fix(api): レスポンスのエラーハンドリングを修正

Step 4: Generate the PR body

## Summary

- 変更内容の箇条書き

## Test plan

- [ ] 動作確認手順1
- [ ] 動作確認手順2
- [ ] エッジケース確認

## Design

- Figma: (あれば記載)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Step 5: Create the PR

gh pr create \
  --base main \
  --title "type(scope): subject" \
  --body "$(cat <<'EOF'
...
EOF
)"

Return the PR URL to the user.

Notes

  • The base branch follows the repository's conventions
  • If a security issue is unresolved, abort PR creation
  • When creating a Draft PR, add --draft flag (confirm with the user)