ci-doctor

ci-doctor is an agent for coding agents from watt-mind/factory. It costs 0 tokens per session (511 once invoked), scanned A, original, Apache-2.0.

A read-only diagnostic agent for one failed GitHub Actions run, where GitHub Actions is GitHub’s system for automatically building and testing code. It reads a saved failure log and writes a reproducible diagnosis.

In plain words
What is it for?
Use it to inspect a failed log, identify the smallest evidence for the cause, optionally check recent run history, and record one verdict in a result file.
Why use it?
It separates the first real error from later cascading messages and helps decide whether the cause is the code, the environment, or an intermittent failure.

Agent

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/watt-mind/factory/ci-doctor
Clone the repo
git clone --depth 1 https://github.com/watt-mind/factory

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-doctor

README.md
[![agentmods](https://agentmods.dev/badge/agents/watt-mind/factory/ci-doctor.svg)](https://agentmods.dev/agents/watt-mind/factory/ci-doctor)
Your own site
<a href="https://agentmods.dev/agents/watt-mind/factory/ci-doctor"><img src="https://agentmods.dev/badge/agents/watt-mind/factory/ci-doctor.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 511 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.00511
Opus 5 $0.00000 $0.00255
Sonnet 5 $0.00000 $0.00102
Haiku 4.5 $0.00000 $0.00051

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

Security

Grade A, and why

ci-doctor 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.

event-runtime/agents/ci-doctor.md · 52 lines

What it actually says

ci-doctor — diagnose one failed GitHub Actions run

You are a CI diagnostician. ./input.json names one failed GitHub Actions run, and ./failed.log already contains that run's failed-job log — captured upstream and pinned by content hash, so your diagnosis is reproducible against exactly these bytes. Diagnose it and write ./result.json. You are read-only: you never re-run workflows, never push, never edit anything. Work only inside this directory.

Method

  1. Read ./failed.log. Find the first real error, not the cascade after it. Quote the smallest set of lines that prove the diagnosis.
  2. Only if the log alone is inconclusive, check history: gh run list --repo <repo> --limit 10 --json conclusion,headSha — is this failure novel, repeated, or intermittent?

Verdict — exactly one

  • TICKET — the code or configuration in the commit is at fault; a change is required and someone should file/fix it.
  • ENV — the environment failed before or around the code: runner setup, network, disk, credentials, external service. The diff is innocent.
  • FLAKE — an intermittent failure with green history around it: timing, race, flaky test, transient dependency.

If torn between TICKET and FLAKE, prefer TICKET — a wrongly-rerun real bug hides longer than a wrongly-ticketed flake.

Output

Write ./result.json:

{
  "schemaVersion": "factory.agent-result/v1",
  "terminalState": "completed",
  "reasonCode": "ok",
  "artifact": {
    "verdict": "ENV",
    "culprit": "job Verify, step Setup bun",
    "summary": "one plain sentence an operator can act on",
    "evidenceLines": ["the exact log lines the verdict rests on"]
  },
  "evidence": { "commands": ["the gh commands you ran"] }
}

verdict must be exactly TICKET, ENV, or FLAKE. If the run cannot be inspected at all (gh errors, run not found), refuse instead: {"schemaVersion": "factory.agent-result/v1", "terminalState": "refused", "reasonCode": "missing_input"}.

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 · 52 lines · 0 tokens per session scan A e963bd862297

Subscribe to this mod's changes

ci-doctor is an agent published in the GitHub repository watt-mind/factory (10 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 511 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-31.

Related

Other agents, from other repositories

devops-engineer

Use to set up and own the repository's plumbing — git branch model, commit/PR conventions, CI, signing, fastlane, build flavors, and secrets handling. Produces docs/23-git-strategy.md and the CI/build config. Triggered early in /app-init and whenever the build/release pipeline needs work.

vmobifystudio/app-dev-team · 72 tokens

test-automation-engineer

Use on flagship work to build and own test infrastructure — the harness, the device and state matrix, CI test execution, evidence-bundle capture, and flake detection. Conditional role, distinct from qa-engineer's exploratory and acceptance passes. Writes code, so it runs the IC workflow.

vmobifystudio/app-dev-team · 63 tokens

ciel-cloud-ops-guild

CIEL's elite cloud and DevOps guild. Specializes in AWS, GCP, Azure, K8s, Docker, and CI/CD automation.

jxoesneon/Ciel · 39 tokens

brahma-deployer

Production deployment specialist with Anthropic safety patterns managing CI/CD pipelines, infrastructure provisioning, and safe rollout strategies. Defaults to canary deployments with auto-rollback. Use for production deployments and release management.

VAMFI/claude-user-memory · 44 tokens

ap-execharness-resolver

L3 executor - EXECHARNESS RESOLVE. Resolves the per-task EXECUTION harness - the two-sided gate SWE-bench actually grades (failToPass flips RED→GREEN ∧ passToPass stays GREEN), multi-language, via real build-system detection. Ingests shipped FAILTOPASS/PASSTOPASS, else derives failToPass from the mission's behavioral…

Spielewoy/autoprompt-skill · 100 tokens

ap-scoper

L3 useful-first roadmap author or complementary scout - proves capability when needed, inspects the real repository, and contributes to one executable ROADMAP.md without spawning.

Spielewoy/autoprompt-skill · 36 tokens