Get the FREE Ultimate OpenClaw Setup Guide →

gh-cli

Scanned
npx machina-cli add skill JamesPrial/claude-plugins/gh-cli --openclaw
Files (1)
SKILL.md
2.3 KB

GitHub CLI (gh)

Overview

Provides specialized utilities for GitHub CLI operations with three powerful Python tools for common workflows, plus general guidance for effective gh command usage.

Core Capabilities

1. Enhanced Code Search

Use scripts/gh_code_search.py for advanced GitHub code search with filtering, formatting, and sorting capabilities.

Key features: Multiple output formats, rate limiting handling, fork/private repo filtering, match count filtering

Documentation: references/README_gh_code_search.md

2. Workflow Failure Analysis

Use scripts/gh_failed_run.py to analyze GitHub Actions workflow failures and extract detailed error information.

Key features: Finds most recent failed run, extracts error patterns from logs, outputs structured JSON with run info and failed jobs

Documentation: references/README_gh_failed_run.md

3. GitHub Pages Management

Use scripts/gh_pages_deploy.py for GitHub Pages deployment automation including enabling Pages, status checks, and workflow generation.

Key features: Enable/configure Pages, check deployment status, trigger rebuilds, generate workflow templates

Documentation: references/README_pages.md

General GitHub CLI Best Practices

When working with GitHub CLI:

  • Prefer gh commands over raw git commands for GitHub-specific operations (issues, PRs, releases)
  • Use gh repo view to quickly inspect repository details
  • Leverage gh pr create --web or gh issue create --web for interactive workflows
  • Check gh --help for discovering subcommands and capabilities
  • Use gh alias to create shortcuts for frequently used command patterns

Using the Python Utilities

All scripts accept --help for detailed usage information. Run them directly with Python 3:

python3 scripts/gh_code_search.py --help
python3 scripts/gh_failed_run.py --help
python3 scripts/gh_pages_deploy.py --help

Refer to the respective README files in references/ for comprehensive documentation, examples, and troubleshooting guidance.

Source

git clone https://github.com/JamesPrial/claude-plugins/blob/main/version-control/skills/gh-cli/SKILL.mdView on GitHub

Overview

gh-cli provides specialized utilities for GitHub CLI operations. It bundles three Python tools tailored for common workflows: enhanced code search, workflow failure analysis, and GitHub Pages management, plus practical guidance for effective gh usage.

How This Skill Works

The skill exposes three Python utilities: scripts/gh_code_search.py, scripts/gh_failed_run.py, and scripts/gh_pages_deploy.py. Each runs under Python 3 and offers --help for usage details, returning structured outputs (e.g., JSON) and workflow templates. Refer to references/ for comprehensive docs, examples, and troubleshooting.

When to Use It

  • Perform enhanced code search across multiple repositories with filtering, formatting, and sorting.
  • Analyze the most recent GitHub Actions failure and extract structured error information.
  • Automate GitHub Pages deployment, including enabling Pages, status checks, and rebuilds.
  • Generate or apply GitHub-related workflows and templates using the provided Python scripts.
  • Quickly inspect repository details or manage issues/PRs with gh commands and web workflows.

Quick Start

  1. Step 1: Ensure Python 3 is installed on your system.
  2. Step 2: View help for each script: python3 scripts/gh_code_search.py --help; python3 scripts/gh_failed_run.py --help; python3 scripts/gh_pages_deploy.py --help.
  3. Step 3: Run a sample task (e.g., python3 scripts/gh_code_search.py --query 'def main' --format json) and consult references for options.

Best Practices

  • Prefer gh commands over raw git for GitHub-specific tasks (issues, PRs, releases).
  • Use the Python utilities with --help to understand exact usage and options.
  • Run the scripts with Python 3 (e.g., python3 scripts/gh_code_search.py --help) to verify commands.
  • Keep outputs in automations-friendly formats (JSON, templates) and respect rate limits.
  • Create short gh aliases for frequently used command patterns to speed up workflows.

Example Use Cases

  • Use enhanced code search to locate function usage across forks with filters for language and date.
  • Analyze the latest failed workflow run and summarize errors by job and step.
  • Enable GitHub Pages for a project and trigger a rebuild via an automated script.
  • Generate a Pages deployment workflow template and deploy with a single command.
  • View repository details with gh repo view and open issues or PRs via --web in interactive mode.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers