Loading...
Loading...
Manage a GitHub repository's labels as a version-controlled file and auto-label pull requests by changed path. Export current labels, diff them against a proposed `.github/labels.yml`, sync the difference (one-shot or via a scheduled workflow using one verified, SHA-pinned action), and wire path-based PR labeling with `actions/labeler` and `.github/labeler.yml`. Use when the user says "standardize labels", "sync labels", "auto-label PRs by path", "labels as code", or invokes /labels-as-code. Do NOT use for org-wide label policy across many repos — route that to /safe-settings, which reconciles labels (rename, exclude) from a central admin repo. Do NOT use for issue forms or templates — that is /oss-hygiene. Label deletions are never automatic; the skill asks for explicit authorization first.
npx skill4agent add paulnsorensen/git-gouda labels-as-code| Concern | Skill |
|---|---|
| One repo's label set, tracked in a file, synced on demand or on schedule | |
| Path-based PR auto-labeling for one repo | |
| Label policy across many repos, reconciled from one admin repo | |
| Issue forms, PR templates, community health files | |
/safe-settingslabelsoldnamefull-sync/safe-settings| File | Purpose |
|---|---|
| The label set: |
| Path-to-label rules consumed by |
| Scheduled/on-push sync of |
| Runs |
gh label list --json name,color,description.github/labels.ymlassets/labels.ymlassets/labels.ymltype/*featfixdocsstylerefactorperftestbuildcichorerevert/pr-title-lintpriority/*criticalhighmediumlowstatus/*blockedin-progressneeds-reviewgood first issuehelp wanteddependenciesbreakingreferences/label-scheme.mdtype/*breaking/gh-bootstrap.github/release.ymlBreaking changesbreaking-changebreakingFeaturesFixesDocumentationInternaltype//gh-bootstraprelease.ymltype/*/gh-bootstrap.github/labels.yml# Create or update one label (never deletes):
gh label create "<name>" --color "<hex>" --description "<text>" --force
# Clone another repo's full label set (adds only; existing labels keep
# their color/description unless the label doesn't exist yet):
gh label clone <owner>/<repo>--forcegh label deletegh label createassets/labels-sync.yml.github/workflows/labels-sync.ymlcrazy-max/ghaction-github-labelerreferences/label-scheme.mdskip-delete: true.github/labels.ymlskip-deletefalseschedulemain.github/labels.ymlworkflow_dispatchEndBug/label-syncgh api repos/{owner}/{repo}references/label-scheme.mdassets/labeler.yml.github/labeler.ymlassets/pr-labeler.yml.github/workflows/labeler.ymlactions/labelerpermissions: contents: read, pull-requests: writeLATEST=$(gh api repos/actions/labeler/releases/latest --jq '.tag_name')
gh api repos/actions/labeler/git/ref/tags/"$LATEST" --jq '.object.sha'assets/pr-labeler.ymluses:gh label list --json name,color,description.github/labels.yml.github/labeler.ymllabeler.ymlgh pr view <number> --json labels --jq '.labels[].name'/safe-settings/oss-hygiene/gh-bootstrapgh label create --forcegh label deletecrazy-max/ghaction-github-labelerskip-delete: trueactions/labelersync-labelsfalsegh label create --color#.github/labels.yml#actions/labelercrazy-max/ghaction-github-labelergh label create --forcegh label edit <old-name> --name <new-name>from_name: