用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/github/gh-aw --skill github-labels-query命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
GitHub Agentic Workflows (`gh-aw`) is a GitHub CLI extension for writing Agentic Workflows in markdown and compiling them to GitHub Actions.
Operate safely and efficiently inside a gh-aw workflow with a restricted tools/bash allowlist, and correctly triage tool-denial events before they exhaust the session's denial budget.
Optional Sergo examples for cache formats and reporting templates.
正在显示 SKILL.md
| name | github-labels-query |
| description | List GitHub repository labels with per_page pagination and name filtering support. |
List GitHub repository labels with efficient pagination using the --per-page flag.
Use this script to list labels from any repository with controlled page sizes.
./query-labels.sh --owner github --repo gh-aw
# Returns 10 labels (default per_page=10)
# Get the first label only
./query-labels.sh --owner github --repo gh-aw --per-page 1
# Get 25 labels starting from page 2
./query-labels.sh --owner github --repo gh-aw --per-page 25 --page 2
# Only labels whose name contains "bug" (case-insensitive)
./query-labels.sh --owner github --repo gh-aw --name-filter bug
When --name-filter is set, all labels are fetched and filtered, then
--per-page/--page are applied to the filtered results.
| Parameter | Required | Default | Description |
|---|---|---|---|
--owner | Yes | - | Repository owner (username or organization) |
--repo | Yes | - | Repository name |
--per-page | No | 10 | Results per page (1–100) |
--page | No | 1 | Page number |
--name-filter | No | - | Case-insensitive substring filter on the label name |
Returns JSON with the following fields:
{
"labels": [
{
"id": 12345,
"node_id": "LA_...",
"url": "https://api.github.com/repos/owner/repo/labels/bug",
"name": "bug",
"color": "d73a4a",
"default": true,
"description": "Something isn't working"
}
],
"item_count": 10,
"per_page": 10,
"page": 1
}
Calls the GitHub REST API:
GET /repos/{owner}/{repo}/labels?per_page={n}&page={n}
When --name-filter is used, the script pages through all labels
(--paginate) before filtering and slicing locally.