SuperAPI AI Directory

implement-review-pr

Coding & development

View repository

Updated 10-16 08:49

About this skill

implement-review-pr

Review a GitHub PR's CI status, code quality, and security.

Prerequisites

  • gh The CLI is installed and authenticated

Flow

Step 1: Get PR information

gh pr view <number-or-url>
gh pr diff <number-or-url>

Step 2: Check CI status

gh pr checks <number-or-url>

Check whether all checks pass. If any fail, report the details to the user.

Step 3: Check the PR title

Check compliance with the Conventional Commits format:

  • type(scope): subject format
  • Valid type (feat / fix / docs / refactor / test / chore / style / build / ci / perf)
  • Subject is within 72 characters

Step 4: Code quality review

Delegate to the Agent tool to check code quality:

Check items:

  • Architecture compliance (component hierarchy, placement location)
  • Naming conventions
  • Import rules
  • Unnecessary re-render risks
  • Test coverage

Step 5: Security review (required)

Delegate to the Agent tool to check security:

Check items:

  • OWASP Top 10
  • API key/secret leakage
  • Input validation
  • Authentication/authorization implementation
  • Handling of sensitive data

Step 6: Generate a review report

## PR #123: feat(auth): 新機能追加

### CI Status
✅ All checks passed

### Title Compliance
✅ Conventional Commits 準拠

### Code Review
✅ 問題なし
⚠️ 要改善: `src/Foo.tsx:10` — 説明
❌ 要修正: `src/Bar.tsx:20` — 説明

### Security Audit
✅ セキュリティ問題なし
❌ [HIGH] `src/api.ts:5` — 説明

Step 7: Post a review comment to GitHub (optional)

Post after confirming with the user:

gh pr review <number> --comment --body "..."
# または
gh pr review <number> --approve
gh pr review <number> --request-changes --body "..."

Notes

  • If there is a security issue (HIGH), recommend request-changes
  • If CI is failing, recommend blocking the review