Managing Repository Labels
Analyze repository context and establish or refresh a semantic label system tailored to the project's domain and needs.
What you should do
When invoked, help the user create or refresh their repository's label system by:
Understanding the request - Determine what's needed:
- Initial setup for new repository
- Periodic refresh (6-12 month cycle)
- Standardization across organization
- Migration from legacy labels
Analyzing the repository - Gather context:
- Technology stack and project type
- Existing issue patterns
- Current label usage and gaps
- Team terminology
Designing the label system - Create semantic labels:
- Core categories (bug, enhancement, question)
- Domain-specific labels (api, frontend, pipeline, etc.)
- Apply semantic color philosophy
- Ensure no redundancy or overlap
Implementing changes - Execute carefully:
- Create new labels with proper colors
- Migrate issues from old to new labels
- Delete obsolete labels (after verification)
- Audit and label unlabeled issues
Documenting the system - Create .github/LABELS.md:
- Label categories and descriptions
- Usage guidelines
- Migration history
When to use this skill
Trigger phrases:
- "Set up labels"
- "Organize our labels"
- "Label system is a mess"
- "Standardize labels"
- "Clean up labels"
- "Refresh label system"
Proactive detection:
- Many unlabeled issues detected
- Duplicate labels observed (e.g.,
docs and documentation)
- Inconsistent label usage
- Project scope has expanded
- Team mentions label confusion
Scheduled maintenance:
- Every 6-12 months for active repositories
- When merging multiple repositories
- After significant project evolution
Analysis process
1. Analyze repository context
# Get repository information
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
REPO_DESCRIPTION=$(gh repo view --json description -q .description)
# List existing labels
gh label list --json name,description,color --limit 100
# Analyze recent issues for patterns
gh issue list --limit 50 --json title,body,labels --state all
Look for:
- Technology stack (languages, frameworks)
- Issue patterns (security, performance, bugs, features)
- Team terminology (what words do they use?)
- Missing label coverage (unlabeled issues)
2. Determine label categories
Core categories (most repositories need):
- Nature: bug, enhancement, question
- Domain-specific: Labels specific to project type (api, frontend, backend)
- Quality: testing, refactor, docs
- Infrastructure: ci, dependencies, config
- Impact: security, performance, accessibility
Important: Do NOT create labels for status (todo/done), priority (high/low), value (essential/nice-to-have), or effort (heavy/light). These should be managed as custom fields in GitHub Projects V2, not labels.
Repository-specific examples:
- API project: endpoint, schema, authentication
- Data project: pipeline, validation, data-quality
- UI project: ux, accessibility, design-system
- Library: breaking-change, deprecation, api
Color assignment
Use semantic color philosophy to communicate meaning visually. See LABEL-COLORS.md for complete reference.
Quick reference
| Category |
Hex Code |
Use Case |
| Critical (Red) |
FF3B30 |
bug, breaking-change |
| High Priority (Orange) |
FF9500 |
security, performance |
| Success (Green) |
34C759 |
testing, quality |
| Enhancement (Light Green) |
30D158 |
enhancement, feature-request |
| Refinement (Purple) |
AF52DE |
refactor, cleanup |
| Infrastructure (Cyan) |
00C7BE |
ci, deployment |
| Technical (Blue) |
007AFF |
dependencies, architecture |
| Routine (Gray) |
8E8E93 |
docs, config |
Color selection rules
- Darker shades = higher urgency within same color family
- Never use pure red (
FF0000) - too alarming
- Limit to 2-3 shades per color family - avoid confusion
- Test accessibility - ensure WCAG AA contrast
- Match GitHub defaults -
bug uses FF3B30
Implementation workflow
Step 1: Create or update labels
# Create new labels
gh label create "bug" --description "Something isn't working" --color "FF3B30"
# Update existing labels
gh label edit "bug" --description "Something isn't working" --color "FF3B30"
Step 2: Migrate issues
Before deleting obsolete labels, migrate issues:
# List issues with old label
OLD_LABEL="old-label-name"
NEW_LABEL="new-label-name"
ISSUES=$(gh issue list --label "$OLD_LABEL" --json number --jq '.[].number')
# Migrate each issue
for issue in $ISSUES; do
echo "Migrating issue #$issue from $OLD_LABEL to $NEW_LABEL"
gh issue edit $issue --remove-label "$OLD_LABEL" --add-label "$NEW_LABEL"
done
Migration strategies:
- Direct replacement: Old label → New label (1:1)
- Split: One old → Multiple new (e.g.,
feature → enhancement + domain)
- Consolidate: Multiple old → One new (e.g.,
high-priority + critical → security)
- Drop: Remove obsolete labels
Step 3: Clean up obsolete labels
After migration, delete old labels:
# Verify label has no remaining issues
REMAINING=$(gh issue list --label "old-label" --json number --jq 'length')
if [ "$REMAINING" -eq 0 ]; then
gh label delete "old-label"
echo "Deleted obsolete label: old-label"
else
echo "Warning: $REMAINING issues still use old-label"
fi
Common labels to clean up:
- Status labels:
todo, in-progress, done, backlog (use Status custom field)
- Priority labels:
high-priority, low-priority, p0, p1 (use Value/Effort custom fields)
- Value labels:
essential, nice-to-have (use Value custom field)
- Effort labels:
heavy, light, quick-win (use Effort custom field)
- Duplicate labels (e.g.,
documentation and docs)
- Vague labels (e.g.,
needs-work, help-wanted)
- Legacy project-specific labels
Step 4: Audit unlabeled issues
# Find unlabeled issues
gh issue list --label "" --limit 100 --json number,title
# Review and apply appropriate labels
for issue in $(gh issue list --label "" --json number --jq '.[].number' | head -20); do
gh issue view $issue
# gh issue edit $issue --add-label "appropriate-label"
done
Step 5: Document the system
Create or update .github/LABELS.md:
# Repository Labels
## Label Categories
### Critical Issues (Red-Orange)
- `bug` - Something isn't working
- `security` - Security-related issues
- `performance` - Performance improvements
### Quality (Green)
- `testing` - Test suite improvements
- `docs` - Documentation updates
### Infrastructure (Blue-Cyan)
- `ci` - Continuous integration
- `dependencies` - Dependency updates
## When to Use
**bug**: Broken functionality, errors, or unexpected behavior
**security**: Any security vulnerability or concern
**testing**: Test suite or testing infrastructure changes
**docs**: Documentation improvements
## Multiple Labels
Issues can have multiple labels:
- `bug` + `security`: Security vulnerability
- `enhancement` + `performance`: Performance-improving feature
## Migration History
### YYYY-MM-DD: Label system refresh
- **Reason**: [Initial setup | Periodic refresh | Project scope expansion]
- **Changes made**:
- Migrated `feature` → `enhancement`
- Consolidated `high-priority`, `urgent` → `security`
- Deleted obsolete labels: `wontfix`, `invalid`
- Added domain labels: `api`, `frontend`, `backend`
- **Issues affected**: XX issues migrated
**Maintenance schedule:**
- Review label system every 6-12 months
- Document each refresh with date and reason
- Update this file when label changes are made
Quality gates
Before completing, verify:
Expected outcomes
- Consistent label system aligned to repository needs
- Semantic colors that communicate priority/type visually
- Clear documentation for contributors
- Existing issues properly categorized
- Foundation for better issue triage and project management
- Maintenance schedule established
Repository type examples
API/Backend project
api, endpoint, database, authentication
bug, security, performance
testing, docs, ci
Frontend project
ui, ux, accessibility, design-system
bug, browser-compat, performance
testing, docs, dependencies
Data/Pipeline project
pipeline, validation, data-quality
bug, performance, config
testing, docs, dependencies
Library/Framework
api, breaking-change, deprecation
bug, enhancement, docs
examples, testing, dependencies
Integration with other skills
Works with:
gh-project-setup - Use during initial project setup
git-issue-create - References label system for new issues
gh-project-manage - Complements project field management
Triggers from:
- Repository onboarding workflows
- Project setup automation
- Issue creation detecting missing labels
- Team requesting better organization
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: managing-repository-labels3description: Reviews existing repository issues, code structure, and domain to create or refresh a semantic label system with appropriate colors aligned to the repository's specific context and needs. Use for initial setup or periodic maintenance (every 6-12 months) when users mention "labels", "label organization", "repository cleanup", "label system", or when detecting labeling inconsistencies. Use when this capability is needed.4---56# Managing Repository Labels78Analyze repository context and establish or refresh a semantic label system tailored to the project's domain and needs.910## What you should do1112When invoked, help the user create or refresh their repository's label system by:13141. **Understanding the request** - Determine what's needed:15 - Initial setup for new repository16 - Periodic refresh (6-12 month cycle)17 - Standardization across organization18 - Migration from legacy labels19202. **Analyzing the repository** - Gather context:21 - Technology stack and project type22 - Existing issue patterns23 - Current label usage and gaps24 - Team terminology25263. **Designing the label system** - Create semantic labels:27 - Core categories (bug, enhancement, question)28 - Domain-specific labels (api, frontend, pipeline, etc.)29 - Apply semantic color philosophy30 - Ensure no redundancy or overlap31324. **Implementing changes** - Execute carefully:33 - Create new labels with proper colors34 - Migrate issues from old to new labels35 - Delete obsolete labels (after verification)36 - Audit and label unlabeled issues37385. **Documenting the system** - Create `.github/LABELS.md`:39 - Label categories and descriptions40 - Usage guidelines41 - Migration history4243## When to use this skill4445**Trigger phrases:**46- "Set up labels"47- "Organize our labels"48- "Label system is a mess"49- "Standardize labels"50- "Clean up labels"51- "Refresh label system"5253**Proactive detection:**54- Many unlabeled issues detected55- Duplicate labels observed (e.g., `docs` and `documentation`)56- Inconsistent label usage57- Project scope has expanded58- Team mentions label confusion5960**Scheduled maintenance:**61- Every 6-12 months for active repositories62- When merging multiple repositories63- After significant project evolution6465## Analysis process6667### 1. Analyze repository context6869```bash70# Get repository information71REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)72REPO_DESCRIPTION=$(gh repo view --json description -q .description)7374# List existing labels75gh label list --json name,description,color --limit 1007677# Analyze recent issues for patterns78gh issue list --limit 50 --json title,body,labels --state all79```8081**Look for:**82- Technology stack (languages, frameworks)83- Issue patterns (security, performance, bugs, features)84- Team terminology (what words do they use?)85- Missing label coverage (unlabeled issues)8687### 2. Determine label categories8889**Core categories** (most repositories need):90- **Nature**: bug, enhancement, question91- **Domain-specific**: Labels specific to project type (api, frontend, backend)92- **Quality**: testing, refactor, docs93- **Infrastructure**: ci, dependencies, config94- **Impact**: security, performance, accessibility9596> **Important**: Do NOT create labels for status (todo/done), priority (high/low), value (essential/nice-to-have), or effort (heavy/light). These should be managed as custom fields in GitHub Projects V2, not labels.9798**Repository-specific examples:**99- **API project**: endpoint, schema, authentication100- **Data project**: pipeline, validation, data-quality101- **UI project**: ux, accessibility, design-system102- **Library**: breaking-change, deprecation, api103104## Color assignment105106Use semantic color philosophy to communicate meaning visually. See [LABEL-COLORS.md](LABEL-COLORS.md) for complete reference.107108### Quick reference109110| Category | Hex Code | Use Case |111|----------|----------|----------|112| Critical (Red) | `FF3B30` | bug, breaking-change |113| High Priority (Orange) | `FF9500` | security, performance |114| Success (Green) | `34C759` | testing, quality |115| Enhancement (Light Green) | `30D158` | enhancement, feature-request |116| Refinement (Purple) | `AF52DE` | refactor, cleanup |117| Infrastructure (Cyan) | `00C7BE` | ci, deployment |118| Technical (Blue) | `007AFF` | dependencies, architecture |119| Routine (Gray) | `8E8E93` | docs, config |120121### Color selection rules1221231. **Darker shades = higher urgency** within same color family1242. **Never use pure red (`FF0000`)** - too alarming1253. **Limit to 2-3 shades per color family** - avoid confusion1264. **Test accessibility** - ensure WCAG AA contrast1275. **Match GitHub defaults** - `bug` uses `FF3B30`128129## Implementation workflow130131### Step 1: Create or update labels132133```bash134# Create new labels135gh label create "bug" --description "Something isn't working" --color "FF3B30"136137# Update existing labels138gh label edit "bug" --description "Something isn't working" --color "FF3B30"139```140141### Step 2: Migrate issues142143Before deleting obsolete labels, migrate issues:144145```bash146# List issues with old label147OLD_LABEL="old-label-name"148NEW_LABEL="new-label-name"149150ISSUES=$(gh issue list --label "$OLD_LABEL" --json number --jq '.[].number')151152# Migrate each issue153for issue in $ISSUES; do154 echo "Migrating issue #$issue from $OLD_LABEL to $NEW_LABEL"155 gh issue edit $issue --remove-label "$OLD_LABEL" --add-label "$NEW_LABEL"156done157```158159**Migration strategies:**160- **Direct replacement**: Old label → New label (1:1)161- **Split**: One old → Multiple new (e.g., `feature` → `enhancement` + domain)162- **Consolidate**: Multiple old → One new (e.g., `high-priority` + `critical` → `security`)163- **Drop**: Remove obsolete labels164165### Step 3: Clean up obsolete labels166167After migration, delete old labels:168169```bash170# Verify label has no remaining issues171REMAINING=$(gh issue list --label "old-label" --json number --jq 'length')172173if [ "$REMAINING" -eq 0 ]; then174 gh label delete "old-label"175 echo "Deleted obsolete label: old-label"176else177 echo "Warning: $REMAINING issues still use old-label"178fi179```180181**Common labels to clean up:**182- **Status labels**: `todo`, `in-progress`, `done`, `backlog` (use Status custom field)183- **Priority labels**: `high-priority`, `low-priority`, `p0`, `p1` (use Value/Effort custom fields)184- **Value labels**: `essential`, `nice-to-have` (use Value custom field)185- **Effort labels**: `heavy`, `light`, `quick-win` (use Effort custom field)186- Duplicate labels (e.g., `documentation` and `docs`)187- Vague labels (e.g., `needs-work`, `help-wanted`)188- Legacy project-specific labels189190### Step 4: Audit unlabeled issues191192```bash193# Find unlabeled issues194gh issue list --label "" --limit 100 --json number,title195196# Review and apply appropriate labels197for issue in $(gh issue list --label "" --json number --jq '.[].number' | head -20); do198 gh issue view $issue199 # gh issue edit $issue --add-label "appropriate-label"200done201```202203### Step 5: Document the system204205Create or update `.github/LABELS.md`:206207```markdown208# Repository Labels209210## Label Categories211212### Critical Issues (Red-Orange)213- `bug` - Something isn't working214- `security` - Security-related issues215- `performance` - Performance improvements216217### Quality (Green)218- `testing` - Test suite improvements219- `docs` - Documentation updates220221### Infrastructure (Blue-Cyan)222- `ci` - Continuous integration223- `dependencies` - Dependency updates224225## When to Use226227**bug**: Broken functionality, errors, or unexpected behavior228**security**: Any security vulnerability or concern229**testing**: Test suite or testing infrastructure changes230**docs**: Documentation improvements231232## Multiple Labels233234Issues can have multiple labels:235- `bug` + `security`: Security vulnerability236- `enhancement` + `performance`: Performance-improving feature237238## Migration History239240### YYYY-MM-DD: Label system refresh241- **Reason**: [Initial setup | Periodic refresh | Project scope expansion]242- **Changes made**:243 - Migrated `feature` → `enhancement`244 - Consolidated `high-priority`, `urgent` → `security`245 - Deleted obsolete labels: `wontfix`, `invalid`246 - Added domain labels: `api`, `frontend`, `backend`247- **Issues affected**: XX issues migrated248249**Maintenance schedule:**250- Review label system every 6-12 months251- Document each refresh with date and reason252- Update this file when label changes are made253```254255## Quality gates256257Before completing, verify:258259- [ ] Labels cover all common issue types in repository260- [ ] Colors follow semantic color philosophy261- [ ] Descriptions are clear and actionable262- [ ] No redundant or overlapping labels263- [ ] All issues migrated from old to new labels264- [ ] Obsolete labels verified empty and deleted265- [ ] Documentation created in `.github/LABELS.md` with migration history266- [ ] Unlabeled issues reviewed and labeled appropriately267268## Expected outcomes269270- Consistent label system aligned to repository needs271- Semantic colors that communicate priority/type visually272- Clear documentation for contributors273- Existing issues properly categorized274- Foundation for better issue triage and project management275- Maintenance schedule established276277## Repository type examples278279### API/Backend project280281- `api`, `endpoint`, `database`, `authentication`282- `bug`, `security`, `performance`283- `testing`, `docs`, `ci`284285### Frontend project286287- `ui`, `ux`, `accessibility`, `design-system`288- `bug`, `browser-compat`, `performance`289- `testing`, `docs`, `dependencies`290291### Data/Pipeline project292293- `pipeline`, `validation`, `data-quality`294- `bug`, `performance`, `config`295- `testing`, `docs`, `dependencies`296297### Library/Framework298299- `api`, `breaking-change`, `deprecation`300- `bug`, `enhancement`, `docs`301- `examples`, `testing`, `dependencies`302303## Integration with other skills304305**Works with:**306- **`gh-project-setup`** - Use during initial project setup307- **`git-issue-create`** - References label system for new issues308- **`gh-project-manage`** - Complements project field management309310**Triggers from:**311- Repository onboarding workflows312- Project setup automation313- Issue creation detecting missing labels314- Team requesting better organization315316---317> Converted and distributed by [TomeVault](https://tomevault.io/claim/kynoptic) — claim your Tome and manage your conversions.318<!-- tomevault:4.0:skill_md:2026-04-15 -->