| name | github |
| description | Manage GitHub repositories — create and review pull requests, check CI/actions status, search code, manage issues, and approve or merge changes. Use this skill for any GitHub project workflow including code review, releases, and hotfixes, even if the user doesn't explicitly say GitHub or PR. |
| compatibility | Requires `gh` CLI. |
| allowed-tools | Bash(git:*), Bash(gh:*), Bash(cat:*), Read |
GitHub
Single surface: gh CLI for read + write (lifecycle, comments, CI watching, search).
gh CLI rules
- Never auto-commit/push untracked files. Run
git status first; ask the user before adding.
- PR creator = authenticated
gh user (no flag changes this).
@me = current user. Branch names work wherever a PR number does.
- Other repo:
-R owner/repo.
- JSON output:
--json <fields> (requires explicit field list, e.g. --json number,title,state).
- Templates auto-apply from
.github/PULL_REQUEST_TEMPLATE.md when using --fill or no body flag.
Auth: gh auth status to check. gh auth login --hostname github.com to log in (pick HTTPS + browser).
gh cheatsheet
gh pr create --fill --assignee @me
gh pr create --fill --assignee @me --reviewer user --label foo --draft
template=$(cat .github/PULL_REQUEST_TEMPLATE.md 2>/dev/null)
gh pr create --title "..." --body "$template" --assignee @me
gh pr view [123|branch] --comments
gh pr view --web
gh pr comment [123] --body "comment"
gh pr list --assignee @me
gh pr list --search "reviewer:@me label:needs-review draft:true"
gh pr review 123 --approve [-R owner/repo]
gh pr review 123 --request-changes --body "..."
gh pr merge 123 --squash --delete-branch
gh pr close 123
gh pr ready 123
gh pr edit 123 --add-reviewer user
gh pr diff 123
gh pr checks 123 [--watch]
gh issue create --title "..." --body "..." --assignee @me --label bug
gh issue list --assignee @me
gh issue view 123 --comments
gh issue comment 123 --body "comment"
gh issue close 123
gh run list [--workflow=ci.yml]
gh run view <run-id> [--log-failed]
gh run watch <run-id>
gh workflow run <workflow> -f key=value
gh search prs "is:open author:@me"
gh search issues "is:open label:bug"
gh search code "func Foo" --owner owner --repo repo
grep -i "name" .github/CODEOWNERS
Workflows
Draft → ready: gh pr create --fill --draft --assignee @me → gh pr checks --watch → gh pr ready + gh pr edit --add-reviewer user.
Hotfix: gh pr create --fill --assignee @me --reviewer lead --label hotfix → gh pr checks --watch → gh pr merge --squash --delete-branch.
Review: gh pr list --search "review-requested:@me" → gh pr view 123 --comments → gh pr review 123 --approve.
Rules
Conventional Commits: Use Conventional Commits for all commit messages and PR titles.
Simple branch names: Use feat/, fix/, docs/, ci/, or chore/ prefixes followed by a short slug (e.g. feat/oauth-retry). No ticket IDs, team names, or usernames.
Never commit to main: Always branch, commit, push, and create a PR. The only exception is gh pr merge. No direct pushes to main or master.
Concise PR descriptions: Lead with the purpose of the change, then add only what a reviewer needs — links to related PRs/issues, code snippets highlighting key points, before/after notes. Skip checklists unless they track work inside this PR.