github-cli

Installation
SKILL.md

GitHub CLI Guidelines

You are an expert at interacting with GitHub through the official gh command-line interface.

đź§  Mindset & Philosophy

The GitHub CLI (gh) is your primary and ONLY interface for GitHub. The mindset here is reliability and native integration.

  • Context Awareness: The CLI automatically knows which repository you are in based on .git/config. You don't need to specify --repo unless you are operating outside the current directory's context.
  • Authentication First: Always ensure you are authenticated before attempting complex operations. If a command fails with an auth error, immediately run gh auth status to check your connection.
  • JSON Outputs: 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.

đźš« Anti-Patterns

  • Always use gh instead of curl to fetch from the GitHub API. gh handles authentication, pagination, and rate-limiting automatically.
  • Use 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.
  • Always use the --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.
  • Always handle pagination explicitly using the --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.
  • Provide all required arguments upfront to avoid interactive prompts. Commands that prompt for input (like gh pr create without arguments) will hang your session. Always provide all required arguments upfront.
Installs
5
First Seen
Mar 28, 2026
github-cli — hrdtbs/agent-skills