Loading...
Loading...
Guides usage of the GitHub CLI (gh) for interacting with GitHub repositories, PRs, issues, and API. Use when working with GitHub resources instead of WebFetch or curl.
npx skill4agent add trailofbits/skills using-gh-clighcurlwgetWebFetchWebFetchcurl*.github.iogit commitgit pushgitghcurlwgetWebFetchgh# Clone to a session-scoped temp directory (cleaned up automatically on session end)
clonedir="$TMPDIR/gh-clones-${CLAUDE_SESSION_ID}"
mkdir -p "$clonedir"
gh repo clone owner/repo "$clonedir/repo" -- --depth 1subagent_type=ExploreTask(subagent_type="Explore", prompt="In $clonedir/repo/, find how authentication is implemented")gh repo clone--depth 1gh api# View a repo
gh repo view owner/repo
# List and view PRs
gh pr list --repo owner/repo
gh pr view 123 --repo owner/repo
# List and view issues
gh issue list --repo owner/repo
gh issue view 456 --repo owner/repo
# Call any REST API endpoint
gh api repos/owner/repo/contents/README.md
# Call with pagination and jq filtering
gh api repos/owner/repo/pulls --paginate --jq '.[].title'| Instead of | Use |
|---|---|
| |
| Clone with |
| Clone with |
| |
| |
| |
| |