gh-cli
GitHub CLIを使い、課題、プルリクエスト、リリース、アクション、Gist、リポジトリ管理など、あらゆるGitHub操作をコマンドラインから実行するSkill。
📜 元の英語説明(参考)
GitHub CLI (gh) mastery for issues, PRs, releases, actions, gists, and repo management. Use when user asks to "create a PR", "list issues", "check CI status", "create a release", "view workflow runs", "create a gist", "clone a repo", "fork a repo", or any GitHub operations from the command line.
🇯🇵 日本人クリエイター向け解説
GitHub CLIを使い、課題、プルリクエスト、リリース、アクション、Gist、リポジトリ管理など、あらゆるGitHub操作をコマンドラインから実行するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
GitHub CLI
ターミナルを離れることなく、GitHub 操作のために gh CLI を習得しましょう。
コアコマンド
プルリクエスト
# 現在のブランチからPRを作成
gh pr create --title "Title" --body "Description"
# テンプレートを使用してPRを作成
gh pr create --fill # コミットメッセージを使用
# ドラフトPRを作成
gh pr create --draft
# PRを一覧表示
gh pr list
gh pr list --state all --author @me
# PRを表示/チェックアウト
gh pr view 123
gh pr checkout 123
# PRをマージ
gh pr merge 123 --squash --delete-branch
# PRをレビュー
gh pr review 123 --approve
gh pr review 123 --request-changes --body "Please fix X"
イシュー
# イシューを作成
gh issue create --title "Bug" --body "Description"
gh issue create --label bug,urgent --assignee @me
# イシューを一覧表示
gh issue list
gh issue list --label "bug" --state open
# 表示/クローズ
gh issue view 456
gh issue close 456 --comment "Fixed in #123"
リリース
# リリースを作成
gh release create v1.0.0 --title "v1.0.0" --notes "Release notes"
# 自動生成されたノートで作成
gh release create v1.0.0 --generate-notes
# アセットをアップロード
gh release create v1.0.0 ./dist/*.zip
# リリースを一覧表示
gh release list
Actions/ワークフロー
# ワークフローの実行を一覧表示
gh run list
# 実行の詳細を表示
gh run view 12345
# 実行中のワークフローを監視
gh run watch
# 失敗したジョブを再実行
gh run rerun 12345 --failed
# ワークフローをトリガー
gh workflow run deploy.yml -f environment=production
リポジトリ
# クローン
gh repo clone owner/repo
# 新しいリポジトリを作成
gh repo create my-repo --public --clone
# フォーク
gh repo fork owner/repo --clone
# リポジトリを表示
gh repo view owner/repo --web
Gists
# Gistを作成
gh gist create file.txt --public
gh gist create file1.txt file2.txt --desc "My gist"
# Gistを一覧表示
gh gist list
# Gistを編集
gh gist edit <gist-id>
高度なパターン
APIアクセス
# GETリクエスト
gh api repos/owner/repo/issues
# POSTリクエスト
gh api repos/owner/repo/issues -f title="Bug" -f body="Details"
# GraphQL
gh api graphql -f query='{ viewer { login } }'
# ページネーション
gh api repos/owner/repo/issues --paginate
JSON出力とjq
# PRをJSONとして取得
gh pr view 123 --json title,state,author
# 特定のフィールドで一覧表示
gh pr list --json number,title,author --jq '.[] | "\(.number): \(.title)"'
エイリアス
# エイリアスを作成
gh alias set pv 'pr view'
gh alias set co 'pr checkout'
# エイリアスを使用
gh pv 123
リファレンス
詳細なコマンドオプションについては、references/commands.md を参照してください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
GitHub CLI
Master the gh CLI for GitHub operations without leaving the terminal.
Core Commands
Pull Requests
# Create PR from current branch
gh pr create --title "Title" --body "Description"
# Create PR with template
gh pr create --fill # Uses commit messages
# Create draft PR
gh pr create --draft
# List PRs
gh pr list
gh pr list --state all --author @me
# View/checkout PR
gh pr view 123
gh pr checkout 123
# Merge PR
gh pr merge 123 --squash --delete-branch
# Review PR
gh pr review 123 --approve
gh pr review 123 --request-changes --body "Please fix X"
Issues
# Create issue
gh issue create --title "Bug" --body "Description"
gh issue create --label bug,urgent --assignee @me
# List issues
gh issue list
gh issue list --label "bug" --state open
# View/close
gh issue view 456
gh issue close 456 --comment "Fixed in #123"
Releases
# Create release
gh release create v1.0.0 --title "v1.0.0" --notes "Release notes"
# Create with auto-generated notes
gh release create v1.0.0 --generate-notes
# Upload assets
gh release create v1.0.0 ./dist/*.zip
# List releases
gh release list
Actions/Workflows
# List workflow runs
gh run list
# View run details
gh run view 12345
# Watch running workflow
gh run watch
# Rerun failed jobs
gh run rerun 12345 --failed
# Trigger workflow
gh workflow run deploy.yml -f environment=production
Repository
# Clone
gh repo clone owner/repo
# Create new repo
gh repo create my-repo --public --clone
# Fork
gh repo fork owner/repo --clone
# View repo
gh repo view owner/repo --web
Gists
# Create gist
gh gist create file.txt --public
gh gist create file1.txt file2.txt --desc "My gist"
# List gists
gh gist list
# Edit gist
gh gist edit <gist-id>
Advanced Patterns
API Access
# GET request
gh api repos/owner/repo/issues
# POST request
gh api repos/owner/repo/issues -f title="Bug" -f body="Details"
# GraphQL
gh api graphql -f query='{ viewer { login } }'
# Pagination
gh api repos/owner/repo/issues --paginate
JSON Output & jq
# Get PR as JSON
gh pr view 123 --json title,state,author
# List with specific fields
gh pr list --json number,title,author --jq '.[] | "\(.number): \(.title)"'
Aliases
# Create alias
gh alias set pv 'pr view'
gh alias set co 'pr checkout'
# Use alias
gh pv 123
Reference
For detailed command options: references/commands.md