mcpField
G
github-images

github-images

github.com/connorads開発1843 回インストール2 日前に更新
リポジトリ

github-images について

GitHubのissueやプルリクエストに添付された画像をダウンロードするスキルです。認証が必要なプライベートリポジトリにも対応し、`ghimg`コマンドと`gh api`による代替手順を提供します。

主な機能

  1. 01issueやプルリクエストの画像をダウンロード
  2. 02認証が必要なプライベートリポジトリに対応
  3. 03GitHub URLまたはリポジトリ名と番号を指定
  4. 04`gh api`による手動の代替手順

活用シーン

  1. 01issueに添付されたスクリーンショットの確認
  2. 02プルリクエストに添付された画像の取得
  3. 03プライベートリポジトリの添付画像の収集

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/connorads/dotfiles --skill github-images

インストール後、Claude Code で/github-imagesを入力して読み込まれたか確認します。

詳細

github-images

認証が必要なプライベートリポジトリも含め、GitHub の issue やプルリクエストに添付された画像をダウンロードします。

使用する場面

  • GitHub の issue/PR の URL が共有され、スクリーンショットや画像を確認する必要がある場合
  • プライベートリポジトリから画像の添付ファイルをダウンロードする必要がある場合
  • 「その issue からスクリーンショットを取得して」などと依頼された場合

使用方法

# From a full GitHub URL
ghimg https://github.com/owner/repo/issues/39

# From a PR URL
ghimg https://github.com/owner/repo/pull/42

# Using owner/repo and number separately
ghimg owner/repo 39

# Custom output directory
ghimg owner/repo 39 -o ./screenshots

# Print signed URLs only (pipe-friendly)
ghimg owner/repo 39 --urls-only

デフォルトの出力先:/tmp/ghimg/<owner>/<repo>/<number>/

ダウンロード後、Read を使って画像を確認します(Claude Code は画像ファイルに対応しています)。

手動での代替方法

ghimg が使用できない場合は、gh api を直接使います。

# Fetch body_html with signed image URLs (valid ~5 min)
gh api repos/owner/repo/issues/39 \
  -H "Accept: application/vnd.github.full+json" \
  --jq '.body_html'

# Fetch comment images too
gh api repos/owner/repo/issues/39/comments \
  -H "Accept: application/vnd.github.full+json" \
  --paginate --jq '.[].body_html'

# Download a signed URL
curl -sL -o image.png "https://private-user-images.githubusercontent.com/..."

重要な点:application/vnd.github.full+json を使うと、プライベートな画像の添付ファイル向けに JWT 署名された URL を含む body_html が返されます。これらの URL の有効期限は約 5 分です。

コメント