gh-initlisted
Install: claude install-skill fadymondy/gh-pms
# gh-init
Bootstrap the current repo so the rest of gh-pms can run with full GitHub-native primitives.
## When to use
- User is in a fresh repo and says "set up", "init", "bootstrap"
- A `gh-*` skill reports missing infrastructure (no project, no labels, no milestones)
- User explicitly invokes `/gh-pms:gh-init`
## Step 1 — Verify location
Run `gh repo view --json nameWithOwner -q .nameWithOwner` (via Bash). If it fails, fail with: `gh-init: not in a GitHub repo. Run from inside one.`
## Step 2 — Detect native features
```bash
${CLAUDE_PLUGIN_ROOT}/lib/ghcall.sh detect-features
```
This returns JSON like:
```json
{
"issue_types": true,
"projects_scope": false,
"owner_kind": "Organization",
"types": [{"id": "IT_kw...", "name": "Feature", "color": "BLUE"}, ...]
}
```
Use this to decide which primitives to provision.
## Step 3 — Provision Issue Types (if available)
If `issue_types: true` AND the org has at least Feature/Bug/Task: nothing to do — types are already at org level. Just remember the IDs for later steps.
If `issue_types: false`: skip; we'll use `type:*` labels.
## Step 4 — Provision Projects v2 (opt-in)
If the user passed `--with-project` (or said "create a project too"):
a. Check token scope: `gh auth status | grep "'project'"`. If missing, run:
```
gh auth refresh -s project
```
and ASK the user to complete the browser flow before continuing.
b. Create or find the project:
```bash
${CLAUDE_PLUGIN_ROOT}/lib/ghcall.sh ensure-p