diagnose-ci

diagnose-ci is a skill for Claude Code from urmzd/dotfiles. It costs 130 tokens per session (706 once invoked), scanned A, original, Apache-2.0.

A read-only workflow for investigating failed GitHub Actions runs, which are automated checks that build and test code on GitHub. It retrieves the failed-step logs and identifies the likely cause.

In plain words
What is it for?
Use it to find recent failures, inspect logs, classify causes such as compilation errors, test failures, lint problems, missing secrets, and timeouts, and recommend the next fix.
Why use it?
It turns a red CI result into a specific explanation instead of requiring someone to search through the entire run manually. It does not change the repository or rerun the job.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to find recent failures, inspect logs, classify causes such as compilation errors, test failures, lint problems, missing secrets, and timeouts, and recommend the next fix.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/urmzd/dotfiles/diagnose-ci
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add urmzd/dotfiles --skill diagnose-ci
Clone the repo
git clone --depth 1 https://github.com/urmzd/dotfiles

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for diagnose-ci

README.md
[![agentmods](https://agentmods.dev/badge/skills/urmzd/dotfiles/diagnose-ci.svg)](https://agentmods.dev/skills/urmzd/dotfiles/diagnose-ci)
Your own site
<a href="https://agentmods.dev/skills/urmzd/dotfiles/diagnose-ci"><img src="https://agentmods.dev/badge/skills/urmzd/dotfiles/diagnose-ci.svg" alt="Measured on agentmods" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 706 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00130 $0.00706
Opus 5 $0.00065 $0.00353
Sonnet 5 $0.00026 $0.00141
Haiku 4.5 $0.00013 $0.00071

Measured 7d ago against content hash e79b068fbf4f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

diagnose-ci scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

dot_agents/skills/diagnose-ci/SKILL.md · 60 lines

What it actually says

Diagnose CI

Investigate and diagnose CI pipeline failures.

Steps

  1. Find the failure:

    • If a run_id is provided, use gh run view <run_id> --log-failed.
    • Otherwise, run gh run list --status=failure --limit 5 --json databaseId,name,headBranch,conclusion,createdAt to find recent failures.
    • Pick the most recent failure on the current branch (or the most recent overall if none match).
  2. Pull logs: Run gh run view <id> --log-failed to get the failed step logs. If output is large, focus on the last 100 lines of the failing step.

  3. Diagnose: Analyze the logs to identify:

    • The specific step that failed
    • The root cause (compile error, test failure, lint issue, missing secret, timeout, etc.)
    • The relevant file(s) and line(s) if applicable
  4. Recommend fix: Based on the diagnosis (read-only: recommend, do not apply):

    • If it's a code issue: show the exact fix and point the user to fix-and-retry to apply + re-ship it.
    • If it's a config issue (missing secret, wrong action version): explain what to change.
    • If it's flaky (timeout, network): suggest re-running with gh run rerun <id>.
  5. Report: Present a concise summary:

    ## CI Failure: <workflow name> (run #<id>)
    - Branch: <branch>
    - Failed step: <step name>
    - Root cause: <explanation>
    - Fix: <what to do>
    

Rules

  • Always check the current repo's workflows first (gh run list).
  • If gh is not authenticated or the repo has no remote, report that clearly.
  • Don't blindly re-run failed pipelines; diagnose first.

Gotchas

  • gh run view <id> --log-failed returns empty for a cancelled run (no step is marked "failed", so there is nothing to dump). Fall back to gh run view <id> --json jobs and inspect each job's conclusion/steps to find the cancelled or failed step, then read its log directly.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 60 lines · 130 tokens per session scan A e79b068fbf4f

Subscribe to this mod's changes

diagnose-ci is a skill published in the GitHub repository urmzd/dotfiles (3 stars, last pushed yesterday), licensed Apache-2.0. It adds 130 tokens to every session and 706 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

save-debug-experience

Record a debugging session's findings into a timestamped markdown file under debugexperience/. Captures problem, root cause, solution, and key learnings in a structured, reusable format. Use when: you've just resolved a non-obvious bug, found an undocumented edge case, encountered an issue that took multiple attempts…

magic3007/dotfiles · 113 tokens

use-codefresh

Reference for using Codefresh via the CodeFresh CLI. Use when a Codefresh CI check is failing in a recursionpharma PR, or when working with Codefresh builds.

ooloth/dotfiles · 39 tokens

use-next-devtools

Reference for using the NextJS Dev Tools via the nextjs-agent. Use to debug or observe Next.js framework internals.

ooloth/dotfiles · 30 tokens

prisma-connection-pool-exhaustion

Fix Prisma "Too many connections" and connection pool exhaustion errors in serverless environments (Vercel, AWS Lambda, Netlify). Use when: (1) Error "P2024: Timed out fetching a new connection from the pool", (2) PostgreSQL "too many connections for role", (3) Database works locally but fails in production…

magic3007/dotfiles · 100 tokens

typescript-circular-dependency

Detect and resolve TypeScript/JavaScript circular import dependencies. Use when: (1) "Cannot access 'X' before initialization" at runtime, (2) Import returns undefined unexpectedly, (3) "ReferenceError: Cannot access X before initialization", (4) Type errors that disappear when you change import order, (5) Jest/Vitest…

magic3007/dotfiles · 88 tokens

nextjs-server-side-error-debugging

Debug getServerSideProps and getStaticProps errors in Next.js. Use when: (1) Page shows generic error but browser console is empty, (2) API routes return 500 with no details, (3) Server-side code fails silently, (4) Error only occurs on refresh not client navigation. Check terminal/server logs instead of browser for…

magic3007/dotfiles · 87 tokens