GitHub PAT Integration for Openclaw

A secure, user-controlled bridge for AI agents to interact with GitHub repositories using Personal Access Tokens instead of OAuth.

dannyshmueli
v1.0.0
Jan 28, 2026
1
2.7k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install github-token

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-token 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 PAT Integration?

The GitHub PAT skill provides a robust mechanism for AI agents to interact with GitHub repositories through Personal Access Tokens. By leveraging PATs, developers can maintain granular control over the permissions granted to the agent, ensuring that it only has access to the specific repositories and actions necessary for the task at hand. This approach is a core part of the Openclaw Skills philosophy, prioritizing security and least-privilege access over broad OAuth permissions.

This skill enables a wide range of version control operations directly through a CLI interface, allowing the agent to clone repositories, manage branches, and handle the full lifecycle of a Pull Request. It is designed for developers who need to integrate AI-driven coding workflows with their existing GitHub infrastructure while maintaining strict security protocols.

GitHub PAT Integration Use Cases

  • Automating the creation of Pull Requests (PRs) after the agent completes a coding task.
  • Cloning remote repositories to provide the agent with local context for analysis.
  • Managing project issues and documentation updates directly from the terminal.
  • Pushing code changes to specific branches as part of an automated CI/CD pipeline within Openclaw Skills.

How GitHub PAT Integration Works

  1. The user generates a Personal Access Token on GitHub with the required scopes.
  2. The token is passed to the agent either via a command-line argument or stored in a configuration file.
  3. The agent utilizes a Python-based wrapper script to make authenticated requests to the GitHub REST API.
  4. Commands are executed to perform actions such as repository listing, branching, or committing code.
  5. The skill manages the interaction lifecycle, ensuring that tokens are used securely and actions are logged appropriately.

GitHub PAT Integration Setup

To get started with this skill, you must first generate a token from your GitHub account.

  1. Navigate to github.com/settings/tokens and create a new PAT.
  2. Select the appropriate scopes (e.g., repo for full access to private repos, or public_repo for public access).
  3. Provide the token to the agent or store it in your configuration.
# Example: List your available repositories
python3 scripts/gh.py repos --token YOUR_GITHUB_TOKEN

# Example: Clone a specific repository
python3 scripts/gh.py clone owner/repo

GitHub PAT Integration Data Schema & Taxonomy

The GitHub PAT skill organizes its configuration and metadata as follows:

Feature Description Storage Location
Authentication GitHub Personal Access Token TOOLS.md (under GitHub section)
Repository Context Owner and repository name mapping Managed via CLI arguments
Operational Logs Execution details of API calls Local agent logs
Scope Management Definition of PAT permissions GitHub User Settings

GitHub PAT Integration Advanced Features

  • Support for Fine-Grained Personal Access Tokens to restrict agent access to specific repositories.
  • Streamlined Pull Request management including title, body, base, and head branch configuration.
  • Integration with local environment files to ensure tokens are never exposed in public logs or messages within Openclaw Skills.
  • Automated branch creation and management to facilitate parallel development workflows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*