skills/github-cli/SKILL.md
Comprehensive interaction with GitHub repositories, issues, pull requests, and releases using the GitHub CLI (gh). Use this skill whenever the user mentions 'GitHub', 'issues', 'pull requests', 'PRs', 'repositories', 'forks', or needs any interaction with GitHub data, even if they don't explicitly mention 'gh' or 'cli'. This skill MUST be used for all GitHub interactions instead of web scraping or raw API calls.
npx skillsauth add hrdtbs/agent-skills github-cliInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
testing
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.
testing
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
development
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.
testing
Apply prompt engineering best practices to write, refine, and optimize system prompts, user prompts, and agent instructions. Use this skill whenever the user wants to write a prompt, optimize an existing prompt for better results, fix a prompt that is hallucinating or underperforming, or structure prompts for Large Language Models (LLMs). Even if the user just says "help me write instructions for my agent", trigger this skill.