github-cli
Encourages proactive use of GitHub CLI (gh) for gathering context on PRs, issues, comments, and repository information when working with GitHub-related tasks.
Best use case
github-cli is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Encourages proactive use of GitHub CLI (gh) for gathering context on PRs, issues, comments, and repository information when working with GitHub-related tasks.
Encourages proactive use of GitHub CLI (gh) for gathering context on PRs, issues, comments, and repository information when working with GitHub-related tasks.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "github-cli" skill to help with this workflow task. Context: Encourages proactive use of GitHub CLI (gh) for gathering context on PRs, issues, comments, and repository information when working with GitHub-related tasks.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/github-cli/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How github-cli Compares
| Feature / Agent | github-cli | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Encourages proactive use of GitHub CLI (gh) for gathering context on PRs, issues, comments, and repository information when working with GitHub-related tasks.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# GitHub CLI Context Gathering This skill encourages proactive use of the GitHub CLI (`gh`) to gather rich context when working with GitHub-related tasks. ## Core Philosophy When the user mentions **PRs, issues, branches, code reviews, comments, or anything GitHub-related**, proactively use `gh` commands to gather context rather than relying solely on local git commands. **Local git** tells you about commits and branches. **GitHub CLI** tells you about the *conversation* around those changes — PR descriptions, review comments, issue discussions, CI status, and more. ## When to Use gh Proactively Use `gh` commands when the user mentions or asks about: - **PRs / Pull Requests** — view, diff, comments, reviews, checks - **Issues** — view, comments, labels, assignees - **Code reviews** — review comments, requested changes - **CI/CD status** — check runs, workflow status - **Repository information** — branches, releases, collaborators - **GitHub links** — any `github.com` URL can be inspected via `gh` ## Key Commands Reference ### Pull Requests ```bash # View PR details (description, status, checks) gh pr view PR_NUMBER # View PR diff gh pr diff PR_NUMBER # List PR comments gh api repos/OWNER/REPO/pulls/PR_NUMBER/comments # List review comments (inline code comments) gh api repos/OWNER/REPO/pulls/PR_NUMBER/reviews # Check PR status and CI checks gh pr checks PR_NUMBER # List open PRs gh pr list # List PRs by author gh pr list --author USERNAME ``` ### Issues ```bash # View issue details gh issue view ISSUE_NUMBER # List issue comments gh api repos/OWNER/REPO/issues/ISSUE_NUMBER/comments # List open issues gh issue list # Search issues gh issue list --search "QUERY" ``` ### Repository Information ```bash # View repo details gh repo view # List branches gh api repos/OWNER/REPO/branches # View recent releases gh release list # View workflow runs gh run list ``` ### Working with GitHub URLs When given a GitHub URL, extract the relevant information and use `gh`: ```bash # From: https://github.com/monzo/analytics/pull/123 gh pr view 123 --repo monzo/analytics # From: https://github.com/monzo/analytics/issues/456 gh issue view 456 --repo monzo/analytics ``` ## Context Gathering Patterns ### Before Reviewing a PR ```bash # Get the full picture gh pr view PR_NUMBER # Description and status gh pr diff PR_NUMBER # What changed gh pr checks PR_NUMBER # CI status gh api repos/OWNER/REPO/pulls/PR_NUMBER/comments # Discussion ``` ### Investigating an Issue ```bash gh issue view ISSUE_NUMBER # Issue details gh api repos/OWNER/REPO/issues/ISSUE_NUMBER/comments # Discussion ``` ### Understanding Branch Context ```bash # What PRs exist for this branch? gh pr list --head BRANCH_NAME # What's the status of my PR? gh pr status ``` ## Integration with Git Commands Combine `gh` with local git for full context: ```bash # Local: What commits are on this branch? git log origin/master..HEAD --oneline # GitHub: What's the PR discussion saying? gh pr view --comments ``` ## Tips 1. **Use `--json` for structured output** when you need to parse data: ```bash gh pr view PR_NUMBER --json title,body,reviews,comments ``` 2. **Use `gh api` for anything not covered by high-level commands** — it gives direct access to the GitHub API 3. **Specify `--repo OWNER/REPO`** when working outside the repo directory or when ambiguous 4. **Default to gathering context first** — read the PR description and comments before diving into code ## When to Invoke This Skill This skill should guide behaviour whenever GitHub-related context would be valuable. You don't need to explicitly invoke it — just remember to reach for `gh` when the user mentions: - PRs, pull requests, merge requests - Issues, tickets, bugs - Code reviews, review comments - CI checks, pipelines, workflows - Branches in the context of collaboration - Any GitHub URL
Related Skills
github-release-assistant
Generate bilingual GitHub release documentation (README.md + README.zh.md) from repo metadata and user input, and guide release prep with git add/commit/push. Use when the user asks to write or polish README files, create bilingual docs, prepare a GitHub release, or mentions release assistant/README generation.
github-repo-search
帮助用户搜索和筛选 GitHub 开源项目,输出结构化推荐报告。当用户说"帮我找开源项目"、"搜一下GitHub上有什么"、"找找XX方向的仓库"、"开源项目推荐"、"github搜索"、"/github-search"时触发。
github-actions-docs
Use when users ask how to write, explain, customize, migrate, secure, or troubleshoot GitHub Actions workflows, workflow syntax, triggers, matrices, runners, reusable workflows, artifacts, caching, secrets, OIDC, deployments, custom actions, or Actions Runner Controller, especially when they need official GitHub documentation, exact links, or docs-grounded YAML guidance.
github-issue-creator
Convert raw notes, error logs, voice dictation, or screenshots into crisp GitHub-flavored markdown issue reports. Use when the user pastes bug info, error messages, or informal descriptions and wants a structured GitHub issue. Supports images/GIFs for visual evidence.
github-automation
Automate GitHub repositories, issues, pull requests, branches, CI/CD, and permissions via Rube MCP (Composio). Manage code workflows, review PRs, search code, and handle deployments programmatically.
github-actions-templates
Create production-ready GitHub Actions workflows for automated testing, building, and deploying applications. Use when setting up CI/CD with GitHub Actions, automating development workflows, or creating reusable workflow templates.
address-github-comments
Use when you need to address review or issue comments on an open GitHub Pull Request using the gh CLI.
github-elements-tracking
This skill should be used when the user asks to "track work across sessions", "create an epic", "manage issue waves", "post a checkpoint", "claim an issue", "recover from compaction", "coordinate multiple agents", "update memory bank", "store large documents", or mentions GitHub Issues as persistent memory, multi-session work, context survival, agent collaboration, SERENA MCP memory, or project-level context. Provides complete protocols for using GitHub Issues as permanent memory that survives context exhaustion, with integrated SERENA MCP memory bank for project-level context and large document storage.
when-reviewing-github-pr-use-github-code-review
Comprehensive GitHub pull request code review using multi-agent swarm with specialized reviewers for security, performance, style, tests, and documentation. Coordinates security-auditor, perf-analyzer, code-analyzer, tester, and reviewer agents through mesh topology for parallel analysis. Provides detailed feedback with auto-fix suggestions and merge readiness assessment. Use when reviewing PRs, conducting code audits, or ensuring code quality standards before merge.
when-releasing-software-use-github-release-management
Comprehensive GitHub release orchestration with AI swarm coordination for automated versioning, testing, deployment, and rollback management. Coordinates release-manager, cicd-engineer, tester, and docs-writer agents through hierarchical topology to handle semantic versioning, changelog generation, release notes, deployment validation, and post-release monitoring. Supports multiple release strategies (rolling, blue-green, canary) and automated rollback. Use when creating releases, managing deployments, or coordinating version updates.
when-managing-multiple-repos-use-github-multi-repo
Multi-repository coordination, synchronization, and architecture management with AI swarm orchestration. Coordinates repo-architect, code-analyzer, and coordinator agents across multiple repositories to maintain consistency, propagate changes, manage dependencies, and ensure architectural alignment. Handles monorepo-to-multi-repo migrations, cross-repo refactoring, and synchronized releases. Use when managing microservices, multi-package ecosystems, or coordinating changes across related repositories.
when-managing-github-projects-use-github-project-management
Comprehensive GitHub project management with swarm-coordinated issue tracking, project board automation, and sprint planning. Coordinates planner, issue-tracker, and project-board-sync agents to automate issue triage, sprint planning, milestone tracking, and project board updates. Integrates with GitHub Projects v2 API for advanced automation, custom fields, and workflow orchestration. Use when managing development projects, coordinating team workflows, or automating project management tasks.