💬 Gh Fix Ci
GitHubのプルリクエスト(PR)で自動テスト(
📺 まず動画で見る(YouTube)
▶ 【最新版】Claude(クロード)完全解説!20以上の便利機能をこの動画1本で全て解説 ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
Inspect GitHub PR checks with gh, pull failing GitHub Actions logs, summarize failure context, then create a fix plan and implement after user approval. Use when a user asks to debug or fix failing PR CI/CD checks on GitHub Actions and wants a plan + code changes; for external checks (e.g., Buildkite), only report the details URL and mark them out of scope.
🇯🇵 日本人クリエイター向け解説
GitHubのプルリクエスト(PR)で自動テスト(
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o gh-fix-ci.zip https://jpskill.com/download/386.zip && unzip -o gh-fix-ci.zip && rm gh-fix-ci.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/386.zip -OutFile "$d\gh-fix-ci.zip"; Expand-Archive "$d\gh-fix-ci.zip" -DestinationPath $d -Force; ri "$d\gh-fix-ci.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
gh-fix-ci.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
gh-fix-ciフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 この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
💬 こう話しかけるだけ — サンプルプロンプト
- › gh-fix-ci の使い方を教えて
- › gh-fix-ci で何ができるか具体例で見せて
- › gh-fix-ci を初めて使う人向けにステップを案内して
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[Skill 名] gh-fix-ci
Gh Pr チェック計画の修正
概要
gh を使用して失敗している PR チェックを特定し、GitHub Actions のログから対処可能な失敗を取得し、失敗のスニペットを要約し、その後修正計画を提案し、明示的な承認後に実装します。
- 修正計画の草案作成と承認には
planスキルに依存します。
前提条件: gh が認証されていることを確認してください(例: gh auth login を一度実行します)。その後、gh コマンドが成功するように、昇格された権限(workflow/repo スコープを含める)で gh auth status を実行してください。サンドボックスが gh auth status をブロックする場合は、sandbox_permissions=require_escalated を付けて再実行してください。
入力
repo: リポジトリ内のパス(デフォルト.)pr: PR 番号または URL(オプション; デフォルトは現在のブランチの PR)- リポジトリホストに対する
gh認証
クイックスタート
python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "<number-or-url>"- 要約のために機械可読な出力が必要な場合は
--jsonを追加してください。
ワークフロー
- gh 認証を確認します。
gh auth loginを実行した後、昇格されたスコープ(workflow/repo)でリポジトリ内でgh auth statusを実行します。- サンドボックス化された認証ステータスが失敗した場合は、ネットワーク/キーリングアクセスを許可するために
sandbox_permissions=require_escalatedを付けてコマンドを再実行します。 - 認証されていない場合は、続行する前にユーザーにログインを依頼します。
- PR を解決します。
- 現在のブランチの PR を優先します:
gh pr view --json number,url。 - ユーザーが PR 番号または URL を提供した場合は、それを直接使用します。
- 現在のブランチの PR を優先します:
- 失敗しているチェックを検査します(GitHub Actions のみ)。
- 推奨: バンドルされたスクリプトを実行します(gh フィールドのずれやジョブログのフォールバックを処理します):
python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "<number-or-url>"- 機械可読な出力には
--jsonを追加します。
- 手動フォールバック:
gh pr checks <pr> --json name,state,bucket,link,startedAt,completedAt,workflow- フィールドが拒否された場合は、
ghが報告する利用可能なフィールドで再実行します。
- フィールドが拒否された場合は、
- 失敗している各チェックについて、
detailsUrlから実行 ID を抽出し、以下を実行します:gh run view <run_id> --json name,workflowName,conclusion,status,url,event,headBranch,headShagh run view <run_id> --log
- 実行ログがまだ進行中であると示している場合は、ジョブログを直接取得します:
gh api "/repos/<owner>/<repo>/actions/jobs/<job_id>/logs" > "<path>"
- 推奨: バンドルされたスクリプトを実行します(gh フィールドのずれやジョブログのフォールバックを処理します):
- GitHub Actions 以外のチェックをスコープします。
detailsUrlが GitHub Actions の実行でない場合は、外部としてラベル付けし、URL のみを報告します。- Buildkite やその他のプロバイダーは試行せず、ワークフローを簡潔に保ちます。
- ユーザーに失敗を要約します。
- 失敗しているチェック名、実行 URL(もしあれば)、および簡潔なログスニペットを提供します。
- ログの欠落を明示的に指摘します。
- 計画を作成します。
planスキルを使用して簡潔な計画を作成し、承認を要求します。
- 承認後に実装します。
- 承認された計画を適用し、差分/テストを要約し、PR を開くことについて尋ねます。
- ステータスを再確認します。
- 変更後、関連するテストと
gh pr checksを再実行して確認することを提案します。
- 変更後、関連するテストと
バンドルされたリソース
scripts/inspect_pr_checks.py
失敗している PR チェックを取得し、GitHub Actions のログをプルし、失敗スニペットを抽出します。失敗が残っている場合はゼロ以外の値で終了するため、自動化で使用できます。
使用例:
python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "123"python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "https://github.com/org/repo/pull/123" --jsonpython "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --max-lines 200 --context 40
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Gh Pr Checks Plan Fix
Overview
Use gh to locate failing PR checks, fetch GitHub Actions logs for actionable failures, summarize the failure snippet, then propose a fix plan and implement after explicit approval.
- Depends on the
planskill for drafting and approving the fix plan.
Prereq: ensure gh is authenticated (for example, run gh auth login once), then run gh auth status with escalated permissions (include workflow/repo scopes) so gh commands succeed. If sandboxing blocks gh auth status, rerun it with sandbox_permissions=require_escalated.
Inputs
repo: path inside the repo (default.)pr: PR number or URL (optional; defaults to current branch PR)ghauthentication for the repo host
Quick start
python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "<number-or-url>"- Add
--jsonif you want machine-friendly output for summarization.
Workflow
- Verify gh authentication.
- Run
gh auth statusin the repo with escalated scopes (workflow/repo) after runninggh auth login. - If sandboxed auth status fails, rerun the command with
sandbox_permissions=require_escalatedto allow network/keyring access. - If unauthenticated, ask the user to log in before proceeding.
- Run
- Resolve the PR.
- Prefer the current branch PR:
gh pr view --json number,url. - If the user provides a PR number or URL, use that directly.
- Prefer the current branch PR:
- Inspect failing checks (GitHub Actions only).
- Preferred: run the bundled script (handles gh field drift and job-log fallbacks):
python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "<number-or-url>"- Add
--jsonfor machine-friendly output.
- Manual fallback:
gh pr checks <pr> --json name,state,bucket,link,startedAt,completedAt,workflow- If a field is rejected, rerun with the available fields reported by
gh.
- If a field is rejected, rerun with the available fields reported by
- For each failing check, extract the run id from
detailsUrland run:gh run view <run_id> --json name,workflowName,conclusion,status,url,event,headBranch,headShagh run view <run_id> --log
- If the run log says it is still in progress, fetch job logs directly:
gh api "/repos/<owner>/<repo>/actions/jobs/<job_id>/logs" > "<path>"
- Preferred: run the bundled script (handles gh field drift and job-log fallbacks):
- Scope non-GitHub Actions checks.
- If
detailsUrlis not a GitHub Actions run, label it as external and only report the URL. - Do not attempt Buildkite or other providers; keep the workflow lean.
- If
- Summarize failures for the user.
- Provide the failing check name, run URL (if any), and a concise log snippet.
- Call out missing logs explicitly.
- Create a plan.
- Use the
planskill to draft a concise plan and request approval.
- Use the
- Implement after approval.
- Apply the approved plan, summarize diffs/tests, and ask about opening a PR.
- Recheck status.
- After changes, suggest re-running the relevant tests and
gh pr checksto confirm.
- After changes, suggest re-running the relevant tests and
Bundled Resources
scripts/inspect_pr_checks.py
Fetch failing PR checks, pull GitHub Actions logs, and extract a failure snippet. Exits non-zero when failures remain so it can be used in automation.
Usage examples:
python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "123"python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "https://github.com/org/repo/pull/123" --jsonpython "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --max-lines 200 --context 40