Agent skill
gh-run-failure
Use to analyze failures in GitHub pipelines or jobs.
Install this agent skill to your Project
npx add-skill https://github.com/bkircher/skills/tree/main/gh-run-failure
SKILL.md
<general_guidelines>
- Assume the
ghtool is installed and configured. - Avoid printing full logs; focus on the failing step.
- For large logs, prefer downloading artifacts.
- If a test case failed, specify which test and how to run it locally. </general_guidelines>
List recent runs
Inspect a single run
Show only failed jobs or steps
View failed jobs/steps output
To focus on a specific job, first list them: gh run view "$RUN_ID" --json jobs --jq '.jobs[] | "(.databaseId)\t(.name)\t(.conclusion)"'
Then fetch that job's log: JOB_ID=987654321 gh run view "$RUN_ID" --job "$JOB_ID" --log
List artifacts from a run
Download a specific artifact
After downloading, search locally for errors: rg -n "error|fail|exception" /tmp/github-run-"$RUN_ID"
Compare failed and latest successful run
Get latest successful run ID:
BRANCH=main
OK=$(gh run list --branch "$BRANCH" --limit 50 --json databaseId,conclusion
--jq '.[] | select(.conclusion=="success") | .databaseId' | head -n1)
echo "$OK"
Diff their SHAs: FAIL_SHA=$(gh run view "$RUN_ID" --json headSha --jq .headSha) OK_SHA=$(gh run view "$OK" --json headSha --jq .headSha) gh api repos/:owner/:repo/compare/"$OK_SHA"..."$FAIL_SHA" --jq '.commits[].commit.message' | sed 's/^/- /'
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
confluence-read
Search Confluence pages and fetch page content. Use when a user wants to find or read Confluence wiki pages, or when context from Confluence is needed.
gh-code-review
Conduct a thorough and in-depth code review. Use this skill when conducting a code review for a PR on GitHub.
unit-testing
Use when writing or updating unit tests (in any language).
git-commit-message
Formulate a git commit message. Use this skill whenever asked to create a commit message.
postgresql-table-design
Design and optimize a PostgreSQL-specific schema. Use for PostgreSQL best practices, data types, indexing, constraints, performance patterns, and advanced features.
english-text-editor
Suggests improvements for English language text but does not rewrite the original. Use when asked to correct spelling or wording and the text is English.
Didn't find tool you were looking for?