github-labels-setuplisted
Install: claude install-skill alvincrespo/skills
# GitHub Labels Setup
Create or update a repo's label taxonomy from a JSON config, one label at a
time, via `gh label create --force`. Standalone and reusable — "set up my
standard labels on this repo" is a complete request on its own, with no
milestone, project board, or issue creation involved (see
`docs/adr/0001-four-skills-not-one.md`).
## Invocation
```bash
python scripts/ensure_labels.py --repo <owner>/<repo> --labels-file <path-to-labels.json>
```
`scripts/ensure_labels.py` reads the labels file and, for each entry, runs:
```bash
gh label create <name> --repo <owner>/<repo> --color <color> --description <description> --force
```
`--force` makes this idempotent: a label that already exists with that name
gets its color and description updated in place instead of erroring, so the
exact same command can be re-run any time the taxonomy changes without
producing duplicates or drift.
## Labels config JSON shape
`--labels-file` points at a JSON file containing an array of objects, each
with exactly three string fields:
```json
[
{
"name": "priority:P0",
"color": "B60205",
"description": "Drop everything"
}
]
```
- `name` — the label's exact name as it will appear on the repo.
- `color` — a hex color **without** a leading `#` (e.g. `B60205`, not
`#B60205` — `gh label create --color` rejects the leading `#`).
- `description` — the label's description text.
No other fields are read. Every entry needs all three; a config file
missing `name`, `color`,