github-repo-metadatalisted
Install: claude install-skill JZKK720/cubecloud-skills-bundle-kit
# GitHub repo metadata without the `gh` CLI
## The trap this skill exists to prevent
You want to change a repo's description. You check for tooling:
- `Get-Command gh` → **absent**
- `$env:GITHUB_TOKEN` / `$env:GH_TOKEN` → **unset**
- unauthenticated `PATCH /repos/...` → **401**
The obvious conclusion is *"no auth, this is blocked, ask the user for a token."*
**That conclusion is wrong**, and it is the failure this skill diagnoses. A machine
that has ever pushed over HTTPS with `credential.helper=manager` holds a usable
token in the Windows credential store. `git push` works; the API works too — you
just have to ask the credential store instead of the environment.
**Do not report "blocked" until you have tried the credential store.** Check for
an existing credential before asking a human for anything.
## Decision order
| Check | If present | If absent |
|---|---|---|
| `gh auth status` | use `gh` (simplest) | continue |
| `$env:GITHUB_TOKEN` / `GH_TOKEN` | use it | continue |
| git credential store | use it — see below | **now** it is genuinely blocked |
## Read the credential (never print it, never write it)
```powershell
# Suppress interactive prompts FIRST or this can block on a GUI dialog.
$env:GIT_TERMINAL_PROMPT = "0"
$env:GCM_INTERACTIVE = "never"
$raw = "protocol=https`nhost=github.com`n`n" | git credential fill 2>&1
$tok = ($raw | Where-Object { $_ -like "password=*" } | Select-Object -First 1) -replace "^password=", ""
if (-not $tok) { throw "no stored