github-cli
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--repounless 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 statusto check your connection. - JSON Outputs:
ghcommands support--jsonwhich 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 (NEVER Do These)
- NEVER use
curlto fetch from the GitHub API.ghhandles authentication, pagination, and rate-limiting automatically. - NEVER attempt to web scrape GitHub. Do not use
lynx,curl, or python scripts to readgithub.comURLs. Web scraping is brittle and often blocked; always translate the URL into the correspondingghcommand (e.g.,gh issue view <url>) to ensure reliability. - NEVER parse human-readable
ghoutput when you need structured data. 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. - NEVER forget to handle pagination. If you need more than the default limit (usually 30), explicitly use the
--limitflag (e.g.,--limit 100) so you do not miss necessary data. - NEVER use interactive commands. Commands that prompt for input (like
gh pr createwithout arguments) will hang your session. Always provide all required arguments upfront.
More from hrdtbs/agent-skills
plan-self-review
Self-evaluate a plan on a 100-point scale after it is created or updated. Make sure to use this skill immediately whenever you create a plan or update a plan, even if the user does not explicitly ask for a review. This skill ensures that the plan is clear, comprehensive, feasible, and consistent before execution.
45create-pull-request
Create a GitHub pull request safely and reliably using project conventions. Make sure to use this skill whenever the user asks to create a PR, submit changes for review, open a pull request, or mentions "PR", "プルリク", or "pull request". It handles commit verification, branch validation, and PR creation using the gh CLI.
40commit
Expert-level commit creation and formatting following Conventional Commits. Make sure to use this skill whenever you need to create a commit message, save changes to git, structure a logical commit history, or when the user mentions 'commit', 'git commit', 'コミット', '変更をコミット', or asks you to push their code.
39mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
3prompt-evaluator
Evaluate and score user-written LLM prompts on a 100-point scale across 5 axes (Clarity, Structure, Information Content, Specificity, Context), providing specific improvement suggestions and a revised prompt. Make sure to use this skill whenever the user asks to evaluate, review, score, or improve a prompt, or when they say things like 'このプロンプトどう?', 'プロンプトを評価して', 'rate my prompt', 'review this prompt', or 'is this prompt good enough?'. This skill focuses on scoring existing prompts, not writing new ones from scratch.
3skill-judge
Evaluate Agent Skill design quality against official specifications and best practices. Use when reviewing, auditing, or improving SKILL.md files and skill packages. Provides multi-dimensional scoring and actionable improvement suggestions.
3