spillwavesolutions/agent_rulez/mastering-github-cli

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

GitHub CLI (gh) command reference for repository search, code discovery, CI/CD monitoring, workflow authoring, and automation. Triggers on "gh" commands, "github cli", searching repos for files/directories (.skilz, .cursor, .codex, Dockerfile), monitoring GitHub Actions workflows, checking PR CI status, downloading artifacts, creating PRs/issues/repos from command line, triggering workflows, forking repos, batch operations, "write a workflow", "github actions", "CI/CD pipeline", "workflow yaml", and "matrix builds". Use for gh search, gh run, gh pr, gh issue, gh repo, gh workflow, gh api, workflow authoring, and automating GitHub operations.

Install

npx vskill@latest install spillwavesolutions/agent_rulez/mastering-github-cli

SKILL.md

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
bash
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
bash
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
bash
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
bash
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

TaskCommandReference
Find repos with filegh search code --filename FILEsearch.md
Find repos with directorygh search code "path:DIR"search.md
List failed runsgh run list --status=failuremonitoring.md
Watch rungh run watch ID --exit-statusmonitoring.md
Download artifactsgh run download ID -n NAMEmonitoring.md
Create PRgh pr create --fillresources.md
Check PR CIgh pr checks --watchmonitoring.md
Trigger workflowgh workflow run NAME.ymlautomation.md
Fork repogh repo fork REPO --cloneresources.md
REST/GraphQL APIgh api repos/{owner}/{repo}api.md
JSON Output
bash
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
VariablePurpose
GH_TOKENAuthentication token
GH_REPODefault owner/repo
GH_HOSTGitHub Enterprise host
GH_PROMPT_DISABLED=1Disable prompts (CI)
Rate Limits
EndpointLimitNotes
REST API5,000/hourPer authenticated user
Search API30/minuteAll search endpoints
Code Search10/minuteMore restrictive
Search results1,000 maxUse date partitioning for more

Workflow Authoring

GitHub Actions workflow YAML patterns for CI/CD pipelines.

Basic Structure
yaml
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
yaml
# 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
yaml
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [18, 20]
fail-fast: false
OIDC Authentication (AWS/GCP)
yaml
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.

ScriptPurposeUsage
find-repos-with-path.shFind repos containing specific paths./scripts/find-repos-with-path.sh .skilz [owner]
wait-for-run.shBlock until workflow completes./scripts/wait-for-run.sh RUN_ID [timeout]
batch-search.shSearch >1000 results via date partitioning./scripts/batch-search.sh "query" START END
Exit Codes
Script0123
wait-for-run.shsuccessfailurecancelledtimeout
find-repos-with-path.shsuccesserror--
batch-search.shsuccesserror--

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, git pull (use git directly)
  • GitHub web UI: Questions about github.com interface navigation
  • GitHub Desktop: Different application entirely
  • Direct curl/HTTP: API calls without gh wrapper
  • GitHub mobile app: Mobile-specific features

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
34
Repository forks
8
7-day trend score
18

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 25 Mar 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/spillwavesolutions/agent_rulez/mastering-github-cli/badge)](https://verified-skill.com/skills/spillwavesolutions/agent_rulez/mastering-github-cli)

Something wrong with this skill or its page? Tell us.