github | Skill Performance & Reviews | TopRankSkills

TopRank Skills

Home / Skills / tools / github

github

maintained by d-kimuson

star 0 account_tree 0 verified_user MIT License
bolt View GitHub

name: github description: GitHubと連携した作業を効率的に行うためのスキル

gh cli の利用

Do not use WebFetch for GitHub URLs provided by users, as they often require authentication. Use gh and git commands instead:

  • Check file contents:
    • curl "$(gh api 'repos/<owner>/<repo>/contents/path/to/file.txt?ref=<ref>' | jq -r '.download_url')"
  • Check PR contents:
    • gh pr view <pr_number> --json title,body,headRefName,commits
  • ...etc

Draft PR の作成

Create draft pull request following this systematic process.

### 1. Understand Current State

Identify branches:

# Current branch
git rev-parse --abbrev-ref HEAD

# Base branch from recent checkouts
git reflog -n 30 | grep 'checkout'

Review changes:

# Compare with base branch
git diff <base-branch>...HEAD --stat
git log <base-branch>..HEAD --oneline

# Check for uncommitted changes
git status

Skip these commands if you already understand the changes from current workflow context.

### 2. Commit Management

If uncommitted changes exist:

  • Split into reviewer-friendly commits (logical units)
  • Follow project commit message conventions (check git log for style)
  • Each commit should be self-contained and understandable

If no uncommitted changes: Skip this step.

### 3. Push to Remote
git push -u origin HEAD

Handle push failures:

  • Conflict with remote → git pull --rebase and retry
  • Permission error → Report to user

<pr_creation>

4. Create Pull Request

Check for PR template:

cat $(git rev-parse --show-toplevel)/.github/pull_request_template.md

Fill PR body:

If template exists:

  • Fill each section based on template structure
  • Testing section should include:
    • User actions required for verification
    • "CI Pass" item
    • Manual verification performed (e.g., "Ran build script", "Tested feature X")

If no template exists:

## Summary
[Task overview and context]

## Changes
- [Change 1]
- [Change 2]

## Testing
- [ ] CI Pass
- [ ] Static analysis passed
- [ ] [Other manual verification if performed]

Create draft PR:

gh pr create --draft --base <base-branch> --title "..." --body "..."

Fallback if draft unsupported: Remove --draft flag and create as regular PR. </pr_creation>

### 5. Verification

Check authentication:

gh auth status

Confirm base branch: If reflog doesn't clearly show base branch, ask user for confirmation instead of guessing.

<pr_principles>

Principles

PR is communication: Clear, understandable explanation for reviewers. Convey "why this change is needed" and "what was changed".

Base branch accuracy is critical: PR to wrong base branch causes serious issues. Verify carefully from reflog or ask for confirmation.

Commit granularity matters: Each commit should tell a story. Split logically, not arbitrarily. </pr_principles>

PR の CI チェック

タスクの完了条件としてPRのCI監視と結果を確認する必要がある場合は専用のスクリプトを実行することで待機とレポートを受け取ります。

<skills-directory>/scripts/wait-pr-checks-and-report.sh <PR_NUMBER> [--ignore <workflow_name>]...

VRT 承認待ちなど、手動承認が必要で永続的に pending になるワークフローがある場合は --ignore オプションで除外できます。

# 例: VRT と Manual Approval を無視
<skills-directory>/scripts/wait-pr-checks-and-report.sh 123 --ignore 'Visual Regression' --ignore 'Manual Approval'

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!

Skill Details

GitHub Stars 0
GitHub Forks 0
Created Jan 2026
Last Updated 5个月前
tools tools productivity tools

Related Skills

planning-with-files
chevron_right
agent-browser
chevron_right
building-agents
chevron_right
notebooklm
chevron_right
grafana
chevron_right

Build your own?

Join 12,000+ developers contributing to the Claude ecosystem.