# Better Github Skill

Use for 1) inspecting PR state, 2) reading review threads, or 3) debugging CI failures.

- Repository: https://github.com/humanlayer/humanlayer (12740 stars)
- Category: Testing
- License: Apache-2.0
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add humanlayer/humanlayer --skill better-github-skill -g -a claude-code -y`
Codex: `npx skills add humanlayer/humanlayer --skill better-github-skill -g -a codex -y`
Cursor: `npx skills add humanlayer/humanlayer --skill better-github-skill -g -a cursor -y`
Gemini CLI: `npx skills add humanlayer/humanlayer --skill better-github-skill -g -a gemini-cli -y`

## Description

Use for 1) inspecting PR state, 2) reading review threads, or 3) debugging CI failures. Otherwise use the gh CLI.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# better-github-skill

Use these scripts only for the three flows listed below. Otherwise use raw
`gh`. Scripts run TypeScript with Bun and have no dependencies.

## Scripts

| script | use for |
|---|---|
| `bun run scripts/pr-snapshot.ts [pr] [-R o/r]` | full PR state in one call: meta, mergeability, checks, files, reviews, comments, thread counts. Use instead of hand-assembling `pr view --json` field sets or chaining view/checks/comments calls. |
| `bun run scripts/pr-threads.ts [pr] [-R o/r] [--all] [--author X] [--since ISO]` | the full review conversation: review bodies, issue comments, and unresolved inline threads (resolution state porcelain gh cannot get). Resolved/outdated threads are hidden by default, counted in the header; `--all` includes them. Read-only: never reply to or resolve threads unless explicitly told to. |
| `bun run scripts/ci-failures.ts [run-id] [--pr N] [--list] [-R o/r]` | failing checks → failing jobs/steps → log snippet each; full logs saved to files (paths printed); rg those instead of re-fetching. `--list [--workflow W] [-L n]` shows recent runs with conclusions; use it to find the failing run id instead of `gh run list --json` field sets. |

Rule of thumb: pr-snapshot answers "what's the state of this PR", pr-threads
answers "what did reviewers write". Neither replaces the other.

All scripts: `--json` for structured output, `--help` for usage (includes the
`--json` shape). Omit the PR number to use the current branch's PR. Default
output is sized for context; pass `--full` only when a truncation marker
(`[…+N chars]`) hides something you need. They exit 0 when the report
succeeds even if CI is red or threads are unresolved.

## Gotchas (each one burned real sessions repeatedly)

The rest: https://github.com/humanlayer/humanlayer/blob/HEAD/.claude/skills/better-github-skill/SKILL.md
