labels
Auto-generate PR labels based on content analysis
When & Why to Use This Skill
The Label Generation Skill is an AI-powered developer tool designed to streamline GitHub and GitLab workflows by automatically assigning relevant labels to Pull Requests. By performing deep content analysis of code diffs, file paths, and descriptions, it identifies bugs, features, documentation updates, and security risks, helping teams maintain organized repositories and accelerate the CI/CD pipeline through consistent categorization.
Use Cases
- Automated Triage: Speed up the initial review process in high-traffic repositories by automatically tagging incoming PRs based on their content and affected files.
- Changelog Automation: Ensure all changes are correctly labeled (e.g., 'breaking-change', 'feature') to enable seamless and accurate automated release note generation.
- Security & Risk Flagging: Automatically identify and label PRs containing security-sensitive keywords or authentication logic to ensure they receive immediate priority review.
- Workflow Routing: Use generated labels to trigger specific CI/CD pipelines or notify specialized team members (e.g., routing 'documentation' tags to technical writers).
| name | labels |
|---|---|
| description | Auto-generate PR labels based on content analysis |
| version | 1.0.0 |
| author | xiaoju111a |
Label Generation Skill
Analyze PR content and suggest appropriate labels.
Label Categories
| Label | When to Use |
|---|---|
bug |
Fixes a bug or defect |
feature / enhancement |
Adds new functionality |
documentation |
Documentation-only changes |
refactor |
Code restructuring without behavior change |
test |
Test additions or modifications |
chore |
Build, config, CI/CD changes |
breaking-change |
Breaking API or behavior changes |
dependencies |
Dependency updates |
security |
Security fixes or improvements |
performance |
Performance optimizations |
Rules
- Be conservative - Only suggest labels you're confident about
- Maximum 3 labels - Don't over-label
- Use repo labels - Only suggest labels that exist in the repo
- Consider scope - Look at file paths, not just content
Signals
bug: Fix, patch, resolve, issue, error, crashfeature: Add, new, implement, introducedocs: README, .md files, comments onlyrefactor: Rename, move, restructure, cleantest: test/, spec/, tests, .test., .spec.chore: .github/, config, CI, builddeps: package.json, requirements.txt, go.modsecurity: auth, password, token, vulnerability, CVEperf: optimize, cache, speed, performance
Output Format
{
"labels": ["bug", "security"],
"reason": "Fixes authentication bypass vulnerability"
}