| name | gh-run |
| description | GitHub CLI (`gh run` and `gh workflow`) operations for workflow runs, jobs, logs, and attempts. You MUST load this skill when working with the `gh run` and the `gh workflow` commands. |
| license | MIT |
gh-run Skill
Use gh run and gh workflow to interact with GitHub Actions workflows. Prefer structured output and explicit
routing over brittle shell post-processing.
WHEN TO USE
- When diagnosing why a specific GitHub Actions CI/CD pipeline failed.
- To download artifact logs for a run that is currently stuck or in progress.
- When manually triggering a
workflow_dispatch event via the CLI.
WHEN NOT TO USE
- For retrieving standard Pull Request metadata (use
gh pr view instead).
- When attempting to write or modify the actual
.github/workflows/*.yml files (this skill is for
execution and monitoring, not authoring).
- To read agent-specific artifacts (like
token-usage.jsonl) when the gh aw audit command provides a better native parser.
Common Pitfalls
- Assuming Empty Logs Mean Success: Using
gh run view --log and getting nothing back, assuming the
job passed, when it actually means the log stream failed or the job was cancelled.
- Missing Triggered Runs: Running
gh pr checks and assuming it shows all related runs, completely
missing manually triggered runs or issue_comment triggers that aren't bound to the HEAD commit.
- Ignoring Job Context: Looking at the overarching run status instead of drilling down into the
specific
job_id that actually failed, wasting time searching healthy logs.
Mindmap of Commands
mindmap
root((gh-run))
run
cancel
Cancel a workflow run
delete
Delete a workflow run
download
Download artifacts
list
List recent workflow runs
rerun
Rerun a run
view
View summary of a run
watch
Watch progress
workflow
disable
Disable a workflow
enable
Enable a workflow
list
List workflows
run
Run a workflow
view
View summary of a workflow
Workflow Run Diagnostics
Triggering Workflows
Structured Query Patterns
gh run list --json databaseId,name,workflowName,status,conclusion,url --limit 20
gh run list --json databaseId,headBranch,name,event,status,conclusion,createdAt,url \
-q '.[] | select(.headBranch == "<branch_name>")' --repo <owner>/<repo> --limit 10
gh run list --repo <owner>/<repo>
gh run list --workflow <workflow_id_or_filename> --limit 5
gh run view --job <job_id> --json steps,conclusion
Failure Signatures
- Warning like
both run and job IDs specified; ignoring run ID means the
command did not execute the way you intended; fix arguments before
continuing.
- Repeated
403 from gh api on log/archive endpoints usually indicates
redirect or signed-URL handling issues, not missing repository access.
Classify as LOG_ACCESS_UNSUPPORTED and pivot to metadata or artifacts.
What to Avoid
- Do not assume Actions log retrieval is uniform across public pages, API
endpoints, and CLI subcommands.
Related Skills
- gh-pr:
You MUST load this skill when working with the
gh pr command.
- gh-models:
You MUST load this skill when working with the
gh models command.