setup-labels
Create or update this repo's GitHub labels (status::*, hitl/afk, task-report::required, resolution::wontfix, wayfinder:*) to match docs/agents/triage-labels.md. Run once per repo before first use of t
Files1
View on GitHubSKILL.mdskills/first-party/pvmalove/setup-labels/SKILL.md
GitHubSetup Labels
gh issue edit --add-label/gh issue create --label fail on a label that doesn't exist yet — gh never auto-creates one. GitLab does the opposite: a --label that names a missing label silently creates it with GitLab's default color, so labelling a ticket before this skill runs leaves a wrongly colored label behind. This skill creates every label this repo's triage taxonomy needs, with its canonical color, so run it before the first /to-spec or /to-tickets.
Process
- Read the tables. Pull every
Label/Colorrow fromdocs/agents/triage-labels.md— the taxonomy tables (category, execution mode, workflow state, context labels) and the Wayfinder addendum. Name and hex color only, skip theApplied bycolumn; skipMeaningtoo on GitHub, while on GitLab keep its first sentence as the label description. If the file doesn't exist, tell the user to runharness update, which seeds it from the harness templates, and stop. - Show the plan. List every label about to be created or updated, with its color. Confirm with the maintainer before touching the tracker — this mutates shared repo state, same discipline as any other tracker-mutating step in this repo (see
docs/agents/issue-tracker.md). - Apply.
- GitHub: For each label, run
gh label create "<name>" --color "<hex>" --force.--forcemakes this idempotent — it updates the color of a label that already exists instead of erroring, and touches nothing else about it (issues already carrying it are unaffected). - GitLab: the CLI has no
--forcefor label creation, so compare against the existing labels first.<host>,<project-url>and<project-id>are defined indocs/agents/issue-tracker.md→ GitLab → Conventions.- Read the existing labels once:
GITLAB_HOST=<host> glab api --paginate projects/<project-id>/labels— the paginated API, because the CLI's own label listing returns a single page. Each entry carriesid,nameandcolor. - Missing label:
glab label create -R <project-url> -n '<name>' -c '<hex>' -d '<description>'.<description>is the first sentence of theMeaningcolumn as plain text, with its backticks and quotes dropped: inside double quotes the shell would run a backticked word as a command, and a single-quoted value can't contain a quote. - Existing label with another color (compare hex case-insensitively):
glab label edit -R <project-url> --label-id <id> -c '<hex>', with<id>from the listing. Only the color changes; issues already carrying the label are unaffected. - Existing label with the same color: no-op.
- Read the existing labels once:
- GitHub: For each label, run
- Report. One line per label: created, updated (color changed), or already correct (no-op). Don't re-print the full plan from step 2.