GitHub CLI (gh) for Openclaw

A powerful integration for managing GitHub repositories, issues, and pull requests via the official GitHub CLI.

trumppo
v0.1.0
Feb 9, 2026
5
5.6k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install gh

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 gh 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 (gh)?

The GitHub CLI (gh) skill enables seamless interaction with GitHub directly from your AI coding environment. By leveraging the official toolset, this skill empowers developers and AI agents to perform authenticated operations like repository creation, cloning, and forking without leaving the terminal. It serves as a bridge between your local development workflow and GitHub's cloud infrastructure.

Integrating this tool as part of Openclaw Skills allows for automated repository management and streamlined contribution workflows. Whether you are automating release cycles or managing issue backlogs, this skill provides a stable and idempotent interface for all your GitHub-related tasks.

GitHub CLI (gh) Use Cases

  • Automating the creation and configuration of new private repositories.
  • Streamlining the pull request lifecycle from creation to merging.
  • Managing and commenting on issues directly within an automated workflow.
  • Generating and publishing project releases with automated release notes.
  • Forking and cloning upstream repositories for collaborative development.

How GitHub CLI (gh) Works

  1. The skill checks for an active authentication session using the auth status command to ensure it has the necessary permissions.
  2. It identifies the current repository context or accepts a target repository owner and name for remote operations.
  3. For repository actions, it executes idempotent commands to create, fork, or clone as requested by the user or agent.
  4. For collaboration tasks, it interacts with the GitHub API via the CLI to manage issues, pull requests, and comments.
  5. It provides feedback to the user or agent by reporting specific URLs and metadata for the completed operations.

GitHub CLI (gh) Setup

To get started with this skill within the Openclaw Skills framework, ensure you have the GitHub CLI installed and authenticated on your local machine.

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

# Authenticate with your GitHub account
gh auth login

# Verify the installation and authentication status
gh auth status

GitHub CLI (gh) Data Schema & Taxonomy

This skill operates primarily on repository metadata and interaction logs. It utilizes standard GitHub data structures for repository and issue details.

Data Type Description Key Fields
Repository Metadata about the target GitHub repo nameWithOwner, url, defaultBranchRef
Issue/PR Details regarding tickets or code reviews title, body, state, number, html_url
Auth Status Local authentication state and account info logged_in, account, protocol

The skill prefers machine-readable JSON output for internal logic while presenting human-readable URLs for user confirmation.

GitHub CLI (gh) Advanced Features

  • Idempotent repo creation using the --confirm flag to bypass interactive prompts in automated environments.
  • Automated release management with support for dynamic tagging and version notes.
  • Security-first approach with private-by-default repository creation settings.
  • Advanced pull request merging using explicit methods such as --merge, --squash, or --rebase.
  • Deep integration with local git environments using source and remote flags for seamless repo synchronization.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*