github-api

Query GitHub repositories, PRs, issues, and workflows via the gh CLI.

42|2|Updated Mar 17, 2019
One-click install
npx skills add https://github.com/starwards/starwards --skill github-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-api
Source: https://github.com/starwards/starwards/tree/main/.claude/skills/github-api
Command: npx skills add https://github.com/starwards/starwards --skill github-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gh, and includes references (resource) components.

What problem does it solve?

Manually navigating GitHub for information or performing repetitive tasks is time-consuming. This skill provides direct, programmatic access to the GitHub API via the gh CLI, automating data retrieval and complex operations.

Core Features & Use Cases

  • Comprehensive API Access: Query repositories, pull requests, issues, workflow runs, and download artifacts with simple commands.
  • CI/CD Debugging: Quickly fetch logs and status for GitHub Actions failures, streamlining the debugging process.
  • Use Case: Need to find all open bugs assigned to your team across a repository? Use this skill to query the GitHub API and generate a formatted report in seconds.

Quick Start

"List the 5 most recent open pull requests in the 'starwards/starwards' repository."

Frequently Asked Questions about github-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query GitHub repository data and pull request information programmatically?

Query GitHub repository data and pull requests using the gh CLI to access the GitHub API directly. The skill enables you to retrieve PR details, issue metadata, workflow status, and repository information in JSON format, parsing results with jq for automation in CI/CD pipelines.

Can I automate GitHub tasks like fetching issues and logs without writing API code?

Yes, automate GitHub tasks using the gh CLI without writing raw API code. The skill handles authentication via GITHUB_TOKEN, supports REST API querying, pagination, and JSON parsing, letting you retrieve issues, workflows, and logs directly in scripts or CI/CD workflows.

How do I debug GitHub Actions failures by accessing workflow logs and status?

Debug GitHub Actions failures by querying workflow runs and fetching logs through the gh CLI. The skill retrieves workflow status, run details, and logs from your repository, enabling rapid diagnostics and error tracking within CI/CD pipelines.

What authentication is required to access the GitHub API through gh?

GitHub API access through gh requires GITHUB_TOKEN authentication set in your environment. The skill prefers existing gh binaries if available and handles token-based authentication automatically, supporting rate-limit checking and secure API interactions.

Can I download artifacts and retrieve raw repository contents using this approach?

Yes, download GitHub artifacts and retrieve raw repository contents using the gh CLI. The skill supports safe file downloads, raw API interactions, and pagination, enabling automated content retrieval and artifact management for CI/CD and QA workflows.

Does this work for querying multiple repositories and generating formatted reports?

Yes, query multiple repositories and generate formatted reports by combining gh CLI commands with JSON parsing and jq. The skill supports comprehensive API access across repos, enabling batch queries, filtering, and report generation for cross-repo analysis.