| name | github-integration |
| description | Use when working with GitHub issues, pull requests, releases, or repository operations. Provides systematic approach to GitHub API interactions via gh CLI. |
| trigger | user mentions GitHub issues, PRs, releases, or needs repository operations |
GitHub Integration Skill
Purpose
Systematize GitHub operations for AI agents working with issues, pull requests, releases, and repository management. Uses gh CLI for all GitHub interactions.
When to Use
- Creating or updating GitHub issues
- Managing pull requests (create, review, merge)
- Creating releases and tags
- Repository operations (branch management, file operations)
- Issue labeling and assignment
- GitHub project board operations
Prerequisites
gh auth status
gh auth login
Core Operations
Issue Management
Create Issue
gh issue create --title "Issue title" --body "Issue description"
gh issue create \
--title "Fix login timeout" \
--body "Users are experiencing timeout errors during login" \
--label "bug,priority-high" \
--assignee "@me"
gh issue create \
--title "Add user dashboard" \
--body "Implement user dashboard with analytics" \
--project "Q2 Roadmap" \
--milestone "v2.0"
Update Issue
gh issue comment 123 --body "Investigation complete. Root cause identified."
gh issue edit 123 --add-label "in-progress,needs-review"
gh issue close 123 --comment "Fixed in #456"
gh issue reopen 123 --comment "Regression detected in v1.2.3"
List/Search Issues
gh issue list --state open --limit 20
gh issue list \
--label "bug" \
--assignee "@me" \
--state open
gh search issues "login timeout" --repo owner/repo
Pull Request Management
Create PR
gh pr create \
--title "feat: Add user authentication" \
--body "Implements JWT-based authentication system"
gh pr create \
--title "fix: Resolve login timeout" \
--body "Fixes #123\n\nChanges:\n- Increased timeout to 30s\n- Added retry logic" \
--reviewer "teammate1,teammate2" \
--label "bug,needs-review" \
--base main \
--head feature/login-fix
gh pr create --draft --title "WIP: New feature"
Review PR
gh pr view 456
gh pr checkout 456
gh pr review 456 --approve --body "LGTM! Great work."
gh pr review 456 --request-changes --body "Please add unit tests for the new function."
gh pr review 456 --comment --body "Question: Why did you choose this approach?"
Merge PR
gh pr merge 456 --merge
gh pr merge 456 --squash --delete-branch
gh pr merge 456 --rebase
Release Management
Create Release
gh release create v1.2.0 \
--title "Version 1.2.0" \
--notes "## Changes\n- Feature A\n- Bug fix B"
gh release create v1.2.0 --target main
gh release create v1.2.0 \
--title "Version 1.2.0" \
./dist/app.zip ./dist/checksums.txt
Manage Releases
gh release list --limit 10
gh release view v1.2.0
gh release delete v1.2.0 --yes
gh release upload v1.2.0 ./dist/app.zip
Repository Operations
Branch Management
gh branch list
gh branch create feature/new-feature --base main
gh branch delete feature/old-feature --yes
Repository Info
gh repo view
gh api repos/{owner}/{repo}/contents
gh repo view --json stargazerCount,forkCount,openIssuesCount
AmazingTeam Integration
Issue Creation Workflow
gh issue create \
--title "[Bug] Login timeout on slow networks" \
--body "## Description\nUsers report 30-second timeouts...\n\n## Steps to Reproduce\n1. ...\n2. ...\n\n## Expected Behavior\n...\n\n## Environment\n- Browser: ...\n- Version: ..." \
--label "bug,needs-triage"
gh issue create \
--title "[Subtask] Investigate timeout configuration" \
--body "Parent: #123\n\nInvestigate current timeout settings and identify bottlenecks." \
--label "subtask,investigation"
gh issue comment 123 --body "Subtask created: #124"
PR Workflow Integration
gh branch create feature/login-timeout-fix --base main
gh pr create \
--title "fix: Increase login timeout and add retry logic" \
--body "Fixes #123\n\n## Changes\n- Increased timeout from 10s to 30s\n- Added exponential backoff retry\n- Added unit tests\n\n## Testing\n- [x] Unit tests pass\n- [x] Manual testing on slow network\n\n## Checklist\n- [x] Code follows project conventions\n- [x] Tests added/updated\n- [x] Documentation updated" \
--label "bug,needs-review" \
--reviewer "@me"
gh pr merge --squash --delete-branch
Error Handling
Common Errors
Rate Limiting
gh api rate_limit
sleep 60 && gh issue list
Best Practices
DO
- ✅ Use
--body-file for long descriptions
- ✅ Link issues with "Fixes #123" or "Closes #123"
- ✅ Use semantic commit prefixes in PR titles (feat:, fix:, refactor:)
- ✅ Delete branches after merging
- ✅ Add meaningful labels to issues and PRs
DON'T
- ❌ Force push to protected branches
- ❌ Merge without review (unless explicitly allowed)
- ❌ Create PRs without description
- ❌ Ignore CI failures before merging
Two-Repository Release (AmazingTeam Specific)
For projects with dual repository release process:
cd amazingteam
git add -A && git commit -m "chore: Release v3.0.16"
git push origin main
git tag v3.0.16
git push origin v3.0.16
cd ../amazingteam-action
git add -A && git commit -m "chore: Update to v3.0.16"
git push origin main
git tag v3.0.16
git push origin v3.0.16
cd ../amazingteam
npm publish --otp=<OTP>
Examples
Complete Feature Workflow
ISSUE=$(gh issue create \
--title "feat: Add dark mode support" \
--body "Implement dark mode with system preference detection" \
--label "enhancement" \
--json number --jq '.number')
gh branch create "feature/dark-mode-$ISSUE" --base main
gh pr create \
--title "feat: Add dark mode support" \
--body "Closes #$ISSUE\n\nImplementation details..." \
--label "enhancement,needs-review"
gh pr merge --squash --delete-branch
gh issue close $ISSUE --comment "Implemented in PR"