GitHub CLI Integration for Openclaw

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

morrison230
v1.0.0
Mar 21, 2026
0
706
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install github-local

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-local 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 provides a robust interface for AI agents to interact with the GitHub ecosystem directly through the GitHub CLI (gh). By leveraging this skill, agents can perform complex operations such as monitoring CI/CD pipeline statuses, managing issues, and reviewing pull requests without manual intervention.

This integration is a core component of the Openclaw Skills library, designed to bridge the gap between autonomous agents and version control systems. It emphasizes the use of structured JSON output and precise repository targeting, ensuring that your AI can maintain high accuracy when working across multiple projects or within complex DevOps environments.

GitHub CLI Integration Use Cases

  • Monitoring CI/CD health by checking GitHub Action run statuses and step failures.
  • Automating the retrieval of PR metadata and state for automated code reviews.
  • Programmatic issue management and list filtering for project tracking.
  • Executing advanced repository queries via the GitHub REST API using the gh api subcommand.

How GitHub CLI Integration Works

  1. The AI agent identifies a GitHub-related task, such as checking a PR status or listing recent workflow runs.
  2. The skill invokes the gh CLI with specific flags, ensuring the --repo context is explicitly defined if a local git directory is not present.
  3. Data is retrieved in JSON format using the --json flag to ensure machine-readability.
  4. Resulting data is often piped through --jq filters to extract only the necessary fields (e.g., failed log steps or specific PR titles).
  5. The agent processes the filtered output to take subsequent actions, such as reporting a failure or merging a pull request.

GitHub CLI Integration Setup

To use this GitHub integration within the Openclaw Skills framework, ensure the GitHub CLI is installed and authenticated:

# Install GitHub CLI
brew install gh

# Authenticate with your GitHub account
gh auth login

# Verify installation
gh --version

GitHub CLI Integration Data Schema & Taxonomy

The skill primarily processes and returns structured data from the GitHub API. Key data structures include:

Data Type Key Fields Description
Pull Request number, title, state, user.login Core PR metadata for review and tracking.
Workflow Run id, status, conclusion, display_title Status of CI/CD pipelines and individual jobs.
Issue number, title, labels, assignees Details for task management and automation.
API Response Custom via --jq Flexible schema based on specific GitHub API endpoints.

GitHub CLI Integration Advanced Features

  • Advanced JSON filtering using integrated JQ expressions for precise data extraction.
  • Direct REST API access via gh api for features not covered by standard CLI commands.
  • Automated failure analysis with the --log-failed flag to pinpoint CI/CD bottlenecks.
  • Seamless multi-repository support by utilizing explicit --repo owner/repo naming conventions.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*