ci-loop

An automated loop that pushes code to GitHub, waits for continuous integration (automated build and test checks), reads any failures, and tries fixes. It repeats this process until the checks pass or the limit is reached.

In plain words
What is it for?
Use it after making changes when you want to run CI, inspect failed logs, and iterate on lint, TypeScript, and build problems.
Why use it?
It removes the need to watch CI results and manually copy errors into the coding session. It can automatically address lint and type errors, while test fixes require confirmation.

Command for Claude Code

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.

agentmods
npx agentmods add commands/llcoolblaze/claude-boris/ci-loop
Clone the repo
git clone --depth 1 https://github.com/llcoolblaze/claude-boris

Made for: Claude Code.

Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,060 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00024 $0.01060
Opus 5 $0.00012 $0.00530
Sonnet 5 $0.00005 $0.00212
Haiku 4.5 $0.00002 $0.00106

Measured 3d ago against content hash 24e5358137cb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ci-loop scanned grade A with 0 findings 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/ci-loop.md · 202 lines

How it starts

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

CI Loop

Pre-flight Check

!git status --short !git branch --show-current !gh run list --limit 3 2>/dev/null || echo "gh CLI not configured"


CI Loop Protocol

Configuration

  • Max Iterations: 5
  • Poll Interval: 30 seconds
  • Auto-fix: Lint, Types (Tests require confirmation)

1. Initial Push

BRANCH=$(git branch --show-current)
echo "🚀 Pushing to $BRANCH..."
git push origin "$BRANCH"

2. Wait for CI

echo "⏳ Waiting for CI..."

# Get latest run
RUN_ID=$(gh run list --branch "$BRANCH" --limit 1 --json databaseId -q '.[0].databaseId')

# Watch and wait
gh run watch "$RUN_ID" --exit-status

3. Parse Results

If CI fails:

# Get failure logs
gh run view "$RUN_ID" --log-failed > /tmp/ci-failure.log

# Parse for actionable errors
echo "=== TypeScript Errors ==="
grep -E "error TS[0-9]+:" /tmp/ci-failure.log | head -10

echo "=== Test Failures ==="
grep -A 3 "FAIL\|✕" /tmp/ci-failure.log | head -20

echo "=== Lint Errors ==="
grep -E "error\s+" /tmp/ci-failure.log | head -10

echo "=== Build Errors ==="
grep -E "Error:|BUILD FAILED" /tmp/ci-failure.log | head -10

4. Auto-Fix Attempt

Lint Errors (auto-fixable):

npm run lint:fix

Type Errors (analyze and fix):

  • Parse error location
  • Determine fix
  • Apply carefully

Test Failures (requires analysis):

  • Understand what failed
  • Determine if test or code issue
  • Fix accordingly

Build Errors (investigate):

  • Usually dependency or config
  • May need manual intervention

5. Commit Fixes

git add -A
git commit -m "fix: address CI failures

Auto-fixes applied:
- [List what was fixed]

🤖 CI Loop iteration $ITERATION"

6. Iterate

Repeat steps 1-5 until:

  • ✅ All checks pass, or
  • ⚠️ Max iterations reached, or
  • ❌ Non-auto-fixable issue found

Iteration Tracking

Iteration Status Fixes Applied
1 [Pass/Fail] [What was fixed]
2 [Pass/Fail] [What was fixed]
... ... ...

Read the full file on GitHub · 202 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. 3d ago First seen · 202 lines · 24 tokens per session scan A 24e5358137cb

Subscribe to this mod's changes

ci-loop is a command published in the GitHub repository llcoolblaze/claude-boris (48 stars, last pushed 7mo ago), licensed MIT. It adds 24 tokens to every session and 1,060 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.