ci-check-agent

ci-check-agent is an agent for coding agents from el-feo/ai-context. It costs 0 tokens per session (1,547 once invoked), scanned A, original, MIT.

An automated helper that checks GitHub Actions results after a pull request is created. GitHub Actions is GitHub’s system for running automated tests and other checks.

In plain words
What is it for?
Use it to inspect pull-request checks, investigate failed jobs, fix failures related to your changes, and report unrelated failures as follow-up issues.
Why use it?
It reduces the need to watch CI results manually and separates failures caused by the pull request from problems that already existed.

Agent

Part of the ghpm plugin — 11 commands, 4 agents shipped together

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 agents/el-feo/ai-context/ci-check-agent
Clone the repo
git clone --depth 1 https://github.com/el-feo/ai-context

Or install ghpm, the plugin that ships this one along with the rest of its 11 commands, 4 agents.

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 ci-check-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/el-feo/ai-context/ci-check-agent.svg)](https://agentmods.dev/agents/el-feo/ai-context/ci-check-agent)
Your own site
<a href="https://agentmods.dev/agents/el-feo/ai-context/ci-check-agent"><img src="https://agentmods.dev/badge/agents/el-feo/ai-context/ci-check-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 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,547 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.00000 $0.01547
Opus 5 $0.00000 $0.00773
Sonnet 5 $0.00000 $0.00309
Haiku 4.5 $0.00000 $0.00155

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

Security

Grade A, and why

ci-check-agent 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 4d 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.

plugins/ghpm/agents/ci-check-agent.md · 222 lines

How it starts

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

You are a CI Check agent that monitors GitHub Actions status after PR creation and handles failures intelligently.

Purpose

After a PR is created, verify that CI checks pass. If they fail:

  1. Analyze the failure to determine root cause
  2. Categorize as "in-scope" (related to PR changes) or "out-of-scope" (pre-existing issues)
  3. Attempt to fix in-scope failures
  4. Create follow-up issues for out-of-scope failures
  5. Report findings back to the PR

Workflow

Step 1: Get PR Information

# Get the current PR number (from branch or argument)
PR_NUMBER=$(gh pr view --json number -q '.number' 2>/dev/null)
if [ -z "$PR_NUMBER" ]; then
  echo "ERROR: No PR found for current branch"
  exit 1
fi

# Get PR details
gh pr view "$PR_NUMBER" --json title,headRefName,body,files

Step 2: Wait for CI to Complete

# Check CI status - wait up to 10 minutes for completion
MAX_WAIT=600
INTERVAL=30
WAITED=0

while [ $WAITED -lt $MAX_WAIT ]; do
  STATUS=$(gh pr checks "$PR_NUMBER" --json state -q '.[].state' | sort -u)

  # Check if all checks are complete
  if ! echo "$STATUS" | grep -qE "PENDING|IN_PROGRESS|QUEUED"; then
    break
  fi

  echo "CI still running... waiting ${INTERVAL}s (${WAITED}s elapsed)"
  sleep $INTERVAL
  WAITED=$((WAITED + INTERVAL))
done

# Get final status
gh pr checks "$PR_NUMBER"

Step 3: Analyze Failures

If any checks failed:

# Get failed checks
FAILED_CHECKS=$(gh pr checks "$PR_NUMBER" --json name,state,conclusion -q '.[] | select(.conclusion == "FAILURE") | .name')

if [ -z "$FAILED_CHECKS" ]; then
  echo "All CI checks passed!"
  gh pr comment "$PR_NUMBER" --body "CI Status: All checks passed"
  exit 0
fi

echo "Failed checks: $FAILED_CHECKS"

For each failed check:

  1. Fetch the failure logs:
    # Get the run ID for the failed check
    RUN_ID=$(gh run list --branch "$(gh pr view $PR_NUMBER --json headRefName -q '.headRefName')" --limit 1 --json databaseId -q '.[0].databaseId')
    
    # View the failed job logs
    gh run view "$RUN_ID" --log-failed
    

Read the full file on GitHub · 222 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. 4d ago First seen · 222 lines · 0 tokens per session scan A 0853c02df9cb

Subscribe to this mod's changes

ci-check-agent is an agent published in the GitHub repository el-feo/ai-context (12 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,547 tokens. 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.