agentleFS
IgorGanapolskyIgorGanapolsky/ThumbGate/.claude/skills/ci-failure-triage/SKILL.md

ci-failure-triage

Skill27 starsChanged 8 months agoMITView on GitHub

Triage a CI / PR check failure by READING the failure body before forming any hypothesis. Triggered whenever a required check is red, a PR is BLOCKED, a merge won't land, or you're about to call a failure "transient", "flaky", "stale", or "orphaned". Prevents dismissing a real failure (e.g. real CodeQL security alerts) as noise.

7 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use dependency-cve-sweep, fastapi-route-change and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • berntpoppSkill

    dependency-cve-sweep

    Use when handling Dependabot PRs, CodeQL/Trivy alerts, or doing a routine dependency/CVE sweep for this repo.

    Also in 5 projects that use this

  • berntpoppSkill

    fastapi-route-change

    Use when adding, renaming, or modifying this backend's FastAPI routes, dependencies, middleware, or response behavior.

    Also in 5 projects that use this

  • DauQuangThanhSkill

    code-quality-review

    Conducts comprehensive code quality reviews including code smells detection, maintainability assessment, complexity analysis, design pattern evaluation, naming conventions, code duplication, technical debt identification, and best practices validation. Produces detailed review reports with specific issues, severity ratings, metrics analysis, and actionable improvement recommendations. Use when reviewing code quality, analyzing code maintainability, detecting code smells, checking coding standards, measuring code complexity, identifying technical debt, or when users mention "code quality review", "code quality check", "maintainability analysis", "code smells", "clean code", "refactoring candidates", or "technical debt assessment".

    Also in 5 projects that use this

  • Microsoft AzureSkill

    release-readiness

    Complete ODIN release documentation and validation checks before declaring user-visible work complete, preparing a release, or opening the Release-to-main pull request.

    Also in 5 projects that use this

  • SentrySkill

    security-review

    Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.

    Also in 5 projects that use this

  • +2 more from berntpopp

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Only now may you re-run. "It was fast" is not an INFRA verdict.

    line 61
  2. Very specific:

    If the CEO asks "are you sure?" about a CI claim, your triage was superficial.

    line 69
  3. Very specific:

    Every red required check is classified with quoted evidence and either fixed (REAL/PRE-EXISTING) or re-run after a quoted INFRA log line.

    line 84

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

CI Failure Triage — Read Before You Conclude

The failure this prevents

Calling a red check "transient / flaky / orphaned / stale" WITHOUT reading its body. This session: a CodeQL check failed; it was dismissed as a "transient 4s orphaned check-run" — twice — when it was reporting 3 real security vulnerabilities (2 critical command-injection + 1 high XSS). The conclusion came before the evidence. (2026 failure-triage practice = taxonomy → read → cluster → gate, a repeatable detection system, not vibes: https://latitude.so/blog/ai-agent-failure-modes-detection-playbook)

Hard rule

You may not use the words "transient", "flaky", "stale", "orphaned", or "unrelated" about a check until you have read its failure body and quoted the actual error. A duration (e.g. "4s") is a hint, never proof.

Protocol (in order — do not skip)

  1. Identify the exact failing check + its commit.
    head=$(gh pr view <N> --json headRefOid -q .headRefOid)
    gh pr checks <N> | grep -viP "\t(pass|skipping)\t"
  2. Read the failure body. This is the step that gets skipped.
    • GitHub Actions job: gh run view --job <id> --log-failed | tail -40
    • CodeQL / code-scanning: read the ALERTS, not just the check:
      gh api "repos/<owner>/<repo>/code-scanning/alerts?state=open&per_page=100" \
        --jq '.[] | "\(.rule.id) | \(.rule.security_severity_level) | \(.most_recent_instance.location.path):\(.most_recent_instance.location.start_line) | ref=\(.most_recent_instance.ref)"'
    • Also fetch the check-run's output.title / output.summary — it usually states exactly what failed ("2 new alerts including 2 high severity…").
  3. Classify against branch protection. Map each REQUIRED context to its real state on the head commit, so you know what actually blocks:
    gh api repos/<owner>/<repo>/branches/main/protection/required_status_checks -q '.contexts[]'
    gh api "repos/<owner>/<repo>/commits/$head/check-runs" --paginate \
      -q '.check_runs[] | "\(.name)=\(.conclusion)"'
  4. THEN form a hypothesis, and only with one of these supported verdicts:
    • REAL — the body shows a genuine defect → fix the code, add a test.
    • PRE-EXISTING — same alert exists on main independent of your diff (prove it: query alerts on refs/heads/main). Diff-attributed but not yours; still must be fixed to unblock — fix it or get an explicit dismissal decision.
    • INFRA — the log shows a runner/network/quota error (quote the line). Only now may you re-run. "It was fast" is not an INFRA verdict.
  5. Re-run only after an INFRA verdict with a quoted log line. Re-running a green-workflow-but-red-check loop forever does nothing if the real blocker is a pinned failed check-run from a prior commit — push a fresh commit instead.

"Are you sure?" interaction

If the CEO asks "are you sure?" about a CI claim, your triage was superficial. Re-run this protocol from step 2 (read the body) before answering. See evidence-first-answer.

Anti-patterns

PatternFix
"CodeQL failed in 4s — transient, re-running"Read output.summary + alerts first; 4s ≠ proof
Resolving a review/scan thread to clear a gateAddress the finding in code; resolving ≠ fixing
Re-running a failed check repeatedly with no log readOne read; classify REAL/PRE-EXISTING/INFRA; act on the class
"Unrelated to my change" without checking mainQuery alerts on refs/heads/main to prove pre-existing

Exit criteria

Every red required check is classified with quoted evidence and either fixed (REAL/PRE-EXISTING) or re-run after a quoted INFRA log line. Never declare CI green without gh pr checks showing it.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.