github
GitHub CLI - manage repositories, issues, pull requests, actions, releases, and more from the command line.
Best use case
github 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. GitHub CLI - manage repositories, issues, pull requests, actions, releases, and more from the command line.
GitHub CLI - manage repositories, issues, pull requests, actions, releases, and more from the command line.
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" skill to help with this workflow task. Context: GitHub CLI - manage repositories, issues, pull requests, actions, releases, and more from the command line.
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/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How github Compares
| Feature / Agent | github | 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?
GitHub CLI - manage repositories, issues, pull requests, actions, releases, and more from the command line.
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 Skill
Use the `gh` CLI to interact with GitHub repositories and services.
## Authentication
Check auth status:
```bash
gh auth status
```
Login:
```bash
gh auth login
```
Refresh token:
```bash
gh auth refresh
```
## Repositories
Clone repository:
```bash
gh repo clone owner/repo
```
Create new repo:
```bash
gh repo create my-repo --public --source=. --push
```
Fork repository:
```bash
gh repo fork owner/repo --clone
```
View repo in browser:
```bash
gh repo view --web
```
List your repos:
```bash
gh repo list
```
## Issues
List issues:
```bash
gh issue list
```
Create issue:
```bash
gh issue create --title "Bug: Login fails" --body "Description here"
```
Create issue interactively:
```bash
gh issue create
```
View issue:
```bash
gh issue view 123
```
Close issue:
```bash
gh issue close 123
```
Reopen issue:
```bash
gh issue reopen 123
```
Comment on issue:
```bash
gh issue comment 123 --body "Working on this"
```
Assign issue:
```bash
gh issue edit 123 --add-assignee @me
```
Add labels:
```bash
gh issue edit 123 --add-label "bug,priority:high"
```
## Pull Requests
List PRs:
```bash
gh pr list
```
Create PR:
```bash
gh pr create --title "Add feature" --body "Description"
```
Create PR from current branch:
```bash
gh pr create --fill
```
View PR:
```bash
gh pr view 45
```
View PR in browser:
```bash
gh pr view 45 --web
```
Checkout PR locally:
```bash
gh pr checkout 45
```
Review PR:
```bash
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:
```bash
gh pr merge 45 --squash
gh pr merge 45 --merge
gh pr merge 45 --rebase
```
Close PR:
```bash
gh pr close 45
```
List PR checks:
```bash
gh pr checks 45
```
View PR diff:
```bash
gh pr diff 45
```
## Actions (CI/CD)
List workflow runs:
```bash
gh run list
```
View run details:
```bash
gh run view 12345
```
Watch run in progress:
```bash
gh run watch 12345
```
View run logs:
```bash
gh run view 12345 --log
```
Rerun failed jobs:
```bash
gh run rerun 12345 --failed
```
List workflows:
```bash
gh workflow list
```
Run workflow manually:
```bash
gh workflow run deploy.yml
```
Run with inputs:
```bash
gh workflow run deploy.yml -f environment=production
```
Disable/enable workflow:
```bash
gh workflow disable deploy.yml
gh workflow enable deploy.yml
```
## Releases
List releases:
```bash
gh release list
```
Create release:
```bash
gh release create v1.0.0 --title "Version 1.0" --notes "Release notes"
```
Create from tag:
```bash
gh release create v1.0.0 --generate-notes
```
Upload assets:
```bash
gh release upload v1.0.0 ./dist/app.zip
```
Download assets:
```bash
gh release download v1.0.0
```
Delete release:
```bash
gh release delete v1.0.0
```
## Gists
Create gist:
```bash
gh gist create file.txt --public
```
Create from stdin:
```bash
echo "Hello" | gh gist create -
```
List gists:
```bash
gh gist list
```
View gist:
```bash
gh gist view GIST_ID
```
Edit gist:
```bash
gh gist edit GIST_ID
```
## Search
Search repos:
```bash
gh search repos "react hooks" --limit 10
```
Search issues:
```bash
gh search issues "bug authentication" --repo owner/repo
```
Search PRs:
```bash
gh search prs "fix memory leak" --state open
```
Search code:
```bash
gh search code "function handleAuth" --repo owner/repo
```
## API
Make API request:
```bash
gh api repos/owner/repo
```
POST request:
```bash
gh api repos/owner/repo/issues -f title="New issue" -f body="Description"
```
GraphQL query:
```bash
gh api graphql -f query='{ viewer { login } }'
```
Paginate results:
```bash
gh api repos/owner/repo/issues --paginate
```
## Labels
List labels:
```bash
gh label list
```
Create label:
```bash
gh label create "priority:high" --color FF0000 --description "High priority"
```
## Projects
List projects:
```bash
gh project list
```
View project:
```bash
gh project view 1
```
## SSH Keys
List SSH keys:
```bash
gh ssh-key list
```
Add SSH key:
```bash
gh ssh-key add ~/.ssh/id_ed25519.pub --title "My laptop"
```
## GPG Keys
List GPG keys:
```bash
gh gpg-key list
```
Add GPG key:
```bash
gh gpg-key add key.gpg
```
## Secrets (for Actions)
List secrets:
```bash
gh secret list
```
Set secret:
```bash
gh secret set MY_SECRET
```
Set from file:
```bash
gh secret set MY_SECRET < secret.txt
```
Delete secret:
```bash
gh secret delete MY_SECRET
```
## Variables (for Actions)
List variables:
```bash
gh variable list
```
Set variable:
```bash
gh variable set MY_VAR --body "value"
```
## Extensions
List installed extensions:
```bash
gh extension list
```
Install extension:
```bash
gh extension install owner/gh-extension
```
Browse extensions:
```bash
gh extension browse
```
## Aliases
Create alias:
```bash
gh alias set pv 'pr view'
```
List aliases:
```bash
gh alias list
```
## Configuration
View config:
```bash
gh config list
```
Set default editor:
```bash
gh config set editor vim
```
Set default browser:
```bash
gh config set browser "open"
```
## Common Workflows
### Quick PR workflow:
```bash
# 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 --fill
```
### Review and merge:
```bash
gh pr checkout 45
# ... review code ...
gh pr review --approve
gh pr merge --squash --delete-branch
```
### Check CI status:
```bash
gh pr checks
gh run watch
```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.