agentleFS
me-cedricme-cedric/agent-compass/skills/ci-triage/SKILL.md

ci-triage

Skill3 starsChanged 27 days agoMITView on GitHub

Triage a red or slow CI job: classify a failure as flaky, environment or real, fix and rerun, or audit the job time. Use when CI is red or slow.

17 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the log from the first error, not from the last line.

    line 18
  2. Distinctive:

    If you cannot reproduce it, say so.

    line 23
  3. Distinctive:

    Run the checks locally. Push only when the user asks.

    line 25
  4. Distinctive:

    Use it when CI is green but slow, or when the same job is rerun often.

    line 49
  5. Distinctive:

    Look for a cache that misses on most pull request runs.

    line 56

“Common” is measured: kept by at least 6 in 10 of the 13 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-triage

A red pipeline is not always a code defect. Read the failed job, not the pipeline color.

Steps

  1. Get the failed job log:
    • GitHub: gh run list --limit 5, then gh run view <run-id> --log-failed.
    • GitLab: glab ci status, then glab ci trace <job>.
  2. Read the log from the first error, not from the last line.
  3. Note which jobs pass. If tests, lint and typecheck pass, suspect the environment or a gate that runs over the whole commit range.
  4. A commit linter runs over every commit of the branch. One inherited commit with a bad subject reddens each build. Reword or squash that commit. Do not change code.
  5. Classify the failure, using the table.
  6. Reproduce it locally with the command that the CI file runs, the same tool versions and a lockfile install.
  7. If you cannot reproduce it, say so. Name the likely difference: OS, env var, test order, time zone, network, cache.
  8. Make the smallest fix for one cause. Do not skip, weaken or delete a test. Do not relax a gate.
  9. Run the checks locally. Push only when the user asks.
  10. Rerun the failed job: gh run rerun <run-id> --failed, or glab ci retry <job>. Confirm that it passes.

Classes

ClassSignAction
FlakyPasses on a rerun. The cause is timing, order or shared state.Find the cause. Rerun once to confirm. Do not hide it with a retry.
EnvironmentThe runner, network, cache, secret, quota or tool version failed. Unrelated commits fail the same way.Fix the CI config or tell the owner. Do not change code.
RealIt fails on the same commit locally, and a change in the diff explains it.Fix the code.

Packaging builds

An exit code is not a build result for an installer, an image, an APK or a binary.

  1. The artifact exists at the path that the build declares.
  2. It comes from this run. Compare it with a marker file that you create when the run starts. Do not compare it with a source file time.
  3. It opens: unzip -t, tar -tf, docker image inspect, hdiutil verify.
  4. A zero exit can ship the previous build, because a bundler may reuse an existing output directory. Delete the output before the build.
  5. A non-zero exit can still leave a good artifact, because packaging runs last. Look before you call the build failed.
  6. Clean the leftover state at the start of each build, not after a failure.

Slow CI audit

Use it when CI is green but slow, or when the same job is rerun often. The audit reads. It changes nothing.

  1. Take the last 50 runs or more. GitHub: gh run list --limit 50 --json databaseId,event,headBranch,headSha,conclusion. GitLab: glab ci list.
  2. Split each job into wait, setup and run time.
    • GitHub: gh api repos/<owner>/<repo>/actions/runs/<id>/jobs. Wait is started_at - created_at. Setup is the steps before the first build, lint or test step.
    • GitLab: glab api projects/:id/pipelines/<id>/jobs. Wait is queued_duration. Run is duration.
  3. Find the largest share for the slowest job, and fix that first. A pull request waits for its slowest job, not for the sum.
  4. Look for a cache that misses on most pull request runs. Look for the same commit run more than once: each rerun hides a flaky or environment cause.
  5. Report a table: job, median wait, setup and run, cache hits, reruns. Then name the levers from references/speed.md, largest saving first.

Report

Give the job, the class, the cause, the fix and the rerun result. Say what you did not verify.

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.