label-issue
Classifies and applies labels to GitHub issues by matching content against repository instructions.
Install
mkdir -p .claude/skills/label-issue && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15237" && unzip -o skill.zip -d .claude/skills/label-issue && rm skill.zipInstalls to .claude/skills/label-issue
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Classify and label GitHub issues based on repository-specific labeling instructions. Use when (1) auto-labeling new issues, (2) classifying issue types (bug, feature, etc.), (3) adding priority or area labels, (4) applying consistent labeling rules. Triggers on requests like "label issue", "classify issue", "what labels should this issue have", "add labels to issue".Key capabilities
- →Fetch labeling instructions from `.github/label-instructions.md`
- →Fetch GitHub issue details (title, body, existing labels)
- →Analyze issue content against labeling rules
- →Determine appropriate labels based on keyword matching and issue type
- →Apply labels to GitHub issues via Python script and GitHub API
- →Report applied labels with reasoning and existing labels
How it works
The skill fetches labeling instructions and issue details, analyzes the issue content against predefined rules, determines suitable labels, and applies them using a Python script that interacts with the GitHub API.
Inputs & outputs
When to use label-issue
- →Auto-label new issues
- →Classify issue types
- →Apply priority labels
- →Maintain consistent issue categorization
About this skill
Label Issue Skill
Automatically classify and label GitHub issues based on repository-specific labeling instructions.
Overview
This skill analyzes GitHub issue content (title, body, comments) and applies appropriate labels based on labeling rules defined in the target repository's .github/label-instructions.md file.
Workflow
- Input: Receive issue URL or issue number with repository (owner/repo)
- Fetch labeling instructions: Read
.github/label-instructions.mdfrom the repository - Fetch issue: Get issue details (title, body, existing labels)
- Analyze issue: Match issue content against labeling rules
- Determine labels: Select appropriate labels based on:
- Keyword matching
- Issue type detection (bug, feature, question, etc.)
- Priority assessment
- Area/component identification
- Apply labels: Use Python script to add labels via GitHub API
- Report: Confirm labels applied with reasoning
Reading Labeling Instructions
Fetch .github/label-instructions.md from the target repository using GitHub MCP tools. The file should define:
- Available labels: List of valid labels with descriptions
- Labeling rules: Criteria for when to apply each label
- Keywords mapping: Keywords that trigger specific labels
For template format, see references/label_instructions_template.md.
If .github/label-instructions.md is not found:
- Fetch the list of labels defined in the target repository using
github/list_labels - Create a brief summary of available labels based on their names and descriptions
- Use the summary to determine which labels best match the issue content
Issue Analysis
Analyze issue content to determine appropriate labels by:
- Type Detection: Match issue keywords against label names/descriptions
- Priority Assessment: Identify severity indicators in the issue
- Area Detection: Match issue content against area-specific labels
Applying Labels
Run the bundled Python script to add labels:
# Install dependency
pip install requests
# Add labels to an issue
python scripts/label_issue.py <owner> <repo> <issue_number> <labels>
# Example: add bug and priority:high labels
python scripts/label_issue.py microsoft vscode 123 "bug,priority:high"
# Example: add multiple area labels
python scripts/label_issue.py microsoft vscode 123 "bug,area:ui,area:api"
The script scripts/label_issue.py handles the GitHub API call.
Example Commands
- "Label issue #123 in microsoft/vscode"
- "What labels should this issue have? https://github.com/owner/repo/issues/456"
- "Classify and label issue #789"
- "Add appropriate labels to this bug report"
Output
Report the labeling decision with:
- Labels applied: List of labels added
- Reasoning: Why each label was chosen
- Type: "Detected as bug (keywords: 'not working', 'error')"
- Priority: "High priority (affects core functionality)"
- Area: "Matched 'ui' area (keywords: button, dialog)"
- Existing labels: Labels already on the issue (not modified)
Example Output
✅ Labels added to issue #123: bug, priority:high, area:ui
**Reasoning:**
- **bug**: Issue describes broken functionality ("button not working")
- **priority:high**: Core feature affected, no workaround mentioned
- **area:ui**: UI-related keywords detected (button, click, display)
**Existing labels:** needs-triage (unchanged)
Configuration
The skill requires:
- GITHUB_ACCESS_TOKEN or GITHUB_PAT environment variable with
reposcope - label-instructions.md in target repository (optional but recommended)
Fallback Behavior
If labeling instructions are not found:
- Use default type detection rules
- Skip priority and area labels
- Report that default rules were used
When not to use it
- →When not classifying or labeling GitHub issues
- →When repository-specific labeling instructions are not available or desired
Prerequisites
Limitations
- →Requires `GITHUB_ACCESS_TOKEN` or `GITHUB_PAT` with `repo` scope
- →Relies on `.github/label-instructions.md` for specific rules, otherwise uses default type detection
- →The Python script `scripts/label_issue.py` is used for applying labels
How it compares
It automates GitHub issue labeling based on repository-specific instructions and content analysis, providing consistent categorization unlike manual labeling.
Compared to similar skills
label-issue side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| label-issue (this skill) | 0 | 6mo | Review | Intermediate |
| triage-issue | 1 | 6mo | Review | Intermediate |
| proof-of-work | 1 | 6mo | No flags | Intermediate |
| github-triage | 0 | 3mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
triage-issue
mysticaltech
Use when triaging a GitHub issue - analyzes issue, checks for duplicates, categorizes, and drafts response
proof-of-work
MadAppGang
Proof artifact generation patterns for task validation. Covers screenshots, test results, deployments, and confidence scoring.
github-triage
OutlineDriven
Triage GitHub issues through a configurable label-based state machine. Use when user wants to triage incoming issues, prepare issues for an autonomous agent, or move an issue between workflow states. Repo inferred from `git remote`; all GitHub calls go through `gh`.
checkpointing
arugo11
Run full session checkpointing from Codex without Claude dependencies. Collect git and CLI activity, generate checkpoint files, update session history, and analyze reusable skill patterns.
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
git-advanced-workflows
wshobson
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.