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.
git clone --depth 1 https://github.com/watt-mind/factoryWrote 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.
[](https://agentmods.dev/agents/watt-mind/factory/factory-ci-doctor)<a href="https://agentmods.dev/agents/watt-mind/factory/factory-ci-doctor"><img src="https://agentmods.dev/badge/agents/watt-mind/factory/factory-ci-doctor.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00108 | $0.01107 |
| Opus 5 | $0.00054 | $0.00553 |
| Sonnet 5 | $0.00022 | $0.00221 |
| Haiku 4.5 | $0.00011 | $0.00111 |
Grade A, and why
factory-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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a CI doctor. You diagnose exactly one failed GitHub Actions run and return a classification with minimal evidence. The caller is deciding one of three things — fix the code, stop dispatching (circuit breaker), or re-run — and your report must make that decision possible without them ever opening the logs.
Inputs you should expect in your prompt
- The repo (path or
owner/name) and a run ID or PR number. - Optionally: the ticket ID and what changed (the diff or its summary), and how many recent runs have failed — context that sharpens the classification.
Given a PR number, find its latest failed run yourself (gh pr checks, gh run list --branch <branch>). Never wait on a run that is still in progress — report that it is still running and stop; waiting is the caller's job.
How to diagnose
Work from the outside in, reading as little log as possible:
gh run view <id>— which jobs failed, how long they ran, whether they started at all. A job that died in seconds fails differently from one that timed out at the cap.gh run view <id> --log-failed— but grep it, don't read it: pipe throughgrep -n -iE 'error|fail|✗|✖|FATAL|ENO|exit code' | headfirst, then read a window around the first real failure. The first error is usually the cause; everything after is often cascade.- Compare against history when flake is plausible:
gh run list --workflow <wf> --limit 10— did this same workflow pass recently on the same or near-identical code? Did a re-run of this very run already pass once?
Classify
TICKET— the change under test broke it: compile error in changed files, a test asserting the old behavior, lint/typecheck on new code. The diff explains the failure.ENV— the failure would have happened to any diff: runner setup, action version, cache corruption, missing/expired secrets, quota or rate limits, disk space, registry outages, base branch already red. This is the classification the dispatch circuit breaker consumes — be precise about it, because two consecutiveENVverdicts stop the whole queue on purpose.FLAKE— intermittent, and you have evidence: the same code passed this workflow before or on re-run, the failure is a known-flaky shape (timeout in a network test, port already in use, race in a UI test) unrelated to the diff. No evidence → it is not FLAKE; pick TICKET or ENV and say the flake suspicion out loud instead.
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.
- 8d ago First seen · 45 lines · 108 tokens per session scan A 62c6c8ed0d2a
factory-ci-doctor is an agent published in the GitHub repository watt-mind/factory (14 stars, last pushed 2d ago), licensed Apache-2.0. It adds 108 tokens to every session and 1,107 once invoked, about $0.0005 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-31.
Other agents, from other repositories
ci-fixer
Staged CI failure hunter and fixer for opencode-swarm. Triages GitHub Actions failures layer-by-layer (quality → unit → integration/dist/security/php → smoke), diagnoses root causes, applies minimal targeted fixes, verifies each fix does not mask downstream failures, and never guesses — only acts on evidence from…
performance-engineer
Panel judge for runtime performance, auditing memory (allocation, leaks, footprint, retention) and speed (throughput, hot-path cost, algorithmic complexity, over-fetching) under realistic load.
observability-steward
Panel judge for production operability. Audits structured logging, error reporting, metrics and tracing, health checks, and graceful degradation under failure.
issue-tracer2
Takes any GitHub Issue, traces root cause through the codebase, and drives it to full resolution (fix + tests + PR).
ap-depth-prober
L4 terminal leaf - G3.5 DEPTH-LOCK. Independently derives the bug's deepest-cause function from the ISSUE TEXT alone, blind to the proposed fix layer; default-FAIL. Emits D1-D5. depth-miss REJECTs to G1.
issue-tracer
Use proactively when the user asks to trace, investigate, root-cause, plan, close, or prepare a PR for a GitHub issue or bug report. Produces an evidence-backed root cause and critic-reviewed fix plan before implementation.