Agent skill
github
Comprehensive GitHub operations via gh CLI. Manage repositories, issues, pull requests, Actions workflows, code security, discussions, projects, gists, notifications, and more. Use for any GitHub-related task including creating PRs, reviewing code, managing issues, monitoring CI/CD, and analyzing security alerts.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/github-housegarofalo-claude-code-base
SKILL.md
GitHub Operations Skill
Triggers
Use this skill when you see:
- github, gh, pull request, PR, issue, repository
- Actions, workflow, CI/CD, pipeline
- release, tag, milestone, project board
- code review, security alert, Dependabot
- gist, discussion, notification
Instructions
Authentication & Setup
# Check authentication status
gh auth status
# Login if needed
gh auth login
# Set default repository context
gh repo set-default owner/repo
Pull Request Operations
# Create PR with full details
gh pr create --title "Title" --body "Description" --base main --head feature-branch
# Create PR from template
gh pr create --title "Title" --body-file .github/PULL_REQUEST_TEMPLATE.md
# List PRs
gh pr list --state open --limit 20
gh pr list --author @me --state all
# View PR details
gh pr view 123
gh pr view 123 --comments
# Review PR
gh pr review 123 --approve
gh pr review 123 --request-changes --body "Changes needed"
gh pr review 123 --comment --body "Looks good overall"
# Merge PR
gh pr merge 123 --squash --delete-branch
gh pr merge 123 --rebase
gh pr merge 123 --merge
# Check PR status
gh pr checks 123 --watch
# Checkout PR locally
gh pr checkout 123
Issue Management
# Create issue
gh issue create --title "Bug: description" --body "Details" --label "bug,priority:high"
# List issues
gh issue list --state open --assignee @me
gh issue list --label "bug" --milestone "v1.0"
# View and update
gh issue view 456
gh issue edit 456 --add-label "in-progress"
gh issue close 456 --comment "Fixed in #123"
# Link issues to PRs
gh pr create --title "Fix #456" --body "Closes #456"
Repository Management
# Clone repository
gh repo clone owner/repo
gh repo clone owner/repo -- --depth 1
# Create repository
gh repo create my-repo --public --description "Description"
gh repo create my-repo --private --template owner/template
# Fork repository
gh repo fork owner/repo --clone
# View repository info
gh repo view owner/repo
gh repo view --web
GitHub Actions
# List workflows
gh workflow list
# View workflow runs
gh run list --workflow "CI"
gh run list --status failure
# View specific run
gh run view 12345
gh run view 12345 --log
# Trigger workflow
gh workflow run workflow.yml
gh workflow run workflow.yml -f input_name=value
# Cancel run
gh run cancel 12345
# Re-run failed jobs
gh run rerun 12345 --failed
Releases & Tags
# Create release
gh release create v1.0.0 --title "Version 1.0.0" --notes "Release notes"
gh release create v1.0.0 --generate-notes
gh release create v1.0.0 ./dist/* --prerelease
# List releases
gh release list
# Download release assets
gh release download v1.0.0
# Delete release
gh release delete v1.0.0 --yes
Code Security
# View security alerts
gh api repos/{owner}/{repo}/code-scanning/alerts
gh api repos/{owner}/{repo}/dependabot/alerts
# View secret scanning alerts
gh api repos/{owner}/{repo}/secret-scanning/alerts
API Access
# GraphQL query
gh api graphql -f query='query { viewer { login } }'
# REST API
gh api repos/{owner}/{repo}
gh api repos/{owner}/{repo}/pulls --method POST -f title="Title" -f body="Body" -f head="branch" -f base="main"
# Paginated results
gh api repos/{owner}/{repo}/issues --paginate
Gists
# Create gist
gh gist create file.txt --public --desc "Description"
gh gist create file1.txt file2.txt
# List gists
gh gist list
# View gist
gh gist view gist_id
Projects (v2)
# List projects
gh project list
# View project
gh project view 1
# Add issue to project
gh project item-add 1 --owner @me --url issue_url
Best Practices
- PR Descriptions: Always include context, testing steps, and screenshots for UI changes
- Issue Templates: Use templates for consistent issue reporting
- Labels: Maintain consistent labeling for filtering and automation
- Branch Protection: Require reviews and passing checks before merge
- Commit Messages: Reference issues in commits (e.g., "Fix #123")
- Draft PRs: Use draft status for work-in-progress
Common Workflows
Feature Development
- Create issue for tracking
- Create feature branch
- Make commits referencing issue
- Create PR linking to issue
- Request reviews
- Address feedback
- Merge and close issue
Hotfix
- Create branch from main/production
- Make minimal fix
- Create PR with urgent label
- Fast-track review
- Merge with squash
- Tag release if needed
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?