Gh
GitHub PRの未解決レビューコメント一覧表示とDraft PR作成を行うスキル。 レビューコメント一覧はread-onlyで、resolve等の操作はしない。 `/gh pr <number>` でresolve済みを除いたopenなレビューコメントを一覧表示する。 `/gh pr <pr_url>` または `/gh pr <number> <owner/repo>` でカレント外リポジトリも指定できる。 PRを作成するときは `gh pr create` を直接叩かず `/gh create` を使う。PRはDraftで作成される。 PRレビュー対応時に「未解決コメントだけ確認したい」場面で使うこと。From its SKILL.md
npx -y skills add xy23d/agent-skills --skill ghAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.1 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
gh: PR レビューコメント操作
/gh pr <number>
指定したPR番号のresolve済みを除いたレビューコメントを一覧表示する。
スクリプトは scripts/pr-comments.sh に同梱済み。スキル起動時に示されるベースディレクトリ("Base directory for this skill: ...")を使って実行する。
bash {BASE_DIR}/scripts/pr-comments.sh <number|pr_url> [owner/repo]
カレントリポジトリ以外のPRは、PR URL を渡すか第2引数に owner/repo を指定する。どちらも無ければカレントリポジトリにフォールバックする。
出力フォーマット
[1] path/to/file.ts (line 42)
@author: コメント本文
---
[2] ...
resolve済みスレッドは表示しない。スレッドが0件の場合は「未解決コメントなし」と表示する。
gh repo view が失敗する場合(リモートなし等)はユーザーに手動入力を求める。
/gh create <worktree_path>
指定したworktreeのカレントブランチからDraft PRを作成する。
スクリプトは scripts/pr-create.sh に同梱済み。スキル起動時に示されるベースディレクトリ("Base directory for this skill: ...")を使って実行する。
bash {BASE_DIR}/scripts/pr-create.sh <worktree_path> <title> <body_file> [base]
title は引数で渡す。body はLLMが一時ファイルに書き出し、そのファイルパスを body_file として渡す。
このサブコマンドは常にDraft PRを作成する。ready PRは作成しない。
base は任意。省略時は gh pr create の既定に従い、baseリポジトリのデフォルトブランチが使われる。
push 前に同じ head ブランチの merged 済み PR があるか確認し、見つかった場合は push も PR 作成も行わずエラーで停止する。エラーには検知した PR 番号と「このブランチは既に merged 済み。新しいブランチを切って、そのブランチで同じコマンドを再実行する」という次アクションが表示される。新しい変更を出す場合は、現在の作業内容を新ブランチへ移してから同じ /gh create コマンドを再実行する。merged PR 確認のための gh 照会自体が失敗した場合は、確認不能だけを理由には停止せず、従来どおり push と Draft PR 作成へ進む。
書き込み系 gh 操作のアカウント切替
複数のGitHubアカウントで gh auth している環境では、owner-account-map に owner account 形式で対応を書くと、owner に応じて指定アカウントへ切り替えてから gh コマンドを実行し、終了後に元のアカウントへ戻す。例: my-org my-github-login。# で始まる行はコメント。未指定の owner は切り替えず、現在の gh auth 状態のまま実行する。実ファイルはマシン固有情報としてGit追跡外で、復元用テンプレートは owner-account-map.template。
リモートへの書き込みを伴う gh 操作(pr edit・pr comment・pr merge 等)は、gh を直接叩かず scripts/gh-as-owner.sh 経由で実行する。
bash {BASE_DIR}/scripts/gh-as-owner.sh <owner/repo> -- gh pr edit <number> --repo <owner/repo> --title <title>
bash {BASE_DIR}/scripts/gh-as-owner.sh <owner/repo> -- gh pr comment <number> --repo <owner/repo> --body-file <file>
What ships with it: 6 files
5.5 KB alongside SKILL.md, 3 of them executable
scripts/
- gh-as-owner.shruns1.3 KB
- .gitignore60 B
- pr-comments.shruns1.8 KB
- pr-create.shruns2.2 KB