| created | "2025-12-16T00:00:00.000Z" |
| modified | "2026-05-09T00:00:00.000Z" |
| reviewed | "2026-04-01T00:00:00.000Z" |
| name | github-labels |
| description | Discover and apply GitHub labels via gh CLI. Use when asked to label a PR/issue, list available labels, or create new labels for a repository. |
| user-invocable | false |
| allowed-tools | Bash, Read, Grep, Glob |
GitHub Labels
Reference for discovering and applying labels to GitHub PRs and issues.
When to Use This Skill
| Use this skill when... | Use something else when... |
|---|
| Listing available labels in a repo | Creating or managing milestones |
| Adding or removing labels on PRs/issues | Managing GitHub Projects boards |
| Creating new labels with colors | Bulk-editing many issues at once |
| Inheriting labels from issue to PR | Setting PR reviewers or assignees |
Discovering Available Labels
gh label list --json name,description,color --limit 50
gh label list --search "bug"
gh label list --json name -q '.[].name'
Adding Labels to PRs
gh pr create --label "bug"
gh pr create --label "bug" --label "priority:high"
gh pr create --label "bug,priority:high"
gh pr edit 123 --add-label "ready-for-review"
Adding Labels to Issues
gh issue create --label "bug,needs-triage"
gh issue edit 123 --add-label "in-progress"
gh issue edit 123 --remove-label "needs-triage"
Common Label Categories
| Category | Examples |
|---|
| Type | bug, feature, enhancement, documentation, chore |
| Priority | priority:critical, priority:high, priority:medium, priority:low |
| Status | needs-triage, in-progress, blocked, ready-for-review |
| Area | frontend, backend, infrastructure, testing, ci-cd |
Label Inheritance Pattern
When creating a PR from an issue:
- Read issue labels via
gh issue view N --json labels
- Apply same labels to PR:
gh pr create --label "label1,label2"
This maintains traceability and consistent categorization.
Agentic Optimizations
| Context | Command |
|---|
| List all labels (machine-readable) | gh label list --json name,description,color --limit 50 |
| Get label names only | gh label list --json name -q '.[].name' |
| Add label to PR silently | gh pr edit $PR --add-label "label" |
| Check current issue labels | gh issue view $ISSUE --json labels -q '.labels[].name' |
| Inherit labels from issue to PR | `gh issue view $ISSUE --json labels -q '[.labels[].name] |