用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/carbon-language/carbon-lang --skill github-cli-usage命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | GitHub CLI usage |
| description | Instructions for using the `gh` command to query and inspect GitHub state safely. |
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.
[!IMPORTANT] AI assistants MUST NOT use the
ghtool 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.
listviewsearchstatusapi (Only with GET requests)createeditdeletemergereopenclosecommentlabelThe 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.
To verify the current default repository configuration:
gh repo view
The output should indicate the repository is carbon-language/carbon-lang.
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
ghconfiguration or run commands that change the default repository (such asgh 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.
gh issue listgh issue view <number>gh issue search "<query>"
gh issue search "crash" --state opengh pr listgh pr view <number>gh pr diff <number>gh pr statusgh search code "<query>"gh search repos "<query>"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.
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
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
}
}
'
Use the --paginate flag to automatically fetch all pages of results.
gh api --paginate repos/carbon-language/carbon-lang/issues
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}}'
Instructions for registering, mapping, constant evaluating, and lowering builtin functions in the Carbon toolchain.
Instructions for declaring, formatting, emitting, testing, and styling diagnostic messages (errors, warnings, notes) in the Carbon toolchain.
Guidelines and restrictions on shell commands and file manipulation tools for AI assistants.
基于 SOC 职业分类