GitHub CLI for Openclaw

A high-performance Openclaw Skills integration for executing GitHub operations like PR checks, runner logs, and custom API queries using the gh CLI.

khurramjamil12
v1.0.0
Jun 16, 2026
0
510
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install github-1

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install github-1 using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is GitHub CLI?

The GitHub CLI skill empowers your AI coding agent to interact directly with GitHub repositories without leaving the terminal. By leveraging the official gh CLI tool, this skill enables seamless management of pull requests, issues, and GitHub Actions workflow runs. It acts as a bridge for automating development pipelines, checking CI status, and fetching repository metadata, which are essential capabilities for modern Openclaw Skills configurations.

Whether running inside a local git repository or executing remote queries by specifying target repositories explicitly, this skill provides a robust, command-line-first interface. Developers and automated agents can execute complex queries, filter outputs with custom JSON/jq selectors, and debug CI/CD failures on the fly, streamlining the entire software development lifecycle.

GitHub CLI Use Cases

  • Checking the continuous integration (CI) status of specific pull requests.
  • Monitoring, listing, and debugging failed workflow runs and actions logs.
  • Querying complex repository data directly from the GitHub API using advanced JQ filtering.
  • Managing and listing repository issues with automated JSON output parsing.
  • Standardizing development workflows across local git contexts and remote multi-repository setups.

How GitHub CLI Works

  1. Command Initialization: The agent triggers a GitHub CLI command (e.g., gh pr, gh issue, gh run, or gh api).
  2. Context Resolution: The tool checks if it is running within a local git directory; if not, it applies the explicitly specified --repo owner/repo flag.
  3. API and CLI Execution: The skill communicates with GitHub's backend to retrieve requested resources or trigger repository events.
  4. Output Parsing and Filtering: The skill utilizes structured --json formats and --jq filters to extract exact fields (such as PR states or issue titles).
  5. Result Delivery: Clean, structured metadata or log outputs are returned to the calling agent or user environment.

GitHub CLI Setup

Prerequisites

Ensure that you have the official GitHub CLI (gh) installed and authenticated on your local machine.

# Install GitHub CLI (example for macOS)
brew install gh

# Authenticate your GitHub account
gh auth login

Enabling the Skill

Add the GitHub skill configuration to your Openclaw Skills workspace setup. Once configured, you can use the interactive commands directly:

# Test the installation by querying a repository
gh repo view --repo owner/repo

GitHub CLI Data Schema & Taxonomy

Structured JSON Output Schema

When using the --json and --jq flags with Openclaw Skills, the underlying data structure aligns directly with the official GitHub API payload schemas. Here is a breakdown of common schemas returned:

Command Type Key Fields Supported Example JQ Query
Pull Requests (gh pr) number, title, state, author .[] | .title
Workflow Runs (gh run) id, name, status, conclusion .workflow_runs[] | .id
Issues (gh issue) number, title, state, labels .[] | .title
GitHub API (gh api) Customizable dynamic payload .title, .state

All structured query responses are outputted in JSON for easy automation pipeline ingestion.

GitHub CLI Advanced Features

  • Granular CI/CD Troubleshooting: Use the --log-failed flag on workflow run views to instantly isolate and retrieve logs only from failed steps, minimizing bandwidth and screen noise.
  • Direct GitHub API Integration: Use gh api to bypass standard CLI limitations, executing REST and GraphQL queries directly for complex repository metadata retrieval.
  • Advanced Data Projection: Utilize combined --json and custom JQ filters to transform nested API responses into flat, optimized formats directly inside the CLI.
  • Context-Agnostic Execution: Support for explicit --repo flag overrides, enabling automated workflows to scale across multiple remote repositories without requiring physical git clones.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*