GitHub Workflow Integration for Openclaw

A zero-dependency Python CLI for creating and listing GitHub pull requests, checking commit status, and pushing a single file through the Git Data API.

zhaoxinghua09-cell
v1.0.0
Oct 17, 2026
0
79
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install github-workflow-integration

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-workflow-integration 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 Workflow Integration?

GitHub Workflow Integration is a lightweight command-line wrapper around selected GitHub REST API operations, built for Python 3.8+ using only the standard library. It can create and list pull requests, query combined commit status, and push a single file using the Git Data API sequence: blob → tree → commit → ref. Openclaw Skills users can automate these workflows without installing Git, GitHub CLI, or third-party Python packages.

Authentication uses a user-provided Personal Access Token read from GITHUB_TOKEN when the command runs. The token is not saved or printed. Write operations can be previewed with --dry-run; users should confirm the target repository, branch, and message before making remote changes. This is a focused integration, not a general-purpose GitHub client.

GitHub Workflow Integration Use Cases

  • Create a pull request from a script without installing the gh CLI.
  • List open pull requests and return their numbers, titles, branches, and URLs.
  • Check a commit or ref’s combined status to inspect CI results.
  • Push one local file to a remote branch from a CI job or restricted environment using the Git Data API.
  • Preview a write request with --dry-run before changing repository state.
  • Use GitHub REST API operations in a Python environment that has no third-party dependencies.

How GitHub Workflow Integration Works

  1. Check that GITHUB_TOKEN is set. If it is missing, the CLI exits with code 2 and provides setup guidance rather than attempting an unauthenticated request.
  2. Invoke the relevant command with the target owner/repo and required options: pr create, pr list, status, or push-file.
  3. For write operations, run with --dry-run first and confirm the repository, branch, and message before sending the real request.
  4. The Python CLI sends the request to the GitHub REST API. For a single-file push, it creates a blob, tree, and commit, then updates the target ref.
  5. Review the result: successful calls return human-readable details such as a PR number or URL, status state, or commit SHA. API and network errors are reported separately.
  6. Handle exit codes: 0 indicates success, 1 indicates an API or network error, and 2 indicates a usage error or missing token. A 401 can indicate an expired token or insufficient scope; a 404 can indicate an incorrect repository or branch.

GitHub Workflow Integration Setup

Requirements

  • Python 3.8 or later.
  • No third-party Python packages, Git installation, or GitHub CLI installation is required.
  • A GitHub Personal Access Token (PAT) with the required repo scope for the target operations. This skill uses PAT authentication, not OAuth.

Configure authentication

Create a PAT in GitHub under Settings → Developer settings → Personal access tokens, then provide it through the GITHUB_TOKEN environment variable. Do not commit the token or place it in command output.

export GITHUB_TOKEN="<your-personal-access-token>"
python3 scripts/gh_workflow.py pr list --repo owner/repo

Run commands

Use the skill’s scripts/gh_workflow.py entry point. For write operations, preview first and verify the requested target before running without --dry-run.

python3 scripts/gh_workflow.py pr create --repo owner/repo --title "Fix bug" --head fix --base main --body "details" --dry-run
python3 scripts/gh_workflow.py status --repo owner/repo --ref main
python3 scripts/gh_workflow.py push-file --repo owner/repo --path ./local.txt --message "add local.txt" --branch main

GitHub Workflow Integration Data Schema & Taxonomy

The skill is a stateless CLI: it does not define a local database, generated metadata files, or token storage. Inputs are command-line arguments, and results are written as human-readable output.

Element Details
Entry point scripts/gh_workflow.py
Runtime Python 3.8+; standard library only
Authentication GITHUB_TOKEN environment variable, read at call time
Repository identifier owner/repo
Commands pr create, pr list, status, push-file
Dry run --dry-run previews request shape without sending the request
Output PR details, status state, commit SHA, or error information
Exit codes 0 success; 1 API/network error; 2 usage error or missing token

For push-file, the Git Data API workflow creates a blob, builds a tree, creates a commit, and updates a ref. The token is not written to disk, logged, or echoed.

GitHub Workflow Integration Advanced Features

  • Dependency-free API access: Uses Python’s standard-library networking support, with no third-party packages or subprocesses.
  • Git Data API single-file push: Writes a file to a remote branch through the blob → tree → commit → ref sequence, useful when a normal Git push is unavailable.
  • Dry-run previews: Inspect the request shape before sending supported write operations.
  • Explicit authentication boundary: Requires a user-created PAT in GITHUB_TOKEN; it does not initiate OAuth or open a browser.
  • Actionable error handling: Distinguishes API/network errors from usage and missing-token errors, with exit codes for scripting.
  • Focused scope: Covers PR creation and listing, combined commit status, and single-file pushes. It does not handle merges, review comments, releases, workflow dispatch, or GitHub App installation.
  • Openclaw Skills fit: Provides a compact GitHub workflow building block for scripts and CI tasks where minimizing dependencies and keeping credentials out of persistent storage matter.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*