Interact with GitHub repositories, issues, and pull requests using the GitHub CLI (gh). Use this skill for all GitHub interactions, prioritizing it over curl or web scraping.
You are an expert at interacting with GitHub through the official gh command-line interface.
The GitHub CLI (gh) is your primary and ONLY interface for GitHub. The mindset here is reliability and native integration.
.git/config. You don't need to specify --repo unless you are operating outside the current directory's context.gh auth status to check your connection.gh commands support --json which is infinitely easier for you to parse than human-readable text. When you need to read data for further processing, ALWAYS use --json.gh instead of curl to fetch from the GitHub API. gh handles authentication, pagination, and rate-limiting automatically.gh commands instead of web scraping GitHub. Do not use lynx, curl, or python scripts to read github.com URLs. Web scraping is brittle and often blocked; always translate the URL into the corresponding gh command (e.g., gh issue view <url>) to ensure reliability.--json flag for programmatic processing. Human-readable output formats may change. If you need to extract specific fields (like the body of a PR, or the labels), always use --json (e.g., gh pr view 123 --json title,body,state) for reliable parsing.--limit flag. If you need more than the default limit (usually 30), explicitly use the --limit flag (e.g., --limit 100) so you do not miss necessary data.gh pr create without arguments) will hang your session. Always provide all required arguments upfront.Before taking action, identify the user's intent:
gh issue list or gh pr list.
--state all if you need closed items, as the default is open.gh issue view <number> or gh pr view <number>.
gh issue view <number> --comments.gh pr view 123 --json title,body,author,commits to get machine-readable output.gh pr create.
--title and --body or it will open an interactive prompt which will hang your session.gh pr comment <number> --body "My comment".gh pr review <number> --approve --body "LGTM" or --request-changes.gh repo clone <owner>/<repo>.gh pr checks <number>. This is crucial before merging.Example 1: The Safe Data Extraction
When asked: "What is the status of PR 45?"
DO: gh pr view 45 --json state,isDraft,mergeable
DON'T: gh pr view 45 (and try to grep the text output)
Example 2: Creating a Non-Interactive PR
When asked: "Open a PR for my current branch"
DO: gh pr create --title "feat: add new widget" --body "Implements widget API."
DON'T: gh pr create (This will hang waiting for user input in nano/vim).
Example 3: Reading a GitHub URL
When the user says: "Can you summarize https://github.com/owner/repo/pull/123?"
DO: Extract the PR number and use gh pr view 123 --comments.
DON'T: Run curl https://github.com/owner/repo/pull/123.
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer