Skip to content
Back to skills

Github Labels Query

ASecurity

List GitHub repository labels with per_page pagination support.

  • 5,344 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 26, 2026
developmentbashnodegitapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add github/gh-aw --skill github-labels-query --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Github Labels Query?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Github Labels Query
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/github-github-labels-query/badge)](https://www.skillsdirectory.com/skills/github-github-labels-query)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: github-labels-query
description: List GitHub repository labels with per_page pagination support.
---

# GitHub Labels Query Skill

List GitHub repository labels with efficient pagination using the `--per-page` flag.

## Usage

Use this script to list labels from any repository with controlled page sizes.

### Basic Usage

```bash
./query-labels.sh --owner github --repo gh-aw
# Returns 10 labels (default per_page=10)
```

### Pagination

```bash
# 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
```

## Parameters

| 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 |

## Output

Returns JSON with the following fields:

```json
{
  "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
}
```

## Source

Calls the GitHub REST API:
`GET /repos/{owner}/{repo}/labels?per_page={n}&page={n}`

Files in this skill

  • SKILL.md1.4 KB
  • query-labels.sh2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…