OpenClaw
Deploy a managed OpenClaw agent in 60 seconds
Launch on Hostinger →
Hermes Agent
Run your Hermes agent, fully managed
Launch on Hostinger →
Apify
6,000+ web scrapers for your agent, free to start
Try Apify free →
Firecrawl
Crawl and scrape any site into clean data
Try Firecrawl free →
Context.dev
One API to scrape, enrich, and extract the web
Start building free →
SetupClaw
Done-for-you OpenClaw for founders and teams
Get it set up for you →
DataForSEO
SEO data APIs for your agent, $1 free credit
Try DataForSEO free →
Your product here
Reach thousands of AI builders a month
Learn more →
Claude Market
Menu
SkillsMCPPluginsSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise
Claude Market
SkillsMCPPluginsSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise
Skills/paulrberg/agent-skills/cli-gh
cli-gh logo

cli-gh

paulrberg/agent-skills
2K installs62 stars
Run it on Hostinger, 20% off →Your friend gets 20% off too, using this linkFree API →|Prompt InjectionCommand ExecutionExternal DownloadsCredentials Unsafe|View on GitHub|Create your own skill →

Installation

npx skills add https://github.com/paulrberg/agent-skills --skill cli-gh

Summary

Use for GitHub CLI automation: gh commands, repo info, workflow triggers, GitHub search, codespaces, PR status, issues, repo browsing, or command-line GitHub tasks.

SKILL.md

GitHub CLI (gh)

Overview

Expert guidance for GitHub CLI (gh) operations and workflows. Use this skill for command-line GitHub operations including pull request management, issue tracking, repository operations, workflow automation, and codespace management.

Key capabilities:

  • Create and manage pull requests from the terminal
  • Track and organize issues efficiently
  • Search across all of GitHub (repos, issues, PRs)
  • Manage labels and project organization
  • Trigger and monitor GitHub Actions workflows
  • Work with codespaces
  • Automate repository operations and releases
  • Browse repositories, PRs, and files in the browser

Safety Rules

CRITICAL: This skill NEVER uses destructive gh CLI operations.

This skill focuses exclusively on safe, read-only, or reversible GitHub operations. The following commands are PROHIBITED and must NEVER be used:

Permanently destructive commands:

  • gh repo delete - Repository deletion
  • gh repo archive - Repository archival
  • gh release delete - Release deletion
  • gh release delete-asset - Asset deletion
  • gh run delete - Workflow run deletion
  • gh cache delete - Cache deletion
  • gh secret delete - Secret deletion
  • gh variable delete - Variable deletion
  • gh label delete - Label deletion
  • gh ssh-key delete - SSH key deletion (can lock out users)
  • gh gpg-key delete - GPG key deletion
  • gh codespace delete - Codespace deletion
  • gh extension remove - Extension removal
  • gh gist delete - Gist deletion
  • Bulk deletion operations using xargs with any destructive commands
  • Shell commands: rm -rf (except for temporary file cleanup)

Allowed operations:

  • Creating resources (PRs, issues, releases, labels, repos)
  • Viewing and listing (status, logs, information, searches)
  • Updating and editing existing resources
  • Closing PRs/issues (reversible - can be reopened)
  • Reverting pull requests (creates a new revert PR)
  • Canceling workflow runs (stops execution without deleting data)
  • Merging pull requests (after proper review)
  • Read-only git operations (git status, git log, git diff)

Installation & Setup

# Login to GitHub
gh auth login

# Login and copy OAuth code to clipboard automatically
gh auth login --clipboard

# Check authentication status
gh auth status

# Check auth status with JSON output
gh auth status --json

# Configure git to use gh as credential helper
gh auth setup-git

Pull Requests

Creating PRs

# Create PR interactively
gh pr create

# Create PR with title and body
gh pr create --title "Add feature" --body "Description"

# Create PR to specific branch
gh pr create --base main --head feature-branch

# Create draft PR
gh pr create --draft

# Create PR from current branch
gh pr create --fill  # Uses commit messages

# Create PR with Copilot Code Review
gh pr create --reviewer @copilot

Viewing PRs

# List PRs
gh pr list

# List my PRs
gh pr list --author @me

# View PR details
gh pr view 123

# View PR in browser
gh pr view 123 --web

# View PR diff
gh pr diff 123

# View PR diff excluding specific files
gh pr diff 123 --exclude "*.lock"

# Check PR status
gh pr status

Managing PRs

# Checkout PR locally
gh pr checkout 123

# Review PR
gh pr review 123 --approve
gh pr review 123 --comment --body "Looks good!"
gh pr review 123 --request-changes --body "Please fix X"

# Request Copilot Code Review
gh pr edit 123 --add-reviewer @copilot

# Merge PR
gh pr merge 123
gh pr merge 123 --squash
gh pr merge 123 --rebase
gh pr merge 123 --merge

# Close PR
gh pr close 123

# Reopen PR
gh pr reopen 123

# Ready draft PR
gh pr ready 123

# Update PR branch with base branch
gh pr update-branch 123

# Revert a merged PR (creates a new revert PR)
gh pr revert 123

PR Checks

# View PR checks
gh pr checks 123

# Watch PR checks
gh pr checks 123 --watch

Issues

Creating Issues

# Create issue interactively
gh issue create

# Create issue with title and body
gh issue create --title "Bug report" --body "Description"

# Create issue with labels
gh issue create --title "Bug" --label bug,critical

# Assign issue
gh issue create --title "Task" --assignee @me

Viewing Issues

# List issues
gh issue list

# List my issues
gh issue list --assignee @me

# List by label
gh issue list --label bug

# Advanced issue search
gh issue list --search "is:open label:bug sort:created-desc"

# View issue details
gh issue view 456

# View in browser
gh issue view 456 --web

Managing Issues

# Close issue
gh issue close 456

# Close as duplicate, linking to the original issue
gh issue close 123 --duplicate-of 456

# Reopen issue
gh issue reopen 456

# Edit issue
gh issue edit 456 --title "New title"
gh issue edit 456 --add-label bug
gh issue edit 456 --add-assignee @user

# Comment on issue
gh issue comment 456 --body "Update"

# Create branch to work on issue
gh issue develop 456 --checkout

Repository Operations

Repository Info

# View repository
gh repo view

# View in browser
gh repo view --web

# Clone repository
gh repo clone owner/repo

# Clone without adding upstream remote
gh repo clone owner/repo --no-upstream

# Fork repository
gh repo fork owner/repo

# List repositories
gh repo list owner

Repository Management

# Create repository
gh repo create my-repo --public
gh repo create my-repo --private

# Sync fork
gh repo sync owner/repo

# Set default repository
gh repo set-default

Search

When the user asks to search GitHub repositories, issues, or pull requests, see references/search.md.

Labels

When the user asks to list, create, edit, or clone repository labels, see references/labels.md.

Codespaces

When the user asks to list, create, connect to, or manage files within GitHub Codespaces, see references/codespaces.md.

Browse

Open repositories, files, and resources in the browser.

# Open current repo in browser
gh browse

# Open specific file
gh browse src/main.go

# Open file at specific line
gh browse src/main.go:42

# Open blame view for a file
gh browse --blame src/main.go

# Open Actions tab
gh browse --actions

# Open specific branch
gh browse --branch feature

Releases

When the user asks to create, list, view, or download GitHub releases, see references/releases.md.

Gists

When the user asks to create, list, view, or edit GitHub gists, see references/gists.md.

Configuration

# Set default editor
gh config set editor vim

# Set default git protocol
gh config set git_protocol ssh

# View configuration
gh config list

# Set browser
gh config set browser firefox

Quick Reference

Common gh operations at a glance:

OperationCommandCommon Flags
Create PRgh pr create--draft, --fill, --reviewer @copilot
List PRsgh pr list--author @me, --label, --search
View PRgh pr view <number>--web, --comments
Merge PRgh pr merge <number>--squash, --rebase, --delete-branch
Revert PRgh pr revert <number>--body
Create issuegh issue create--title, --body, --label
List issuesgh issue list--assignee @me, --label, --search
Close issuegh issue close <number>--duplicate-of, --reason
View issuegh issue view <number>--web, --comments
Browse repogh browse--blame, --actions, --branch
Clone repogh repo clone <repo>--no-upstream
Fork repogh repo fork--clone, --remote
View repogh repo view--web
Create releasegh release create <tag>--title, --notes, --draft
Verify releasegh release verify <tag>--repo
Run workflowgh workflow run <name>--ref, --field
Watch rungh run watch <id>--exit-status
Search reposgh search repos <query>--language, --stars
Create labelgh label create <name>--color, --description
Create codespacegh codespace create--repo, --branch

Additional Resources

Reference Guides

For detailed patterns and advanced usage, see:

  • Workflows & Actions - GitHub Actions workflows, runs, cache management, and CI/CD integration patterns
  • Advanced Features - Aliases, API access, extensions, secrets, SSH/GPG keys, organizations, projects, and advanced scripting
  • Automation Workflows - Common automation patterns, daily reports, release automation, and team collaboration workflows
  • Troubleshooting - Solutions for authentication, permissions, rate limiting, and common errors

Example Scripts

Practical automation scripts (see examples/ directory):

  • auto-pr-create.sh - Automated PR creation workflow
  • issue-triage.sh - Bulk issue labeling and assignment
  • workflow-monitor.sh - Watch and notify on workflow completion
  • release-automation.sh - Complete release workflow automation

External Documentation

  • Official Manual: https://cli.github.com/manual
  • GitHub Community: https://github.com/cli/cli/discussions
  • API Documentation: https://docs.github.com/en/rest
  • Extension Marketplace: https://github.com/topics/gh-extension

JSON Output

When the user wants to use --json flags or needs the correct gh CLI JSON field names, see references/json-output.md.

Tips

  1. Use --web flag to open items in browser for detailed view
  2. Leverage interactive prompts by omitting parameters - most commands support interactive mode
  3. Apply filters with --author, --label, --state to narrow down lists efficiently
  4. Add --json flag to enable scriptable output for automation
  5. Always check --help for valid JSON field names - they differ from GitHub API
  6. Use gh repo create --template to scaffold from template repositories
  7. Enable auto-merge with gh pr merge --auto for PRs that pass checks

Score

0–100
63/ 100

Grade

C

Popularity15/30

1,838 installs — growing adoption.

Completeness27/30

Documented: full SKILL.md body, description, one-line install. Missing: category/license metadata.

Trust15/25

Community skill with a public GitHub source repository you can review.

Freshness6/15

No update timestamp is tracked for this skill in our catalog.

Scored automatically from popularity, completeness, trust, and freshness — computed only from data in our catalog, never fabricated.

Proud of your score? Add this badge to your README.

Paste a snippet into your GitHub README. The badge updates automatically and links back to this page.

Cli Gh skill score badge previewScore badge

Markdown

[![Cli Gh skill](https://www.claudemarket.ai/skills/paulrberg/agent-skills/cli-gh/badges/score.svg)](https://www.claudemarket.ai/skills/paulrberg/agent-skills/cli-gh)

HTML

<a href="https://www.claudemarket.ai/skills/paulrberg/agent-skills/cli-gh"><img src="https://www.claudemarket.ai/skills/paulrberg/agent-skills/cli-gh/badges/score.svg" alt="Cli Gh skill"/></a>

Cli Gh FAQ

How do I install the Cli Gh skill?

Run “npx skills add https://github.com/paulrberg/agent-skills --skill cli-gh” in your terminal. The skill is added to your agent's skills directory and picked up automatically on the next run — no restart or extra configuration needed.

What does the Cli Gh skill do?

Use for GitHub CLI automation: gh commands, repo info, workflow triggers, GitHub search, codespaces, PR status, issues, repo browsing, or command-line GitHub tasks. The full SKILL.md on this page shows the exact instructions the skill gives your agent.

Is the Cli Gh skill free?

Yes. Cli Gh is a free, open-source skill published from paulrberg/agent-skills. As with any third-party skill, review the source repository before installing it into an agent with sensitive access.

Does Cli Gh work with Claude Code and OpenClaw?

Yes. Skills use the portable SKILL.md format, so Cli Gh works with Claude Code, OpenClaw, Codex, Hermes, and any other agent that reads SKILL.md skills.

Recommended skills

Browse all →
find-skills logo

find-skills

vercel-labs/skills

2.8M installsInstall
grill-me logo

grill-me

mattpocock/skills

764K installsInstall
frontend-design logo

frontend-design

anthropics/skills

745K installsInstall
grill-with-docs logo

grill-with-docs

mattpocock/skills

649K installsInstall
agent-browser logo

agent-browser

vercel-labs/agent-browser

632K installsInstall
improve-codebase-architecture logo

improve-codebase-architecture

mattpocock/skills

624K installsInstall

Related guides

Hand-picked reading to help you choose, install, and use agent skills.

GuideHow To Find The Right Openclaw Skill For Your ProjectGuideBest Openclaw Skills 2026GuideHow To Evaluate Openclaw Skill Before Installing

Skills by category

FrontendBackend & APIsTesting & QASecurityDevOps & CI/CDMCP & ToolingAutomationData & Analysis+20 more

MCP servers by category

AI & MLDeveloper ToolsVector & MemoryFiles & DocsDatabasesFinance & PaymentsBrowser & ScrapingCommunication+8 more

Plugins by category

developmentproductivitycommunicationdesignsecuritydatabaseworkflowcompliance+34 more

The Agent Stack

Weekly Claude Code, Agent SDK, and MCP moves worth your time — free.

Claude Market

AI agent skills directory, marketplace, and workflow hub for OpenClaw, Hermes Agent, Claude Code, Codex, and MCP-powered operator stacks.

Independent project, not affiliated with Anthropic.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Plugins

More

  • Submit a Tool
  • Create a Skill
  • Advertise
  • Free Tools
  • API
  • Shipping
  • Contact
  • Terms
  • Privacy
© 2026 Claude Market · Not affiliated with Anthropic
Fazier badgeFeatured on Twelve ToolsFeatured on Wired BusinessRemote OpenClaw - Featured on AI Agents DirectoryListed on Turbo0Featured on Uneed