GitHub CLI Operations

Use GitHub CLI (gh) to interact with GitHub repositories, pull requests, issues, and workflows. Use when: (1) Reading PR details, diffs, or metadata, (2) Listing or filtering PRs and issues, (3) Creating PR comments or linking to issues, (4) Checking CI status or mergeability, (5) Extracting issue references from PR descriptions, or (6) Any GitHub repository operation via command line. Requires GitHub CLI installed and authenticated.

7 stars

Best use case

GitHub CLI Operations is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use GitHub CLI (gh) to interact with GitHub repositories, pull requests, issues, and workflows. Use when: (1) Reading PR details, diffs, or metadata, (2) Listing or filtering PRs and issues, (3) Creating PR comments or linking to issues, (4) Checking CI status or mergeability, (5) Extracting issue references from PR descriptions, or (6) Any GitHub repository operation via command line. Requires GitHub CLI installed and authenticated.

Teams using GitHub CLI Operations should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/github-cli-operations/SKILL.md --create-dirs "https://raw.githubusercontent.com/lambda-curry/devagent/main/.cursor/skills/github-cli-operations/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/github-cli-operations/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How GitHub CLI Operations Compares

Feature / AgentGitHub CLI OperationsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use GitHub CLI (gh) to interact with GitHub repositories, pull requests, issues, and workflows. Use when: (1) Reading PR details, diffs, or metadata, (2) Listing or filtering PRs and issues, (3) Creating PR comments or linking to issues, (4) Checking CI status or mergeability, (5) Extracting issue references from PR descriptions, or (6) Any GitHub repository operation via command line. Requires GitHub CLI installed and authenticated.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# GitHub CLI Operations

Use GitHub CLI (`gh`) to interact with GitHub repositories, pull requests, issues, and workflows.

## Prerequisites

- GitHub CLI installed: `brew install gh` (macOS) or see [cli.github.com](https://cli.github.com)
- Authenticated: `gh auth login` (one-time setup)
- Repository context: Run commands from within a git repository or specify `--repo owner/repo`

## Quick Start

**Get PR details:**
```bash
gh pr view <pr-number> --json title,body,author,state
```

**Get PR diff:**
```bash
gh pr diff <pr-number>
```

**Extract Linear issue references:**
```bash
gh pr view <pr-number> --json body --jq '.body' | grep -oE 'LIN-[0-9]+'
```

## Usage Patterns for PR Review

### Get PR Context

Get PR title, description, and metadata:
```bash
gh pr view <pr-number> --json title,body,author,state,baseRefName,headRefName
```

Get changed files:
```bash
gh pr view <pr-number> --json files --jq '.files[].path'
```

Get diff for specific file:
```bash
gh pr diff <pr-number> -- path/to/file
```

### Check PR Status

Check CI status:
```bash
gh pr checks <pr-number>
```

Check if PR is mergeable:
```bash
gh pr view <pr-number> --json mergeable,mergeStateStatus
```

### Link to Linear Issues

Extract issue references from PR body:
```bash
gh pr view <pr-number> --json body --jq '.body' | grep -oE 'LIN-[0-9]+'
```

## Integration with Linear

When reviewing PRs, extract Linear issue references from:
- PR title: Look for `LIN-123` or `[LIN-123]` patterns
- PR body: Search for Linear issue links or IDs
- PR comments: Check for issue mentions

Then use Linear MCP functions to fetch issue details and requirements.

## Reference Documentation

- **Command Reference**: See [commands.md](references/commands.md) for complete GitHub CLI command reference
- **GitHub CLI Manual**: [cli.github.com/manual](https://cli.github.com/manual)

Related Skills

coderabbit-cli

7
from lambda-curry/devagent

Use CodeRabbit CLI to perform automated code review and iterative improvement in an AI agent workflow. Use when: (1) After generating non-trivial code (new features, refactors, algorithms), (2) Improving code quality, maintainability, or readability before submission, (3) Validating code changes against best practices, (4) Exploring unfamiliar languages, patterns, or domains, or (5) Creating a self-reviewing coding loop. Requires CodeRabbit CLI installed and authenticated. Not for trivial changes (typos, formatting-only) or rapid prototyping without quality constraints.

ai-rules-cli

7
from lambda-curry/devagent

Use ai-rules CLI to manage and synchronize AI coding rules across multiple AI assistants (Cursor, Claude Code, GitHub Copilot, Opencode, etc.). Use when: (1) Setting up ai-rules in a new project, (2) Updating AI coding guidelines and best practices, (3) Generating platform-specific rule files from source, (4) Checking if generated files are in sync with source files, (5) Managing multi-agent rule consistency, or (6) Adding new rules or modifying existing ones. Requires ai-rules CLI installed. The ai-rules/ directory serves as the single source of truth for all AI coding guidelines.

worktree-setup-hook

7
from lambda-curry/devagent

Post-checkout git hook for automatic worktree setup. Use when: (1) Setting up automatic configuration for new git worktrees, (2) Creating post-checkout hooks that detect new worktrees and run setup tasks, (3) Configuring worktrees to automatically copy env files and install dependencies

skill-creator

7
from lambda-curry/devagent

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

git-workspace

7
from lambda-curry/devagent

Work with git worktrees and workspaces for concurrent development. Use when: (1) Creating new workspaces with \`git worktree add\`, (2) Listing existing worktrees with \`git worktree list\`, (3) Removing worktrees with \`git worktree remove\`, (4) Pruning stale worktree metadata with \`git worktree prune\`, (5) Managing multiple checked-out branches simultaneously, (6) Migrating uncommitted work between workspaces, or (7) Any git workspace/worktree operation. Requires Git 2.5+ for worktree support.

create-slash-command

7
from lambda-curry/devagent

Create new slash commands for DevAgent workflows. Use when you need to create a new command file in .agents/commands/ and symlink it to .cursor/commands/ for Cursor IDE integration. This skill handles the complete command creation workflow including file generation, symlink creation, and structure validation.

Plumbing Business Operations

3891
from openclaw/skills

<version>1.0.0</version>

Business Operations

Procurement Operations Agent

3891
from openclaw/skills

You are a procurement operations analyst. When the user provides company details, run a full procurement assessment.

Workflow & Productivity

Pest Control Operations Agent

3891
from openclaw/skills

You are an expert pest control business operations advisor. Help operators with licensing, EPA/FIFRA compliance, pricing, route optimization, seasonal planning, technician management, and growth strategy.

Business Management

OpenClaw Mastery — The Complete Agent Engineering & Operations System

3891
from openclaw/skills

> Built by AfrexAI — the team that runs 9+ production agents 24/7 on OpenClaw.

DevOps & Infrastructure

Moving Company Operations

3891
from openclaw/skills

Complete operations assistant for residential and commercial moving companies. Covers pricing, DOT/FMCSA compliance, crew management, claims handling, and growth strategy.

Business Operations

Logistics Operations Optimizer

3891
from openclaw/skills

You are a logistics operations analyst. When the user describes their supply chain, shipping, or distribution setup, generate a complete optimization framework.

Logistics & Supply Chain Optimization