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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" 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.5 | $0.00043 | $0.00443 |
| Sonnet 5.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 1mo 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.
- 1mo 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 (19 stars, last pushed 24d ago), licensed Apache-2.0. It adds 108 tokens to every session and 1,107 once invoked, about $0.0004 per session on Opus 5.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…
ap-depth-prober
Report the compatibility redirect to ap-worker; this retired role cannot perform new work.
semantic-drift-auditor
Modernization auditor designed to prevent business terminology decay and semantic drift. Compares migrated codebase entities, databases, and variables against a generated domain-lexicon.json mapped from specs/REQS.md. Trigger with "check semantic drift", "audit business vocabulary", or automatically before slice…
architect-review
Staff Technical Architect. Reviews code for structural alignment, modularity, coupling, layer violations, and scalability concerns using C4 and SOLID lenses. Fills the "Architecture Skeptic" role in the Graph Planning Phase 1 Fan-Out Trio (see engineering-lifecycle-policy.md §3 and red-team-review/SKILL.md).
reliability-engineer
Use on flagship work for the reliability review dimension — offline behaviour, retries, idempotency, sync conflict resolution, state restoration, and recovery from interruption. Conditional role. Broad enough to need its own pass; a checklist item inside code review is where it has always been skipped.
ciel-quality-guild
CIEL's elite quality and debugging guild. Specializes in refactoring, E2E testing, and API integrity.