debug-failing-ci

debug-failing-ci is a skill for Claude Code, Codex from tmj-90/gaffer. It costs 88 tokens per session (1,591 once invoked), scanned C, original, Apache-2.0.

A step-by-step method for finding the real cause of a failing CI pipeline, the automated checks that run on code changes. It compares logs, environments, commands, and commits instead of hiding failures with retries.

In plain words
What is it for?
Use it to investigate failed builds, tests, lint checks, deploy jobs, workflow configuration, missing tools, version differences, and flaky runs.
Why use it?
It helps explain why code passes on a developer's machine but fails on the CI runner, or why a workflow is flaky or slow. The goal is to fix the cause rather than make the pipeline appear green.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to investigate failed builds, tests, lint checks, deploy jobs, workflow configuration, missing tools, version differences, and flaky runs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tmj-90/gaffer/debug-failing-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 tmj-90/gaffer --skill debug-failing-ci
Clone the repo
git clone --depth 1 https://github.com/tmj-90/gaffer

Made for: Claude Code, Codex.

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 debug-failing-ci

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmj-90/gaffer/debug-failing-ci/github.svg)](https://agentmods.dev/skills/tmj-90/gaffer/debug-failing-ci)
Your own site
<a href="https://agentmods.dev/skills/tmj-90/gaffer/debug-failing-ci"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/debug-failing-ci/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for debug-failing-ci

Your own site · 80×15
<a href="https://agentmods.dev/skills/tmj-90/gaffer/debug-failing-ci"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/debug-failing-ci.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,591 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00088 $0.01591
Opus 5.5 $0.00035 $0.00636
Sonnet 5.5 $0.00018 $0.00318
Haiku 4.5 $0.00009 $0.00159

Measured 16d ago against content hash 4ce62c76190a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

debug-failing-ci scanned grade C with 1 finding 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 16d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- The safety hook blocks `git clean -fdx`, `rm -rf`, `env`/`printenv` and installs; use
runner/skills/debug-failing-ci/SKILL.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Debug a failing CI pipeline

A red pipeline measures a difference: between your machine and the runner, between two commits, or between two runs of the same commit. Find the difference, fix what it reveals, and never make CI green by making it look away.

How this works in Gaffer. You never push and cannot re-run CI yourself. The runner pushes your branch and opens a PR only when the operator has enabled that, and only then can its opt-in CI gate run: a red check sends the delivery back to rework with the failing check attached as evidence. So your proof is a local reproduction under CI's exact conditions — fails before, passes after — and any later CI run is the runner's.

Steps

  1. Get the real failure text. Read get_ticket (the description, last_review_feedback and latest_events) plus any review-feedback block in your prompt. Find the FIRST error in the log, not the last — later failures are usually consequences. Note the step, the exact command, and the exit code. Call search_lore for known CI gotchas in this repo. If only a check name and URL are available and you cannot open the log (no network or credentials), go on to step 3 anyway: the workflow file tells you what CI ran.
  2. Classify before fixing. Each class has a different fix:
    • code / test — the change is wrong, or a test encodes stale behaviour;
    • flake — passes and fails on the same commit (order, time, shared state, network);
    • environment drift — tool or runtime version, OS (BSD vs GNU sed/date), locale or timezone, a file present locally but ignored or untracked in git;
    • workflow config — YAML syntax, matrix, needs:, paths filters, a secret that is absent on forks;
    • infrastructure — runner outage, registry or rate-limit error, disk full. Do not change code for this: report it (see "Stop and escalate when").
  3. Reproduce CI's conditions. Open the workflow (.github/workflows/*.yml, .gitlab-ci.yml, …) and copy the exact commands, the runtime versions (setup-node, .nvmrc, python-version), the env vars and the working directory. Run the build, test and lint commands, not your local alias. Never run the workflow's install or setup steps (npm ci, pnpm install, pip install, bundle install, uv sync, playwright install, …): the worktree uses the existing install. If the failure is in an install step, reason from the lockfile and escalate. Compare node --version (or the ecosystem's equivalent) with the pinned version. List what your run depends on that a fresh checkout lacks: git status --porcelain --ignored shows untracked and ignored files (generated code, a local config, a cache). Most "works on my machine" failures die here.
  4. Bisect when the cause is not obvious. If the job passed on an earlier commit: git bisect start <first-red> <last-green>, then git bisect run <failing command>, then git bisect reset. For a suspected flake, measure the rate with a loop (for i in {1..20}; do <cmd> || echo FAIL; done) and run the test alone vs with the suite to expose order dependence.
  5. Fix the cause. A real test failure → fix the code (the fix-bug skill). A flake → fix the nondeterminism (the fix-flaky-test skill). Drift → pin the version, install the tool in the workflow, or make the script portable (the shell-scripting skill). A workflow error → fix the YAML and keep permissions: minimal.
  6. Prove it locally. Show the CI command failing before your fix and passing after; for a flake, the loop at 20/20. Record it via the record-evidence skill as test_output: the log excerpt, the cause in one sentence, the passing command and its summary. Use ci_run only for a real CI run URL you actually observed. On a resume, where that call is refused, put this in your final message instead (see record-evidence).
  7. Leave the pipeline better, briefly. If the log hid the cause, add the one missing diagnostic (print the tool version, upload the test report) when it is small.

Read the full file on GitHub · 99 lines

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. 16d ago Changed · +35 lines scan A → C 4ce62c76190a
  2. 19d ago First seen · 64 lines · 88 tokens per session scan A 881bfd33fd45

Subscribe to this mod's changes

debug-failing-ci is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 17d ago), licensed Apache-2.0. It adds 88 tokens to every session and 1,591 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-28.