install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/SpillwaveSolutions/mastering-github-agent-skill/mastering-github-agent-skill" ~/.claude/skills/comeonoliver-skillshub-mastering-github-agent-skill && rm -rf "$T"
manifest:
skills/SpillwaveSolutions/mastering-github-agent-skill/mastering-github-agent-skill/SKILL.mdsource content
Mastering GitHub CLI
Command-line interface for GitHub operations: search, monitoring, resource creation, workflow authoring, and automation.
Contents
Quick Start
Find repos with specific files/directories
gh search code "path:.skilz" --json repository --jq '.[].repository.fullName' gh search code --filename SKILL.md gh search code --filename Dockerfile --language python
Monitor CI/CD
gh run list --workflow=CI --status=failure --limit 10 gh run watch 12345 --exit-status # Block until complete gh run view 12345 --log-failed # Failed logs only gh pr checks 123 --watch # PR CI status
Create resources
gh pr create --title "Feature" --body "Description" --reviewer @user gh issue create --title "Bug" --label bug,urgent --assignee @me gh repo fork owner/repo --clone
Trigger and monitor workflow
gh workflow run deploy.yml -f environment=staging sleep 5 RUN_ID=$(gh run list --workflow=deploy.yml --limit 1 --json databaseId --jq '.[0].databaseId') gh run watch "$RUN_ID" --exit-status
Command Reference
| Task | Command | Reference |
|---|---|---|
| Find repos with file | | search.md |
| Find repos with directory | | search.md |
| List failed runs | | monitoring.md |
| Watch run | | monitoring.md |
| Download artifacts | | monitoring.md |
| Create PR | | resources.md |
| Check PR CI | | monitoring.md |
| Trigger workflow | | automation.md |
| Fork repo | | resources.md |
| REST/GraphQL API | | api.md |
JSON Output
gh pr list --json # Discover fields gh pr list --json number,title,author,labels # Select fields gh run list --json status --jq '.[] | select(.status=="completed")'
Environment & Auth
| Variable | Purpose |
|---|---|
| Authentication token |
| Default owner/repo |
| GitHub Enterprise host |
| Disable prompts (CI) |
Rate Limits
| Endpoint | Limit | Notes |
|---|---|---|
| REST API | 5,000/hour | Per authenticated user |
| Search API | 30/minute | All search endpoints |
| Code Search | 10/minute | More restrictive |
| Search results | 1,000 max | Use date partitioning for more |
Workflow Authoring
GitHub Actions workflow YAML patterns for CI/CD pipelines.
Basic Structure
name: CI Pipeline on: push: branches: [main] pull_request: workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: make build - run: make test
Caching Patterns
# Python/Poetry - uses: actions/setup-python@v5 with: python-version: '3.11' - uses: actions/cache@v4 with: path: .venv key: venv-${{ runner.os }}-${{ hashFiles('poetry.lock') }} # Node.js - uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm'
Matrix Builds
strategy: matrix: os: [ubuntu-latest, windows-latest] node: [18, 20] fail-fast: false
OIDC Authentication (AWS/GCP)
permissions: id-token: write contents: read steps: - uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: arn:aws:iam::123456789012:role/GitHubActionsRole aws-region: us-east-1
Full reference: references/workflow-authoring.md
Advanced Patterns
For enterprise CI/CD pipelines:
- Ephemeral PR Environments - Auto-create/destroy per PR
- Release Please - Automated semantic versioning
- PR Cleanup - Resource cleanup on close
- Testing Patterns - pytest, Gradle, Jest with coverage
- Deployment Status Checks - Wait for stack readiness
- Separate Build/Deploy Roles - Fine-grained OIDC permissions
- Multi-Stack Ordering - Foundation → Schemas → Application
Additional References:
- Workflow Summaries - Rich markdown output with $GITHUB_STEP_SUMMARY
- Container Security - Multi-stage builds, Trivy scanning, image tagging
- Security Scanning - CodeQL, Dependabot, IaC scanning (Checkov, tfsec)
- Troubleshooting - Debug mode, flaky tests, common issues
- Performance - Limits, runner specs, optimization tips
Scripts
Pre-built automation scripts with error handling and rate limit awareness.
| Script | Purpose | Usage |
|---|---|---|
| Find repos containing specific paths | |
| Block until workflow completes | |
| Search >1000 results via date partitioning | |
Exit Codes
| Script | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| success | failure | cancelled | timeout |
| success | error | - | - |
| success | error | - | - |
Validation Checklist
Before completing a GitHub CLI task, verify:
- [ ] gh authenticated (`gh auth status`) - [ ] Command syntax matches documentation - [ ] Exit codes checked and handled appropriately - [ ] Rate limits considered (code search: 10/min, repo search: 30/min) - [ ] JSON output parsed correctly (if using --json) - [ ] Artifacts downloaded to correct directory (if applicable) - [ ] PR/Issue created with proper labels and assignees (if applicable) - [ ] Workflow triggered and monitored to completion (if applicable)
When Not to Use
This skill covers
gh CLI and GitHub Actions workflow authoring. Do not use for:
- Git commands:
,git push
,git commit
(use git directly)git pull - GitHub web UI: Questions about github.com interface navigation
- GitHub Desktop: Different application entirely
- Direct curl/HTTP: API calls without
wrappergh - GitHub mobile app: Mobile-specific features