fix-ci
Find and fix why a CI run failed on a pull request or on master - lint, types, tests, codegen drift, the PR title, images, charts. Use when checks are red, a workflow run failed, or the user pastes a
SKILL.md.claude/skills/fix-ci/SKILL.md
GitHubFix CI
The ci-triager agent finds the cause without changing anything; start with it when
the failure isn't obvious.
Find the failure.
gh pr checks <number>, orgh run list --branch <branch> --limit 5. Thengh run view <id>for the failing jobs andgh run view <id> --log-failedfor their output. Read from the top of the failing step: the first real error, not the cascade after it.Reproduce it locally with the command the job runs (
.github/workflows/ci.yml):Job Locally Lint and boundaries bun run lintType-check bun run check-typesUnit tests bun run test,bun test ./scripts/ ./.claude/hooks/Components bun run --cwd packages/ui test:stories(test:visualneeds Docker)Integration tests bun run test:integration, thenbun run test:coverageEnd-to-end tests bun run test:e2e(stopbun devfirst)Python service bun run --filter @repo/ai lint,check-types,test,coverageGenerated code is committed bun run gen, thengit status: commit what changedAPI compatibility a removed or narrowed field in apps/api/openapi.json: make it additive, or mark the title!Pull request title Conventional Commits with a scope from commitlint.config.ts:printf '%s\n' "<title>" | bunx commitlintchecks it locallyMigration safety bun run db:lintHelm charts and GitOps bun run charts:checkOpenTofu bun run infra:checkContainer images docker buildx bake <image>; a Trivy finding needs the fixed version, or a reviewed entry in.trivyignore.yamlwith a reason and expiryCode generators bun scripts/generators.tsLong ones (
test:integration,test:coverage,test:e2e, the generators) run in the background.Passes locally, fails in CI? CI runs with
.env.example's values and its own services; a test that depends on your.env, on timing, or on test order is the usual cause. Check whethermasterfails the same way (gh run list --branch master --workflow ci.yml --limit 3): then it isn't this change.Fix the cause (CLAUDE.md principle 1). Never skip or loosen the check, retry until green, or add a suppression. A flaky test is a bug: fix the race or the wait.
Push only with the user's approval; CI runs again on the new commit.
Done when
The command that failed passes locally, and the next CI run on the pull request is
green (gh pr checks <number>).