/github
Use when doing git operations, creating PRs, or managing GitHub issues. Provides gh CLI commands. Covers git, github, commits, PRs, issues, branches, worktrees. NOT for: Linear issues (use linear), code reviews (use coderabbit).
$ golems-cli skills install githubUpdated 2 weeks ago
Use
ghCLI and git commands through this skill. No GitHub MCP required.
Prerequisites
ghCLI installed (brew install gh)- Authenticated:
gh auth login
Quick Reference
Issues
# Create issue
gh issue create --title "Title" --body "Description" --label "bug"
# List issues
gh issue list
gh issue list --assignee @me
gh issue list --label "enhancement"
# View issue
gh issue view 123
# Close issue
gh issue close 123Pull Requests
# Create PR (from current branch)
gh pr create --title "Title" --body "Description"
# Create PR with template
gh pr create --title "feat: add feature" --body "$(cat <<'EOF'
## Summary
- Change 1
- Change 2Full SKILL.md source — includes LLM directives, anti-patterns, and technical instructions stripped from the Overview tab.
Use
ghCLI and git commands through this skill. No GitHub MCP required.
Prerequisites
ghCLI installed (brew install gh)- Authenticated:
gh auth login
Quick Reference
Issues
# Create issue
gh issue create --title "Title" --body "Description" --label "bug"
# List issues
gh issue list
gh issue list --assignee @me
gh issue list --label "enhancement"
# View issue
gh issue view 123
# Close issue
gh issue close 123Pull Requests
# Create PR (from current branch)
gh pr create --title "Title" --body "Description"
# Create PR with template
gh pr create --title "feat: add feature" --body "$(cat <<'EOF'
## Summary
- Change 1
- Change 2
## Test plan
- [ ] Test A
- [ ] Test B
EOF
)"
# List PRs
gh pr list
gh pr list --author @me
# View PR
gh pr view 123
# Checkout PR locally
gh pr checkout 123
# Merge PR
gh pr merge 123 --squashCommits (Git)
# Stage specific files (preferred over git add -A)
git add file1.ts file2.ts
# Commit with co-author
git commit -m "$(cat <<'EOF'
feat: description of change
More details here.
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
# Check status
git status
# View diff
git diff
git diff --stagedBranches
# Create and switch
git checkout -b feat/new-feature
# Push with upstream
git push -u origin feat/new-feature
# Delete branch (after merge)
git branch -d feat/old-featureWorktrees (Isolated Development)
Worktrees create isolated workspaces sharing the same repo — work on multiple branches simultaneously.
Directory selection (priority order):
- Check for existing
.worktrees/orworktrees/dir - Check CLAUDE.md for preference
- Ask user:
.worktrees/(project-local, hidden) or~/.config/superpowers/worktrees/<project>/(global)
Safety: For project-local dirs, verify they're gitignored first:
git check-ignore -q .worktrees 2>/dev/null
# If NOT ignored: add to .gitignore + commit before proceedingCreate + setup:
# Create worktree with new branch
git worktree add .worktrees/feature-name -b feat/feature-name
cd .worktrees/feature-name
# Auto-detect and run project setup
[ -f package.json ] && npm install
[ -f Cargo.toml ] && cargo build
[ -f requirements.txt ] && pip install -r requirements.txt
# Verify clean baseline
npm test # or appropriate test command
# List worktrees
git worktree list
# Remove worktree (after merge/discard)
git worktree remove .worktrees/feature-nameCommon Workflows
Start New Feature
git checkout -b feat/feature-name
# ... make changes ...
git add changed-files.ts
git commit -m "feat: add feature"
git push -u origin feat/feature-name
gh pr create --title "feat: add feature" --body "Description"Fix a Bug from Issue
# View the issue first
gh issue view 42
# Create branch
git checkout -b fix/issue-42
# ... fix the bug ...
git add .
git commit -m "fix: resolve issue #42"
git push -u origin fix/issue-42
gh pr create --title "fix: resolve issue #42" --body "Closes #42"Create Issue for Future Work
gh issue create \
--title "feat: future enhancement" \
--body "## Description
What needs to be done.
## Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2" \
--label "enhancement"Safety Rules
- Never force push to main/master - Always create feature branches
- Stage specific files - Avoid
git add -Awhich can include secrets - Check before commit - Run
git statusandgit diff --staged - Don't commit secrets - Check for .env, credentials, API keys
- Ask before destructive operations - reset --hard, branch -D, etc.
Troubleshooting
Auth Issues - GITHUB_TOKEN Conflict (Common!)
Symptom: gh commands fail with "Bad credentials" even though gh auth status shows you're logged in.
Cause: An old/expired GITHUB_TOKEN in your shell config (.zshrc, .bashrc) overrides the valid keyring auth.
Diagnosis:
gh auth status
# Look for: "The token in GITHUB_TOKEN is invalid"
# And: "Active account: false" even though logged inFix:
# 1. Find where GITHUB_TOKEN is set
grep -r "GITHUB_TOKEN" ~/.zshrc ~/.bashrc ~/.zprofile 2>/dev/null
# 2. Remove that line from your shell config (or comment it out)
# The gh CLI uses keyring auth now which is better (auto-refreshes)
# 3. Unset in current session
unset GITHUB_TOKEN
# 4. Verify it works
gh auth status # Should show "Active account: true"Why this happens: Old GitHub workflows used personal access tokens exported as GITHUB_TOKEN. The gh CLI now uses OAuth via keyring, which is more secure and auto-refreshes. The old env var takes precedence and breaks things.
Re-authenticate
gh auth loginPush Rejected
# Fetch and rebase
git fetch origin
git rebase origin/main
# Then push
git pushBest Pass Rate
100%
Claude Sonnet
Assertions
9
1 model tested
Avg Cost / Run
$0.0079
across models
Fastest (p50)
1.8s
Claude Sonnet
Behavior Evals
Phase 2 baseline — skill quality on ClaudeBehavior Baseline
| Assertion | Claude Sonnet | Consensus |
|---|---|---|
| branch-is-made-pr-ready | 1/1 | |
| pr-is-created-with-usable-context | 1/1 | |
| operator-gets-pr-link-and-next-state | 1/1 | |
| root-cause-is-identified | 1/1 | |
| remediation-steps-are-actionable | 1/1 | |
| user-is-not-sent-to-destructive-reauth-first | 1/1 | |
| only-requested-files-are-staged | 1/1 | |
| commit-references-the-fix-context | 1/1 | |
| commit-artifact-is-ready-for-review-flow | 1/1 |
Token Usage
Cost per Run
| Model | Input Tokens | Output Tokens | Cost / Run | Cost / 1K Runs |
|---|---|---|---|---|
| Claude Sonnet | 1,700 | 570 | $0.0079 | $7.90 |
Response Time (p50)
Response Time (p95)
| Model | p50 | p95 | Overhead |
|---|---|---|---|
| Claude Sonnet | 1.8s | 3.0s | +71% |
Last evaluated: 2026-03-14 · Real Phase 2 behavior eval · Claude Sonnet baseline
Changelog entries are derived from eval runs and skill version updates. Full cascading changelog (Phase 4D) coming soon.
Best Pass Rate
100%
Assertions
9
Models Tested
1
Evals Run
3
- +Initial release to Golems skill library
- +9 assertions across 3 eval scenarios