Borrowing it
Nothing to install: this file belongs to swarm-ai-research/swarm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/swarm-ai-research/swarm/main/.claude/commands/fix_ci.mdgit clone --depth 1 https://github.com/swarm-ai-research/swarmWrote 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/commands/swarm-ai-research/swarm/fix_ci)<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/fix_ci"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/fix_ci/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/commands/swarm-ai-research/swarm/fix_ci"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/fix_ci.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.00000 | $0.01684 |
| Opus 5 | $0.00000 | $0.00842 |
| Sonnet 5 | $0.00000 | $0.00337 |
| Haiku 4.5 | $0.00000 | $0.00168 |
Grade A, and why
fix_ci 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 10d 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 — 186 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/fix-ci
Triage and fix failing GitHub Actions CI runs. Fetches remote failure logs, categorizes errors, reads the relevant source context, and applies fixes — all in one shot.
Usage
/fix-ci [run_id]
/fix-ci— find the latest failed CI run on the current branch and fix it/fix-ci 21852912800— triage a specific run by ID
Behavior
Step 1: Identify the failing run
If no run_id is provided, find the most recent failed run:
gh run list --branch "$(git branch --show-current)" --status failure --limit 1 --json databaseId,name,headBranch,conclusion,createdAt
If no failures found on the current branch, also check main:
gh run list --branch main --status failure --limit 1 --json databaseId,name,headBranch,conclusion,createdAt
If still no failures, report "No failed CI runs found" and exit.
Step 2: Fetch failed logs
gh run view <run_id> --log-failed
Step 3: Categorize failures
Parse the log output and classify into these categories (matching the CI workflow jobs):
| Category | Job name pattern | What to look for |
|---|---|---|
| lint | lint |
ruff check errors |
| type-check | type-check |
mypy errors — extract file:line: error: message [code] triples |
| test-fail | test |
FAILED test lines — extract file::test_name |
| coverage | test |
FAIL Required test coverage of N% not reached. Total coverage: M% |
Step 4: Triage report
Print a structured summary before fixing:
CI Triage — Run #<run_id> (<workflow_name>)
Branch: <branch>
────────────────────────────────────────
lint: PASS / FAIL (N errors)
type-check: PASS / FAIL (N errors in M files)
tests: PASS / FAIL (N failed, M passed)
coverage: PASS / FAIL (actual% < required%)
────────────────────────────────────────
For each failing category, list the specific errors:
type-check failures — group by file:
swarm/foo/bar.py
L45: error: Incompatible types ... [assignment]
L89: error: Missing return ... [return]
swarm/baz/qux.py
L12: error: ... [arg-type]
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.
- 10d ago First seen · 186 lines · 0 tokens per session scan A 8e4a59883b03
fix_ci is a command published in the GitHub repository swarm-ai-research/swarm (42 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,684 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.
Other commands, from other repositories
metrics
Apply the CLI runtime and safety contract before executing a command. Runtime --help is authoritative.
traces
Apply the CLI runtime and safety contract before executing a command. Runtime --help is authoritative.
add-debug-wait
Add a wait step to a CI workflow for debugging test failures.
drift-alert-issue
Detection Date: $DETECTIONDATE Workflow Run: $SERVERURL/$REPOSITORY/actions/runs/$RUNID.
fix-develop
Autonomous fix loop for failing CI on the repo's default branch.
resolve_pr_ci_failures
Triage and remediate PR CI failures; capture evidence and write an artifact.