本文へ移動
cccskills
無料GitHub で公開日本語紹介

GitHub CLI usage

`gh`でGitHubのIssue、プルリクエスト、リポジトリを読み取り専用で検索・確認し、必要な情報を絞り込む方法を案内します。

原文原文の説明を見る

Instructions for using the `gh` command to query and inspect GitHub state safely.

carbon-language/carbon-langスター 33,929(GitHub 33,929 + cccskills 0)
連携ツールGitHub

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • Issueの内容や状態を確認したいとき
  • PRの差分やチェック状況を見たいとき
  • GitHub上のコードやリポジトリを検索したいとき
  • APIから必要な情報を読み取りたいとき

日本語での紹介

できること

ghを使ってGitHub上のIssueやプルリクエスト、リポジトリ、コードを検索・確認する手順を案内します。IssueやPRの一覧、個別の内容や差分、状態の確認に加え、検索語を指定した調査にも使えます。通常のコマンドで取得できない情報は、gh apiからREST APIまたはGraphQLを読み取り専用で呼び出して調べます。ページ分割された結果の取得や、--json、--jq、--templateによる絞り込み・整形の例も含まれています。

こんなときに便利

変更を加える前に、既存のIssueやPR、リポジトリの状態を確かめたいときに向いています。GitHub上の情報をコマンドで探したい人や、APIから必要な項目だけ取得したい人にも役立ちます。

使い方の例

  • 「このIssueの内容と関連するオープンIssueを調べて」
  • 「このPRの差分と現在の状態を確認して」
  • 「リポジトリのコントリビューターをAPIで取得して」

注意点

ghによるGitHubの状態変更は禁止されており、apiもGETリクエストに限られます。ghコマンドを使える環境が必要です。既定リポジトリの設定変更は人が行います。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

資料チェック

SKILL.md の記述から、注意が要る操作と導入の前提を AI が確認しました。点数は実際に動かした結果(実行検証)だけで付けています。

安全面送信・削除・コマンド実行などの扱いが明示されているか
A良好状態変更を禁止し、APIをGET限定と明記している。
導入のしやすさ必要なツールや API キーが少ないか、書かれているか
B一部不足`gh`の利用を前提とするが、導入手順は記載されていない。

点数には入れていません。 2026年10月26日 時点で AI(OpenAI Codex)が判定しました。目安なので、入れる前に原文も確認してください。

評価が違うと思ったら、見直しを依頼する

どの項目が、なぜ違うと思うかを書いてください。ログインは不要です。内容を SKILL.md と照らし合わせて評価を作り直し、この欄に反映します。

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

含まれるファイル(1)

  • SKILL.md4.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

GitHub CLI usage

<!-- Part of the Carbon Language project, under the Apache License v2.0 with LLVM Exceptions. See /LICENSE for license information. SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -->

This skill provides instructions for using the GitHub CLI (gh) to query, inspect, and search GitHub state (issues, pull requests, repositories) for the Carbon project.

Safety First: Read-Only Usage

[!IMPORTANT] AI assistants MUST NOT use the gh tool to modify any GitHub project state. Do NOT run commands that create, edit, delete, label, comment on, or merge issues, pull requests, releases, or any other resources.

Allowed Verbs

  • list
  • view
  • search
  • status
  • api (Only with GET requests)

Prohibited Verbs

  • create
  • edit
  • delete
  • merge
  • reopen
  • close
  • comment
  • label

Repository Configuration

The gh tool interacts with a default repository when run within a local check out. For this project, the default repository is expected to be carbon-language/carbon-lang.

Verifying Default Repository

To verify the current default repository configuration:

gh repo view

The output should indicate the repository is carbon-language/carbon-lang.

Correcting Misconfigurations

If the default repository is misconfigured (for example, pointing to a personal fork or a different repository), the human operator must correct it.

[!IMPORTANT] AI Assistants MUST NOT attempt to mutate gh configuration or run commands that change the default repository (such as gh repository set-default).

Instruct the human operator to run the following command to select the correct default repository:

gh repo set-default

The operator will be prompted to select the correct repository (e.g., carbon-language/carbon-lang) from the available remotes.

Common Query Commands

Issues

  • List issues: gh issue list
  • View specific issue: gh issue view <number>
  • Search issues: gh issue search "<query>"
    • Example: gh issue search "crash" --state open

Pull Requests

  • List PRs: gh pr list
  • View specific PR: gh pr view <number>
  • View PR diff: gh pr diff <number>
  • Check PR status: gh pr status

Search

  • Search code: gh search code "<query>"
  • Search repositories: gh search repos "<query>"

Advanced Usage: GitHub API

For queries that are not supported by standard gh commands, you can use the gh api command to query the GitHub REST or GraphQL APIs.

REST API

Query the REST API using paths relative to the API root.

  • List contributors:

    gh api repos/carbon-language/carbon-lang/contributors
    
  • List issue comments:

    gh api repos/carbon-language/carbon-lang/issues/<issue_number>/comments
    

GraphQL API

For complex queries, use GraphQL to fetch exactly the data needed.

  • Get repository information:

    gh api graphql -f query='
      query {
        repository(owner: "carbon-language", name: "carbon-lang") {
          description
          stargazerCount
        }
      }
    '
    

Pagination

Use the --paginate flag to automatically fetch all pages of results.

gh api --paginate repos/carbon-language/carbon-lang/issues

Filtering and Formatting

Use --json to request JSON output, and --jq or --template to filter or format the results.

  • List PR titles and authors:

    gh pr list --json title,author --jq '.[] | "\(.title) by \(.author.login)"'
    
  • Format with Go templates:

    gh issue list --template '{{range .}}{{.number}} - {{.title}}{{"\n"}}{{end}}'
    

Documentation References

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Accessing GitHub issues

無料概要あり

コマンドラインからGitHub issueの本文やコメントを読み取り専用で確認し、URLや番号から対象リポジトリを指定する手順を案内します。

  • issueの本文とコメントを読みたいとき
  • URLからissueの内容を確認したいとき
  • 別リポジトリのissueを参照したいとき
carbon-language/carbon-lang3.4万2026年10月26日 更新

Agent tools

無料概要あり

AIアシスタントがCarbonのコードベースを扱う際に、専用ツールでファイルを閲覧・検索・編集し、一時ファイルを管理するためのルールを示します。

  • Carbonのファイルを規則に沿って検索したいとき
  • 専用ツールを使ったファイル編集を確認したいとき
  • 一時ファイルの置き場所と削除ルールを確認したいとき
carbon-language/carbon-lang3.4万2026年10月26日 更新

Bazel usage

無料概要あり

Bazeliskを使ったCarbonプロジェクトのビルド、テスト、実行、デバッグの基本手順を確認し、対象を絞った検証やASanの利用方法も把握できます。

  • Carbonのコードをビルドしたいとき
  • 変更箇所に関係するテストを実行したいとき
  • Bazelで作ったバイナリを起動したいとき
carbon-language/carbon-lang3.4万2026年10月26日 更新

Builtin functions

無料概要あり

Carbonコンパイラに組み込み関数を追加する際の登録、型シグネチャ検証、定数評価、LLVMコード生成、テスト方法を案内します。

  • 組み込み関数を登録したいとき
  • 定数評価の処理を実装したいとき
  • LLVM IRへの変換を追加したいとき
carbon-language/carbon-lang3.4万2026年10月26日 更新

Code style

無料概要あり

Carbonツールチェーンのコードを書く際に、言語ごとの整形方法やコメント、命名、ドキュメント、コミットメッセージの基準を確認できます。

  • Carbonコードの書式を整えたいとき
  • コメントやドキュメントを見直したいとき
  • コードの名前が意味に合うか確認したいとき
carbon-language/carbon-lang3.4万2026年10月26日 更新

Diagnostics

無料概要あり

Carbonコンパイラのエラーや警告を定義し、書式やソース位置のラベルを整え、テストで網羅性を確かめる方法を案内します。

  • 診断メッセージを追加したいとき
  • エラー位置にラベルを付けたいとき
  • 診断文の表記を統一したいとき
carbon-language/carbon-lang3.4万2026年10月26日 更新

carbon-language のスキルをすべて見る

このスキルの問題を報告する