"GitHub CLI - manage repositories, issues, pull requests, actions, releases, and more from the command line."
Install
npx skillscat add dicklesworthstone/agent-flywheel-clawdbot-skills-and-integrations/github Install via the SkillsCat registry.
GitHub CLI Skill
Use the gh CLI to interact with GitHub repositories and services.
Authentication
Check auth status:
gh auth statusLogin:
gh auth loginRefresh token:
gh auth refreshRepositories
Clone repository:
gh repo clone owner/repoCreate new repo:
gh repo create my-repo --public --source=. --pushFork repository:
gh repo fork owner/repo --cloneView repo in browser:
gh repo view --webList your repos:
gh repo listIssues
List issues:
gh issue listCreate issue:
gh issue create --title "Bug: Login fails" --body "Description here"Create issue interactively:
gh issue createView issue:
gh issue view 123Close issue:
gh issue close 123Reopen issue:
gh issue reopen 123Comment on issue:
gh issue comment 123 --body "Working on this"Assign issue:
gh issue edit 123 --add-assignee @meAdd labels:
gh issue edit 123 --add-label "bug,priority:high"Pull Requests
List PRs:
gh pr listCreate PR:
gh pr create --title "Add feature" --body "Description"Create PR from current branch:
gh pr create --fillView PR:
gh pr view 45View PR in browser:
gh pr view 45 --webCheckout PR locally:
gh pr checkout 45Review PR:
gh pr review 45 --approve
gh pr review 45 --request-changes --body "Please fix X"
gh pr review 45 --comment --body "Looks good but..."Merge PR:
gh pr merge 45 --squash
gh pr merge 45 --merge
gh pr merge 45 --rebaseClose PR:
gh pr close 45List PR checks:
gh pr checks 45View PR diff:
gh pr diff 45Actions (CI/CD)
List workflow runs:
gh run listView run details:
gh run view 12345Watch run in progress:
gh run watch 12345View run logs:
gh run view 12345 --logRerun failed jobs:
gh run rerun 12345 --failedList workflows:
gh workflow listRun workflow manually:
gh workflow run deploy.ymlRun with inputs:
gh workflow run deploy.yml -f environment=productionDisable/enable workflow:
gh workflow disable deploy.yml
gh workflow enable deploy.ymlReleases
List releases:
gh release listCreate release:
gh release create v1.0.0 --title "Version 1.0" --notes "Release notes"Create from tag:
gh release create v1.0.0 --generate-notesUpload assets:
gh release upload v1.0.0 ./dist/app.zipDownload assets:
gh release download v1.0.0Delete release:
gh release delete v1.0.0Gists
Create gist:
gh gist create file.txt --publicCreate from stdin:
echo "Hello" | gh gist create -List gists:
gh gist listView gist:
gh gist view GIST_IDEdit gist:
gh gist edit GIST_IDSearch
Search repos:
gh search repos "react hooks" --limit 10Search issues:
gh search issues "bug authentication" --repo owner/repoSearch PRs:
gh search prs "fix memory leak" --state openSearch code:
gh search code "function handleAuth" --repo owner/repoAPI
Make API request:
gh api repos/owner/repoPOST request:
gh api repos/owner/repo/issues -f title="New issue" -f body="Description"GraphQL query:
gh api graphql -f query='{ viewer { login } }'Paginate results:
gh api repos/owner/repo/issues --paginateLabels
List labels:
gh label listCreate label:
gh label create "priority:high" --color FF0000 --description "High priority"Projects
List projects:
gh project listView project:
gh project view 1SSH Keys
List SSH keys:
gh ssh-key listAdd SSH key:
gh ssh-key add ~/.ssh/id_ed25519.pub --title "My laptop"GPG Keys
List GPG keys:
gh gpg-key listAdd GPG key:
gh gpg-key add key.gpgSecrets (for Actions)
List secrets:
gh secret listSet secret:
gh secret set MY_SECRETSet from file:
gh secret set MY_SECRET < secret.txtDelete secret:
gh secret delete MY_SECRETVariables (for Actions)
List variables:
gh variable listSet variable:
gh variable set MY_VAR --body "value"Extensions
List installed extensions:
gh extension listInstall extension:
gh extension install owner/gh-extensionBrowse extensions:
gh extension browseAliases
Create alias:
gh alias set pv 'pr view'List aliases:
gh alias listConfiguration
View config:
gh config listSet default editor:
gh config set editor vimSet default browser:
gh config set browser "open"Common Workflows
Quick PR workflow:
# Create branch, commit, push, create PR
git checkout -b feature/my-feature
# ... make changes ...
git add . && git commit -m "Add feature"
git push -u origin feature/my-feature
gh pr create --fillReview and merge:
gh pr checkout 45
# ... review code ...
gh pr review --approve
gh pr merge --squash --delete-branchCheck CI status:
gh pr checks
gh run watch