If .claude/skills/fci/SKILL.md.disabled exists, stop before reading a fallback.
Project configuration: If the current project contains .claude/skills/fci/SKILL.md, read and apply it instead of this bundled default. The project copy is the capability source of truth.
Repository context: Read ../setup/references/task-context.md when resolving a task, project commands, named agent roles, or legacy .claude/ resource paths. Use repository evidence and applicable project instructions; a missing local workflow copy does not require setup. Resolve bundled resources from the installed skill, never from the target cwd.
Invocation guard: use this as a standalone skill only when explicitly requested by the user; automatic selection is not authorization. Portable clients may not enforce Claude Code host-level invocation restrictions.
Fix CI Issues Command
Briefly tell the user you are using the fci skill before starting work,
so they know which workflow is running.
PRIMARY OBJECTIVE
Fix all CI pipeline failures blocking the PR merge while maintaining code quality and test integrity.
Resolve the task with ../setup/references/task-context.md before inspecting or changing code. Reuse
the linked task or create the minimum record in the configured task root. Record the failing run,
actual commands/cwds selected from repo or CI configuration, fixes, observed validation, current
state, and next action there. Do not create a separate CI ledger.
SCOPE
- Supports the project CI pipeline as configured in the repository
- If
$ARGUMENTS specifies a workflow outside the project scope, inform the user and suggest manual investigation
CONTEXT & CONSTRAINTS
- CI pipeline failed during merge attempt to main branch
- Must resolve all failures without compromising code quality
- Preserve existing test coverage and validation logic
- CI includes the lint, type, test, build, and project-specific checks declared by the selected
workflow; resolve their actual commands and working directories before running them.
- Do not silence CI with
any, @ts-ignore, // eslint-disable, or
architectural shortcuts — the goal is a real fix, not a green checkmark.
If a suppression is genuinely correct (e.g. a .d.ts shim), flag it
explicitly so the reviewer can confirm.
- Follow project architecture rules (see coding-conventions skill)
RELATED SKILLS
/dbg - Runtime bugs requiring instrumentation and evidence gathering
/sr - Post-fix code review before re-attempting merge
/prc - Addressing reviewer comments on the PR
ANALYSIS REQUIREMENTS
Identify CI Failures:
- Run
gh workflow list if you are unsure of the workflow name.
- Run
gh run list --limit=3 to check recent CI status.
- Pick the most recent failing run and review its logs with
gh run view <run-id> --log. Don't fetch logs for older runs unless
the recent-run failures are ambiguous.
- Categorize failures by type (linting, tests, types, build, other).
Execute Diagnostic Checks (run in parallel):
- These commands are independent — batch them in one turn as parallel
Bash tool calls, do not chain sequentially.
- Ensure dependencies are installed first (sequential prerequisite).
- Resolve the selected workflow's actual scripts and working directory before running checks.
Then in parallel: the resolved lint, typecheck, test, and build commands.
Do not run unresolved placeholders or assume every command belongs to the repository root.
- Collect all failure logs before choosing where to start fixing —
don't stop at the first red check.
RESOLUTION PROCESS
Scope discipline: fix only what the failing CI checks require. Do not
refactor nearby code, rename symbols for consistency, tighten unrelated
types, or add defensive error handling that wasn't failing. If you spot
adjacent problems, note them in the handoff summary — don't fix them in
this PR.
Formatting (only if lint reported style violations):
- Skip this step entirely if formatting is clean.
- Otherwise run the formatter declared by the selected workflow, then re-run lint to confirm the
formatter didn't introduce new issues.
Address Type Errors:
- Resolve typing errors surfaced by lint/test/typecheck output
- Add precise typings rather than suppressing warnings
Resolve Test Failures:
- Fix failing tests by correcting the implementation bug the test is
catching — the test is a spec, so weakening assertions to turn the
check green hides the real defect.
- Maintain or improve test coverage against the repository or CI-configured baseline. If a test is
genuinely wrong (e.g. asserts outdated behavior), update it and
explicitly flag the change in the handoff summary.
Fix Linting Issues:
- Address linter violations
- Update tests/fixtures when necessary rather than suppressing rules
Security Issues:
- Address any dependency vulnerability findings that surface during investigation
Build Issues:
- Ensure build succeeds
- Fix any import or runtime errors
VERIFICATION REQUIREMENTS
Before completion, run the full CI-equivalent validation suite locally and confirm every resolved
command exits zero. Run each package command from its declared working directory:
# Run the resolved CI-equivalent validation commands from their declared working directories.
# The command names must be read from repo/CI configuration before execution.
Optional additional checks (if relevant jobs are failing): run the repository's configured coverage
command only when it is relevant to the failing job; record the resolved command and result in the
task record. Never execute an unresolved placeholder.
TROUBLESHOOTING
gh auth failure: Run gh auth status; prompt user to run gh auth login if needed
- Docker not running: Run
docker info; inform user to start Docker Desktop
- DB connection refused: Verify test database is running; check port conflicts
- Language version mismatch: Check version files (
.nvmrc, .tool-versions, etc.) and use appropriate version manager
DEFINITION OF DONE
1---2name: fci-33description: Fix CI pipeline failures blocking PR merge. Use when CI checks fail, 'pipeline broken', 'build failing', 'fix CI', or 'checks not passing'. NOT for debugging runtime bugs (use /dbg), NOT for code review (use /sr).4---56<!-- claudops-build: project-config-pointer -->7> If `.claude/skills/fci/SKILL.md.disabled` exists, stop before reading a fallback.8> **Project configuration:** If the current project contains `.claude/skills/fci/SKILL.md`, read and apply it instead of this bundled default. The project copy is the capability source of truth.9> **Repository context:** Read `../setup/references/task-context.md` when resolving a task, project commands, named agent roles, or legacy `.claude/` resource paths. Use repository evidence and applicable project instructions; a missing local workflow copy does not require setup. Resolve bundled resources from the installed skill, never from the target cwd.10> **Invocation guard:** use this as a standalone skill only when explicitly requested by the user; automatic selection is not authorization. Portable clients may not enforce Claude Code host-level invocation restrictions.1112# Fix CI Issues Command1314Briefly tell the user you are using the fci skill before starting work,15so they know which workflow is running.1617## PRIMARY OBJECTIVE18Fix all CI pipeline failures blocking the PR merge while maintaining code quality and test integrity.1920Resolve the task with `../setup/references/task-context.md` before inspecting or changing code. Reuse21the linked task or create the minimum record in the configured task root. Record the failing run,22actual commands/cwds selected from repo or CI configuration, fixes, observed validation, current23state, and next action there. Do not create a separate CI ledger.2425## SCOPE26- Supports the project CI pipeline as configured in the repository27- If `$ARGUMENTS` specifies a workflow outside the project scope, inform the user and suggest manual investigation2829## CONTEXT & CONSTRAINTS30- CI pipeline failed during merge attempt to main branch31- Must resolve all failures without compromising code quality32- Preserve existing test coverage and validation logic33- CI includes the lint, type, test, build, and project-specific checks declared by the selected34 workflow; resolve their actual commands and working directories before running them.35- Do not silence CI with `any`, `@ts-ignore`, `// eslint-disable`, or36 architectural shortcuts — the goal is a real fix, not a green checkmark.37 If a suppression is genuinely correct (e.g. a `.d.ts` shim), flag it38 explicitly so the reviewer can confirm.39- Follow project architecture rules (see coding-conventions skill)4041## RELATED SKILLS42- `/dbg` - Runtime bugs requiring instrumentation and evidence gathering43- `/sr` - Post-fix code review before re-attempting merge44- `/prc` - Addressing reviewer comments on the PR4546## ANALYSIS REQUIREMENTS471. **Identify CI Failures:**48 - Run `gh workflow list` if you are unsure of the workflow name.49 - Run `gh run list --limit=3` to check recent CI status.50 - Pick the most recent failing run and review its logs with51 `gh run view <run-id> --log`. Don't fetch logs for older runs unless52 the recent-run failures are ambiguous.53 - Categorize failures by type (linting, tests, types, build, other).54552. **Execute Diagnostic Checks (run in parallel):**56 - These commands are independent — batch them in one turn as parallel57 Bash tool calls, do not chain sequentially.58 - Ensure dependencies are installed first (sequential prerequisite).59 - Resolve the selected workflow's actual scripts and working directory before running checks.60 Then in parallel: the resolved lint, typecheck, test, and build commands.61 Do not run unresolved placeholders or assume every command belongs to the repository root.62 - Collect all failure logs before choosing where to start fixing —63 don't stop at the first red check.6465## RESOLUTION PROCESS6667Scope discipline: fix only what the failing CI checks require. Do not68refactor nearby code, rename symbols for consistency, tighten unrelated69types, or add defensive error handling that wasn't failing. If you spot70adjacent problems, note them in the handoff summary — don't fix them in71this PR.72731. **Formatting (only if lint reported style violations):**74 - Skip this step entirely if formatting is clean.75 - Otherwise run the formatter declared by the selected workflow, then re-run lint to confirm the76 formatter didn't introduce new issues.77782. **Address Type Errors:**79 - Resolve typing errors surfaced by lint/test/typecheck output80 - Add precise typings rather than suppressing warnings81823. **Resolve Test Failures:**83 - Fix failing tests by correcting the implementation bug the test is84 catching — the test is a spec, so weakening assertions to turn the85 check green hides the real defect.86 - Maintain or improve test coverage against the repository or CI-configured baseline. If a test is87 genuinely wrong (e.g. asserts outdated behavior), update it and88 explicitly flag the change in the handoff summary.89904. **Fix Linting Issues:**91 - Address linter violations92 - Update tests/fixtures when necessary rather than suppressing rules93945. **Security Issues:**95 - Address any dependency vulnerability findings that surface during investigation96976. **Build Issues:**98 - Ensure build succeeds99 - Fix any import or runtime errors100101## VERIFICATION REQUIREMENTS102Before completion, run the full CI-equivalent validation suite locally and confirm every resolved103command exits zero. Run each package command from its declared working directory:104```bash105# Run the resolved CI-equivalent validation commands from their declared working directories.106# The command names must be read from repo/CI configuration before execution.107```108109Optional additional checks (if relevant jobs are failing): run the repository's configured coverage110command only when it is relevant to the failing job; record the resolved command and result in the111task record. Never execute an unresolved placeholder.112113## TROUBLESHOOTING114- `gh` auth failure: Run `gh auth status`; prompt user to run `gh auth login` if needed115- Docker not running: Run `docker info`; inform user to start Docker Desktop116- DB connection refused: Verify test database is running; check port conflicts117- Language version mismatch: Check version files (`.nvmrc`, `.tool-versions`, etc.) and use appropriate version manager118119## DEFINITION OF DONE120- [ ] All CI checks pass (lint, typing, format, tests, build)121- [ ] Test coverage did not drop below the repository or CI-configured baseline (use the configured122 floor; do not invent a new percentage target).123- [ ] No test logic simplified or removed124- [ ] Security vulnerabilities resolved (if applicable)125- [ ] Build succeeds126- [ ] GitHub CI status shows green checkmark127- [ ] Ready for clean merge to main branch