agentleFS
xmtpxmtp/libxmtp/.agents/skills/check-ci/SKILL.md

check-ci

Skill127 starsChanged 11 days agoMITView on GitHub

Use when checking GitHub Actions results for a PR, investigating a failing job, or waiting on a run - covers compact status commands, log filtering, and how to wait without burning context

2 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. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the job records annotations, they are cheaper still and include file and line:

    line 41
  2. Distinctive:

    If you must loop, back off: 60s, then 120s, then 300s.

    line 73
  3. Very specific:

    Never run gh api .../logs without a filter.

    line 77
  4. Very specific:

    Never open a browser for CI.

    line 79
  5. Very specific:

    Check the plan's ## Findings section before investigating a failure.

    line 81

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Checking CI in libxmtp

Raw CI output is the most expensive thing an agent can read. A single unfiltered job log is 10-12k tokens, and every token stays in context for the rest of the session. Use these recipes instead.

Status of a PR

dev/nix-shell 'just ci-status 4096'

Failures first with job URLs, then one summary line:

FAILED:
  test-node-sdk / Test (node-sdk) shard 2  https://github.com/.../job/103436317046
RUNNING: 1 job(s)
SUMMARY: 38 ok, 3 failed, 6 skipped, 1 running

Duplicates are collapsed to the latest attempt per job, so a re-run does not show up twice.

Why a job failed

Take the job id from the ci-status URL:

dev/nix-shell 'just ci-failures 103436317046'

Returns only failure markers - test names, assertions, panics, rustc errors, the failing recipe. Works for Rust and JS jobs. Typically 5-10 lines.

If the job records annotations, they are cheaper still and include file and line:

dev/nix-shell 'just ci-annotations 103435038571'

Run timing and specific log lines

dev/ci/metrics measures runs: wall time, runner minutes by runner class, the slowest steps, and the change class. For a merge run it also says whether the PR's last run tested the same tree and whether the test outputs were fetched.

dev/nix-shell 'python3.11 -B dev/ci/metrics runs --branch main --event push --limit 5'
dev/nix-shell "python3.11 -B dev/ci/metrics marker 115531426546 'will be fetched'"

marker prints only the log lines that match the pattern.

Waiting

Block. Do not poll.

gh run watch <run-id> --exit-status

A sleep-and-recheck loop costs one full-context model call per tick. In the 2026-09-10 session, 286 such polls consumed roughly 37M input tokens, and 40-65% of what they returned was unchanged "queued" or "in progress" text.

If you must loop, back off: 60s, then 120s, then 300s.

Rules

  • Never run gh api .../logs without a filter. That is the 10-12k token read these recipes exist to replace.
  • Never open a browser for CI. Everything is in gh; the Blacksmith UI shows nothing just ci-annotations does not.
  • Check the plan's ## Findings section before investigating a failure. This test is flaky here and has been re-diagnosed several times by different agents: testCanStreamGroupMessages.
  • Record the verdict in ## Findings when you finish, so the next agent does not repeat the work.
  • "Re-run failed jobs" tests the same old merge commit again. When the fix landed on the base branch after that commit, rebase the PR branch and push. Do not re-run.
  • Under gh stack, each PR's checks run on a merge commit that contains the trunk and every PR below it. github.base_ref is the trunk, and GITHUB_BASE_REF is empty inside a reusable workflow. A script that must compare a PR with its own base uses the merge commit's first parent (HEAD^1). Test it on refs/pull/<n>/merge before you push.

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.