gh-clilisted
Install: claude install-skill whimzyLive/nightshift-ai
# gh-cli — GitHub CLI
Use `gh` for all GitHub operations. Never use GitHub MCP tools when gh can do the same job.
## Why gh over MCP
MCP tool calls return full JSON payloads into context. gh runs in Bash, outputs only what you request, and exits. Token cost per operation: gh ≈ 10–50 tokens vs MCP ≈ 500–2000 tokens.
## Authentication
gh reads credentials from `~/.config/gh/`. Assume it is authenticated. If a command returns an auth error, stop and tell the user to run `gh auth login`.
## Full PR creation workflow
Always follow this order — never skip steps:
```bash
# 1. Push branch to remote
git push -u origin "$(git branch --show-current)"
# 2. Check for existing PR — never create duplicates
existing=$(gh pr list --head "$(git branch --show-current)" --json url --jq '.[0].url // empty' 2>&1)
if [ -n "$existing" ]; then
echo "PR already exists: $existing"
exit 0
fi
# 3. Create PR — always use heredoc for body to avoid shell escaping issues
pr_url=$(gh pr create \
--title "feat(scope): description" \
--base develop \
--body "$(cat <<'EOF'
## Summary
- What this PR does (bullet points)
## Test plan
- [ ] Verification step
EOF
)" 2>&1)
echo "Created PR: $pr_url"
```
## Create a PR (minimal form)
```bash
gh pr create \
--title "feat(scope): description" \
--base develop \
--body "$(cat <<'EOF'
## Summary
- <what changed and why>
## Test plan
- [ ] <how to verify>
EOF
)"
```
## Shell escaping rule
**Always use single-quoted `<<'EOF'`** for PR bodies