github-tools
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
About this skill
The 'github-tools' skill empowers AI agents to perform a wide range of operations on GitHub repositories directly from the command line, mimicking human interaction through the `gh` CLI. It allows agents to retrieve detailed information about pull requests, including their continuous integration (CI) status, and to list, view, and inspect GitHub Actions workflow runs and their logs, specifically highlighting failed steps. This skill is particularly useful for automating information gathering within GitHub. It extends beyond basic queries by integrating with `gh api`, allowing agents to construct and execute complex GitHub API requests for data not readily available through simpler subcommands. The ability to output results in JSON format with `--jq` filtering ensures that agents can parse and utilize the data efficiently. Developers, DevOps engineers, and project managers can leverage this skill to create AI agents that monitor repository health, automate CI/CD pipeline checks, or gather specific project data without manual intervention. It transforms an AI agent into a powerful GitHub assistant capable of programmatic interaction and data extraction.
Best use case
The primary use case is to automate the retrieval of critical GitHub information for developers and DevOps teams. It allows AI agents to quickly fetch details about repository states, pull requests, and CI/CD pipelines, significantly streamlining monitoring, debugging, and general project management workflows.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Users should expect to receive specific, structured information from GitHub related to issues, pull requests, CI runs, or custom API queries, enabling informed decisions or further automated actions.
Practical example
Example input
Check the CI status of pull request #42 on `octocat/Spoon-Knife`.
Example output
CI checks for PR #42 on octocat/Spoon-Knife: Build (ubuntu-latest) - Passed, Test (windows-latest) - Passed. All checks completed successfully.
When to use this skill
- When an AI agent needs to query GitHub for specific repository, PR, or CI run information.
- To automate checks of CI status on pull requests for rapid feedback.
- For listing and inspecting GitHub Actions workflow runs and their logs, especially to identify failures.
- When needing to access GitHub API data that isn't directly exposed by other `gh` subcommands.
When not to use this skill
- For tasks that involve modifying GitHub resources (e.g., merging PRs, creating issues) if the agent's permissions or the skill's scope are strictly read-only.
- When simpler, existing integrations or direct GUI interaction is sufficient and faster for one-off tasks.
- If GitHub token authentication for the `gh` CLI is not properly configured for the AI agent's environment.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/github-tools/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How github-tools Compares
| Feature / Agent | github-tools | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | medium | N/A |
Frequently Asked Questions
What does this skill do?
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
How difficult is it to install?
The installation complexity is rated as medium. You can find the installation instructions above.
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.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
Top AI Agents for Productivity
See the top AI agent skills for productivity, workflow automation, operational systems, documentation, and everyday task execution.
SKILL.md Source
# GitHub Skill Use the `gh` CLI to interact with GitHub. Always specify `--repo owner/repo` when not in a git directory, or use URLs directly. ## Pull Requests Check CI status on a PR: ```bash gh pr checks 55 --repo owner/repo ``` List recent workflow runs: ```bash gh run list --repo owner/repo --limit 10 ``` View a run and see which steps failed: ```bash gh run view <run-id> --repo owner/repo ``` View logs for failed steps only: ```bash gh run view <run-id> --repo owner/repo --log-failed ``` ## API for Advanced Queries The `gh api` command is useful for accessing data not available through other subcommands. Get PR with specific fields: ```bash gh api repos/owner/repo/pulls/55 --jq '.title, .state, .user.login' ``` ## JSON Output Most commands support `--json` for structured output. You can use `--jq` to filter: ```bash gh issue list --repo owner/repo --json number,title --jq '.[] | "\(.number): \(.title)"' ```
Related Skills
botlearn-healthcheck
botlearn-healthcheck — BotLearn autonomous health inspector for OpenClaw instances across 5 domains (hardware, config, security, skills, autonomy); triggers on system check, health report, diagnostics, or scheduled heartbeat inspection.
Incident Postmortem Generator
Generate blameless incident postmortems from raw notes, Slack threads, or bullet points.
Post-Mortem & Incident Review Framework
Run structured post-mortems that actually prevent repeat failures. Blameless analysis, root cause identification, and action tracking.
afrexai-performance-engineering
Complete performance engineering system — profiling, optimization, load testing, capacity planning, and performance culture. Use when diagnosing slow applications, optimizing code/queries/infrastructure, load testing before launch, planning capacity, or building performance into CI/CD. Covers Node.js, Python, Go, Java, databases, APIs, and frontend.
OpenClaw Mastery — The Complete Agent Engineering & Operations System
> Built by AfrexAI — the team that runs 9+ production agents 24/7 on OpenClaw.
Legacy System Modernization Engine
Complete methodology for assessing, planning, and executing legacy system modernization — from monolith decomposition to cloud migration. Works for any tech stack, any scale.
Incident Response Playbook
Structured incident response for business and IT teams. Guides you through detection, triage, containment, resolution, and post-mortem — with auto-generated timelines and action items.
Git Engineering & Repository Strategy
You are a Git Engineering expert. You help teams design branching strategies, implement code review workflows, manage monorepos, automate releases, and maintain healthy repository practices at scale.
Django Production Engineering
Complete methodology for building, scaling, and operating production Django applications. From project structure to deployment, security to performance — every decision framework a Django team needs.
IT Disaster Recovery Plan Generator
Build production-ready disaster recovery plans that actually get followed when things break.
afrexai-api-architect
Design, build, test, document, and secure production-grade APIs. Covers the full lifecycle from schema design through deployment, monitoring, and versioning. Use when designing new APIs, reviewing existing ones, generating OpenAPI specs, building test suites, or debugging production issues.
Agent Ops Runbook
Generate a production-ready operations runbook for deploying AI agents. Covers pre-deployment checklists, shadow mode → supervised → autonomous rollout stages, monitoring dashboards, rollback procedures, cost management, and incident response templates.