Skip to main content
skill CX Codex

github · swarmclawai — Claude Code skill: what it does, how to install

Runs GitHub issues, pull requests, and CI checks via the gh CLI. Useful for triaging failed workflow logs or merging PRs directly from agent chats.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add swarmclawai/swarmclaw --skill github -a claude-code
Open on GitHub

What github does

This skill guides coding agents through GitHub interactions using the official gh command-line tool. It provides structured commands and jq templates for inspecting pull requests, filtering issues, restarting failed CI jobs, and querying the GitHub API.

It does not handle local git tasks such as committing or branching, nor does it clone repositories. Without a working gh binary and an active session from gh auth login, every action fails. When running outside a git workspace, passing --repo owner/repo is mandatory.

What it helps with

  • Inspect workflow run logs and check failing CI steps
  • Open, view, and squash merge pull requests
  • Filter repository issues by labels using JSON formatting
  • Query GitHub REST API with caching to stay within rate limits

Example prompts for the agent

  • Check why CI checks failed on PR 55 in owner/repo and show the logs
  • List open issues labeled bug with their creation dates in owner/repo
  • Rerun failed jobs for workflow run 12345 in owner/repo

How to install github

1Skills CLI (Vercel)

npx skills add swarmclawai/swarmclaw --skill github -a claude-code

2Manually: put the files in place

~/.claude/skills/github/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/github/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about github

How do I install github in Claude Code?

Run npx skills add swarmclawai/swarmclaw --skill github -a claude-code. The file will be placed in ~/.claude/skills/github/SKILL.md.

What does the github skill do?

It gives your assistant reference patterns for the gh tool. The agent uses them to triage issues, manage pull requests, inspect actions, and fetch repository data.

What are the prerequisites for this skill?

You must have the gh CLI installed through Homebrew or apt. Authenticate your account by running gh auth login in your terminal.

Source text

SKILL.md · MIT
---
name: github
description: "GitHub operations via `gh` CLI: issues, PRs, CI runs, code review, API queries. Use when: (1) checking PR status or CI, (2) creating/commenting on issues, (3) listing/filtering PRs or issues, (4) viewing run logs. NOT for: local git operations (use git directly), non-GitHub repos, or cloning (use git clone)."
metadata:
  {
    "openclaw":
      {
        "emoji": "🐙",
        "requires": { "bins": ["gh"] },
        "install":
          [
            {
              "id": "brew",
              "kind": "brew",
              "formula": "gh",
              "bins": ["gh"],
              "label": "Install GitHub CLI (brew)",
            },
            {
              "id": "apt",
              "kind": "apt",
              "package": "gh",
              "bins": ["gh"],
              "label": "Install GitHub CLI (apt)",
            },
          ],
      },
  }
---

# GitHub Skill

Use the `gh` CLI to interact with GitHub repositories, issues, PRs, and CI.

## Setup

```bash
# Authenticate (one-time)
gh auth login

# Verify
gh auth status
```

## Common Commands

### Pull Requests

```bash
# List PRs
gh pr list --repo owner/repo

# Check CI status
gh pr checks 55 --repo owner/repo

# View PR details
gh pr view 55 --repo owner/repo

# Create PR
gh pr create --title "feat: add feature" --body "Description"

# Merge PR
gh pr merge 55 --squash --repo owner/repo
```

### Issues

```bash
# List issues
gh issue list --repo owner/repo --state open

# Create issue
gh issue create --title "Bug: something broken" --body "Details..."

# Close issue
gh issue close 42 --repo owner/repo
```

### CI/Workflow Runs

```bash
# List recent runs
gh run list --repo owner/repo --limit 10

# View specific run
gh run view <run-id> --repo owner/repo

# View failed step logs only
gh run view <run-id> --repo owner/repo --log-failed

# Re-run failed jobs
gh run rerun <run-id> --failed --repo owner/repo
```

### API Queries

```bash
# Get PR with specific fields
gh api repos/owner/repo/pulls/55 --jq '.title, .state, .user.login'

# List all labels
gh api repos/owner/repo/labels --jq '.[].name'

# Get repo stats
gh api repos/owner/repo --jq '{stars: .stargazers_count, forks: .forks_count}'
```

## JSON Output

Most commands support `--json` for structured output with `--jq` filtering:

```bash
gh issue list --repo owner/repo --json number,title --jq '.[] | "\(.number): \(.title)"'
gh pr list --json number,title,state,mergeable --jq '.[] | select(.mergeable == "MERGEABLE")'
```

## Templates

### PR Review Summary

```bash
PR=55 REPO=owner/repo
echo "## PR #$PR Summary"
gh pr view $PR --repo $REPO --json title,body,author,additions,deletions,changedFiles \
  --jq '"**\(.title)** by @\(.author.login)\n\n\(.body)\n\n+\(.additions) -\(.deletions) across \(.changedFiles) files"'
gh pr checks $PR --repo $REPO
```

### Issue Triage

```bash
gh issue list --repo owner/repo --state open --json number,title,labels,createdAt \
  --jq '.[] | "[\(.number)] \(.title) - \([.labels[].name] | join(", ")) (\(.createdAt[:10]))"'
```

## Notes

- Always specify `--repo owner/repo` when not in a git directory.
- Use URLs directly: `gh pr view https://github.com/owner/repo/pull/55`
- Rate limits apply; use `gh api --cache 1h` for repeated queries.

© swarmclawai · MIT · swarmclawai/swarmclaw

Similar skills

All skills for Git and GitHub →

github by other authors comes first.

github openclaw A skill that teaches your agent to drive GitHub through gh: browse pull requests, read CI logs, post comments and query the API. CX Codex +1 6,100installs github Dimillian Guides coding agents to use the gh CLI for inspecting pull requests, issues, and failed CI workflows. CX Codex +1 870installs github mitsuhiko A skill that teaches the agent to work with GitHub through the gh CLI: pull requests, CI runs, issues and raw API queries. CX Codex +1 504installs github kostja94 A skill for marketing on GitHub: repos, READMEs, GitHub Pages and Awesome lists used for SEO and AI citation. CX Codex +1 1,800installs github membrane Connects AI agents to GitHub repositories, issues, and pull requests via Membrane CLI. Manages workflows without manual token refresh. CX Codex +1 383installs triage Matt Pocock This skill moves issues and external PRs through triage states, verification, and agent briefs. It fits maintainers managing an issue queue. 990,453installs code-review Matt Pocock Reviews changes from a chosen reference point against repository standards and the originating spec. Use it for a branch, PR, or work in progress. 789,521installs implement Matt Pocock Implements work from a specification or tickets, following a test-driven flow and ending with review and a commit. Use it when a coding task needs a defined delivery routine. 774,700installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. 499,069installs setup-pre-commit Matt Pocock This skill configures pre-commit checks for a JavaScript repository, running Prettier, type checking, and tests before each commit. 489,289installs scaffold-exercises Matt Pocock This skill builds course exercise directories with sections, problems, solutions, and explainers. Use it when starting a new course section or creating exercise stubs. 480,196installs

From the same set12

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor