← Browse

@asymmetric-al/loop-on-ci

B

Monitor PR checks and fix failures until green. Uses gh pr checks as the source of truth for PR-attached checks.

skillclaude

Install

agr install @asymmetric-al/loop-on-ci --target claude

Writes 1 file into .claude/skills/, pinned to git-66b85dbd.

  • .claude/skills/loop-on-ci/SKILL.md

Document


name: loop-on-ci description: Monitor PR checks and fix failures until green. Uses gh pr checks as the source of truth for PR-attached checks.

Loop on CI

Trigger

Need to watch a branch or pull request and iterate on CI failures until all required checks are green.

Use gh pr checks as the source of truth. It includes all PR-attached checks, while gh run list only covers GitHub Actions.

Workflow

  1. Resolve the PR for the current branch.
  2. Inspect current PR checks before waiting.
  3. If checks already failed, diagnose those failures first.
  4. If checks are pending, watch with gh pr checks --watch --fail-fast.
  5. After each push, re-check the full PR check set and repeat until green.

Commands

# Resolve the active PR
gh pr view --json number,url,headRefName

# Inspect all attached checks
gh pr checks --json name,bucket,state,workflow,link

# Watch pending checks and fail fast
gh pr checks --watch --fail-fast

# GitHub Actions logs, when the failing check links to a GHA run
gh run view <run-id> --log-failed

Guardrails

  • Keep each fix scoped to a single failure cause when possible.
  • Do not bypass hooks (--no-verify) to force progress.
  • If the failure is clearly unrelated to the PR and appears fixed on main, merge latest main instead of bloating the PR with unrelated fixes.
  • If failures are flaky, retry once and report flake evidence.
  • Re-run gh pr checks --json name,bucket,state,workflow,link after every push; the check set can change.

Output

  • Current CI status
  • Failure summary and fixes applied
  • PR URL once checks are green

Trustgrade B

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • warnLicensecopyleft/unknown — index-and-link only

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-66b85dbd2bc32026-07-31