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.
npx skills add swarmclawai/swarmclaw --skill github -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/github/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/github/
1Skills CLI (Vercel)
npx skills add swarmclawai/swarmclaw --skill github -a codex2Manually: put the files in place
.agents/skills/github/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add swarmclawai/swarmclaw --skill github -a cursor2Manually: put the files in place
.cursor/skills/github/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install swarmclawai/swarmclaw github2Manually: put the files in place
.github/skills/github/SKILL.md1Skills CLI (Vercel)
npx skills add swarmclawai/swarmclaw --skill github -a gemini-cli2Platform CLI
gemini skills install https://github.com/swarmclawai/swarmclaw --path skills/githubManually: put the files in place
.devin/skills/github/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add swarmclawai/swarmclaw --skill github -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.