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: fci3description: >-4 Fix CI pipeline failures blocking PR merge. Use when CI checks fail,5 'pipeline broken', 'build failing', 'fix CI', or 'checks not passing'.6 NOT for debugging runtime bugs (use /dbg), NOT for code review (use /sr).7argument-hint: [workflow-name or run-id]8allowed-tools: Bash, Read, Edit, Write, Grep, Glob9disable-model-invocation: true10metadata:11 source: https://skillmd.com/skills/alexandrbasis/fci12---1314# Fix CI Issues Command1516Briefly tell the user you are using the fci skill before starting work,17so they know which workflow is running.1819## PRIMARY OBJECTIVE20Fix all CI pipeline failures blocking the PR merge while maintaining code quality and test integrity.2122Resolve the task with `../setup/references/task-context.md` before inspecting or changing code. Reuse23the linked task or create the minimum record in the configured task root. Record the failing run,24actual commands/cwds selected from repo or CI configuration, fixes, observed validation, current25state, and next action there. Do not create a separate CI ledger.2627## SCOPE28- Supports the project CI pipeline as configured in the repository29- If `$ARGUMENTS` specifies a workflow outside the project scope, inform the user and suggest manual investigation3031## CONTEXT & CONSTRAINTS32- CI pipeline failed during merge attempt to main branch33- Must resolve all failures without compromising code quality34- Preserve existing test coverage and validation logic35- CI includes the lint, type, test, build, and project-specific checks declared by the selected36 workflow; resolve their actual commands and working directories before running them.37- Do not silence CI with `any`, `@ts-ignore`, `// eslint-disable`, or38 architectural shortcuts — the goal is a real fix, not a green checkmark.39 If a suppression is genuinely correct (e.g. a `.d.ts` shim), flag it40 explicitly so the reviewer can confirm.41- Follow project architecture rules (see coding-conventions skill)4243## RELATED SKILLS44- `/dbg` - Runtime bugs requiring instrumentation and evidence gathering45- `/sr` - Post-fix code review before re-attempting merge46- `/prc` - Addressing reviewer comments on the PR4748## ANALYSIS REQUIREMENTS491. **Identify CI Failures:**50 - Run `gh workflow list` if you are unsure of the workflow name.51 - Run `gh run list --limit=3` to check recent CI status.52 - Pick the most recent failing run and review its logs with53 `gh run view <run-id> --log`. Don't fetch logs for older runs unless54 the recent-run failures are ambiguous.55 - Categorize failures by type (linting, tests, types, build, other).56572. **Execute Diagnostic Checks (run in parallel):**58 - These commands are independent — batch them in one turn as parallel59 Bash tool calls, do not chain sequentially.60 - Ensure dependencies are installed first (sequential prerequisite).61 - Resolve the selected workflow's actual scripts and working directory before running checks.62 Then in parallel: the resolved lint, typecheck, test, and build commands.63 Do not run unresolved placeholders or assume every command belongs to the repository root.64 - Collect all failure logs before choosing where to start fixing —65 don't stop at the first red check.6667## RESOLUTION PROCESS6869Scope discipline: fix only what the failing CI checks require. Do not70refactor nearby code, rename symbols for consistency, tighten unrelated71types, or add defensive error handling that wasn't failing. If you spot72adjacent problems, note them in the handoff summary — don't fix them in73this PR.74751. **Formatting (only if lint reported style violations):**76 - Skip this step entirely if formatting is clean.77 - Otherwise run the formatter declared by the selected workflow, then re-run lint to confirm the78 formatter didn't introduce new issues.79802. **Address Type Errors:**81 - Resolve typing errors surfaced by lint/test/typecheck output82 - Add precise typings rather than suppressing warnings83843. **Resolve Test Failures:**85 - Fix failing tests by correcting the implementation bug the test is86 catching — the test is a spec, so weakening assertions to turn the87 check green hides the real defect.88 - Maintain or improve test coverage against the repository or CI-configured baseline. If a test is89 genuinely wrong (e.g. asserts outdated behavior), update it and90 explicitly flag the change in the handoff summary.91924. **Fix Linting Issues:**93 - Address linter violations94 - Update tests/fixtures when necessary rather than suppressing rules95965. **Security Issues:**97 - Address any dependency vulnerability findings that surface during investigation98996. **Build Issues:**100 - Ensure build succeeds101 - Fix any import or runtime errors102103## VERIFICATION REQUIREMENTS104Before completion, run the full CI-equivalent validation suite locally and confirm every resolved105command exits zero. Run each package command from its declared working directory:106```bash107# Run the resolved CI-equivalent validation commands from their declared working directories.108# The command names must be read from repo/CI configuration before execution.109```110111Optional additional checks (if relevant jobs are failing): run the repository's configured coverage112command only when it is relevant to the failing job; record the resolved command and result in the113task record. Never execute an unresolved placeholder.114115## TROUBLESHOOTING116- `gh` auth failure: Run `gh auth status`; prompt user to run `gh auth login` if needed117- Docker not running: Run `docker info`; inform user to start Docker Desktop118- DB connection refused: Verify test database is running; check port conflicts119- Language version mismatch: Check version files (`.nvmrc`, `.tool-versions`, etc.) and use appropriate version manager120121## DEFINITION OF DONE122- [ ] All CI checks pass (lint, typing, format, tests, build)123- [ ] Test coverage did not drop below the repository or CI-configured baseline (use the configured124 floor; do not invent a new percentage target).125- [ ] No test logic simplified or removed126- [ ] Security vulnerabilities resolved (if applicable)127- [ ] Build succeeds128- [ ] GitHub CI status shows green checkmark129- [ ] Ready for clean merge to main branch