gh-run

Retrieve GitHub Actions run, job, and attempt logs to diagnose workflow failures.

3|1|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/Cogni-AI-OU/cogni-ai-agent-skills --skill gh-run-cogni-ai-ou
Or copy as Structured Prompt for Agentā–¼
Please help me install this Agent Skill.
Skill: gh-run
Source: https://github.com/Cogni-AI-OU/cogni-ai-agent-skills/tree/main/gh-run
Command: npx skills add https://github.com/Cogni-AI-OU/cogni-ai-agent-skills --skill gh-run-cogni-ai-ou

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It eliminates the frustration of figuring out why a GitHub Actions workflow failed or appears stuck when the wrong identifiers, missing logs, or incomplete log retrieval hide the real issue.

Core Features & Use Cases

  • Run, job, and log retrieval: Inspect workflow runs, job attempts, verbose job metadata, and failures with correct targeting.
  • Robust diagnostics for tricky cases: Download attempt logs as a ZIP to handle in-progress runs, expired attempts, matrix complexities, and empty --log output scenarios.
  • Workflow operations: Support day-to-day execution and monitoring needs via gh run and gh workflow, including triggering workflow_dispatch and watching for completion.

Quick Start

Run: gh run list --repo <owner>/<repo> --workflow <workflow_id_or_filename> --limit 5 and then use the returned run ID to view detailed job logs for the failing attempt.

Frequently Asked Questions about gh-run

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

FAQPage Schema
How do I retrieve logs for a specific GitHub Actions job attempt when the CLI output is empty?ā–¼

When GitHub Actions log streaming is empty or fails, you can retrieve job attempt logs by downloading the log archive as a ZIP file via the API. This method ensures you capture the correct run and job diagnostics for in-progress or expired attempts.

Why does my GitHub Actions workflow appear stuck and how can I diagnose it?ā–¼

To diagnose a stuck GitHub Actions workflow, inspect the workflow run, job attempts, and verbose job metadata using the gh CLI. Downloading attempt logs as a ZIP helps uncover hidden failures when standard console log streaming is incomplete.

What is the best way to trigger a GitHub Actions workflow dispatch and monitor its execution?ā–¼

Triggering a GitHub Actions workflow dispatch is best done via the gh CLI using workflow commands. You can then monitor the workflow execution and watch for completion by retrieving the correct run ID to inspect detailed job logs.

Can I download artifacts and logs for in-progress GitHub Actions runs?ā–¼

Yes, you can download artifacts and logs for in-progress GitHub Actions runs. By targeting the correct run ID and job attempt via the API, you can retrieve a ZIP archive of the logs even when the pipeline has not yet finished.

How do I list recent GitHub Actions workflow runs to find the correct run ID?ā–¼

You can list recent GitHub Actions workflow runs by executing a gh CLI command with the repository and workflow identifiers. This returns a list of recent runs, allowing you to select the correct run ID for detailed log inspection.

Does gh run work with matrix complexities and multi-attempt GitHub Actions pipelines?ā–¼

Yes, gh run handles matrix complexities and multi-attempt pipelines by applying robust diagnostics. It targets specific job attempts and retrieves structured logs, ensuring accurate troubleshooting for complex CI/CD scenarios.