name: ci-fix-monitor
description: Codex adapter for monitoring and fixing CI failures on opencode-swarm PRs. Use when diagnosing failed checks, fixing package-check (npm tarball) failures, resolving quality/lint/format errors, fixing macOS cross-platform file I/O failures, or watching a PR until all checks are green.
CI Fix Monitor
Read .opencode/skills/generated/ci-fix-monitor/SKILL.md for the full protocol.
Also load:
.agents/skills/commit-pr/SKILL.mdbefore committing or pushing any fix.agents/skills/engineering-conventions/SKILL.mdif the fix touches source files.agents/skills/running-tests/SKILL.mdbefore running any test suite as part of a fix
Codex-specific execution notes:
- MCP tool names (
mcp__github__*) are injected by the runtime harness and may differ across environments. Verify availability viaToolSearchbefore first use in a session. - No
ghCLI available. Usemcp__github__pull_request_read(methodget_check_runs) to list check status andmcp__github__get_job_logs(withreturn_content: true) to fetch failure logs. - For
package-checkfailures:package-checkvalidates the npm tarball (npm pack+ tarball contents). A failure is a source/build/package-manifest problem, not generated-file drift.dist/is generated and NOT committed — do not stage it; runbun run buildlocally only when you need the bundle to verify (e.g.node --input-type=module -e "await import('./dist/index.js'); console.log('dist import OK')"). There is no longer a committed-dist drift check. - For a branch behind main (version-drift):
git fetch origin main && git rebase origin/main(abort withgit rebase --abortif conflicts occur and escalate to user), thengit push --force-with-lease origin <branch>. Force-push is required and expected after rebase. - For format violations:
bunx biome format --write <specific-file>— do NOT runbiome format --write .on the whole repo. - After any source fix, run the focused test file (
bun test <file>) before committing. - Do not declare victory until ALL required checks show green;
skippedis acceptable only if the same check was skipped on the base branch.