GitHub CLI Integration for Openclaw

A powerful integration allowing AI agents to manage repositories, pull requests, and CI/CD workflows using the GitHub CLI.

yequanzheng
v1.0.0
Mar 18, 2026
0
950
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install test33

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 test33 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 Integration?

The GitHub skill empowers your AI coding agent to perform complex repository management tasks directly via the official GitHub CLI (gh). By leveraging this skill, agents can move beyond simple code edits to handle the full DevOps lifecycle, including pull request monitoring, workflow debugging, and advanced data retrieval through the GitHub REST API.

This integration is a cornerstone of the Openclaw Skills ecosystem, providing a bridge between local development environments and remote collaboration hubs. It ensures that agents can maintain high-quality codebases by interacting with CI status reports and structured JSON data from GitHub's servers.

GitHub CLI Integration Use Cases

  • Monitoring CI/CD pipeline results and identifying specific failed build steps.
  • Automating the retrieval of pull request metadata and issue descriptions for context gathering.
  • Executing advanced repository queries using the GitHub API and JQ filtering.
  • Managing collaborative workflows without leaving the agent's command environment.

How GitHub CLI Integration Works

  1. The agent identifies a task requiring GitHub interaction, such as checking a PR's mergeability or CI status.
  2. The skill invokes the appropriate gh CLI command, ensuring the --repo flag is utilized for correct context.
  3. Results are often captured in JSON format to facilitate structured parsing by the AI model.
  4. If detailed debugging is required, the skill fetches specific logs from GitHub Actions workflow runs.
  5. The agent processes the output to provide updates, perform fixes, or report status back to the user.

GitHub CLI Integration Setup

To enable this skill, ensure you have the GitHub CLI installed and authenticated on your system.

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

# Authenticate with your GitHub account
gh auth login

# Test the connection via Openclaw Skills context
gh repo view owner/repo

GitHub CLI Integration Data Schema & Taxonomy

The skill utilizes structured output to ensure high reliability when the agent parses information. Most operations leverage the following data patterns:

Data Type Command Source Output Format
PR Metadata gh pr view --json JSON Object (title, body, status)
CI Logs gh run view --log-failed Plain Text/Stream
API Responses gh api Raw JSON filtered via --jq
Issue Lists gh issue list --json Array of Objects

GitHub CLI Integration Advanced Features

  • Direct GitHub API access via the gh api subcommand for custom data requirements.
  • High-granularity CI debugging with specific workflow run step isolation.
  • Seamless integration with JQ for complex data transformation and filtering within Openclaw Skills.
  • Support for cross-repository operations by explicitly defining the owner/repo path.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*