askill
github-cli

github-cliSafety 85Repository

Interact with GitHub using the gh CLI - PRs, issues, repos, releases, and actions. Trigger terms: github, gh, pull request, PR, issue, release, actions, workflow, repo.

8 stars
1.2k downloads
Updated 2/13/2026

Package Files

Loading files...
SKILL.md

Use when

  • Creating, viewing, or merging pull requests
  • Managing issues (create, close, comment)
  • Checking workflow/action status
  • Creating releases
  • Cloning or forking repos

Don't use when

  • Local git operations (use git directly)
  • Non-GitHub remotes (GitLab, Bitbucket)

Outputs

  • PRs, issues, releases, or action logs in GitHub (no local files unless explicitly created).

Templates or Examples

  • Use the command tables below as templates.

Prerequisites

  • gh CLI installed
  • SSH key configured for GitHub access

Quick Reference

Pull Requests

ActionCommand
List PRsgh pr list
View PRgh pr view <number>
Create PRgh pr create --title "..." --body "..."
Checkout PRgh pr checkout <number>
Merge PRgh pr merge <number>
PR diffgh pr diff <number>
PR checksgh pr checks <number>

Issues

ActionCommand
List issuesgh issue list
View issuegh issue view <number>
Create issuegh issue create --title "..." --body "..."
Close issuegh issue close <number>
Commentgh issue comment <number> --body "..."

Repos & Releases

ActionCommand
Clonegh repo clone <owner>/<repo>
Forkgh repo fork <owner>/<repo>
View repogh repo view
Create releasegh release create <tag> --title "..." --notes "..."
List releasesgh release list

Actions & Workflows

ActionCommand
List runsgh run list
View rungh run view <run-id>
Watch rungh run watch <run-id>
Rerun failedgh run rerun <run-id> --failed
List workflowsgh workflow list

API & GraphQL

REST API:

gh api repos/<owner>/<repo>/pulls
gh api repos/<owner>/<repo>/issues/<number>/comments

GraphQL (for data not exposed by gh pr view):

# List PR review threads (gh pr view doesn't expose these)
gh api graphql -F owner=<owner> -F name=<repo> -F number=<pr> -f query='
query($owner:String!, $name:String!, $number:Int!){
  repository(owner:$owner,name:$name){
    pullRequest(number:$number){
      reviewThreads(first:100){
        nodes{id isResolved isOutdated comments(first:50){nodes{id author{login} body}}}
        pageInfo{hasNextPage endCursor}
      }
    }
  }
}'

# Resolve a review thread
gh api graphql -F threadId=<threadId> -f query='
mutation($threadId:ID!){
  resolveReviewThread(input:{threadId:$threadId}){thread{isResolved}}
}'

Pagination: If pageInfo.hasNextPage is true, repeat with after: "<endCursor>".

Procedure

  1. Ensure gh auth status shows authenticated
  2. Use gh pr list or gh issue list to find items
  3. Perform action with appropriate command
  4. Verify with gh pr checks or gh run list
  5. Always use a heredoc with --body-file or a specific encoding that supports \n correctly

Checks & Guardrails

  • Always check PR status before merging
  • Use --draft for work-in-progress PRs
  • Prefer gh pr merge --squash for clean history
  • Check gh run list after pushing to verify CI
  • Use GraphQL for review threads (gh pr view doesn't expose them)
  • Handle pagination when results exceed 100 items

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

88/100Analyzed 2/20/2026

Comprehensive GitHub CLI skill with extensive command tables, GraphQL examples, and clear structure. Covers PRs, issues, repos, releases, and workflows with actionable guidance. Includes safety guardrails and is highly reusable across projects. Minor gaps in troubleshooting and complex scenario details.

85
90
90
85
90

Metadata

Licenseunknown
Version-
Updated2/13/2026
PublisherTh0rgal

Tags

apici-cdgithubgithub-actionsgraphqlsecurity