Auto mode (no confirmations):
/ci-fixer --auto
With max attempts limit:
/ci-fixer --max-attempts=3
The skill will:
- Detect your current branch's CI run
- Watch for failures
- Fix errors locally (tests, lint, build)
- Commit and push
- Loop until green ✅
CRITICAL: Zero tolerance for hacks - fixes must be proper, no @ts-ignore, eslint-disable, or test skipping.
| Variable |
Type |
Description |
{auto_mode} |
boolean |
Skip confirmations |
{max_attempts} |
integer |
Max fix attempts (default: 5) |
{current_attempt} |
integer |
Current attempt number |
{run_id} |
string |
Current GitHub Actions run ID |
{branch} |
string |
Current git branch |
{last_commit_sha} |
string |
SHA of commit being watched |
{artifacts_dir} |
string |
Path to artifacts: .claude/data/ci-{run_id}/ |
{error_source} |
string |
Source of error (github-actions, vercel, netlify) |
{error_logs} |
string |
Captured error logs |
{fixes_applied} |
list |
List of fixes applied this session |
{local_verified} |
boolean |
Whether local tests/lint passed |
|
|
|
If you can't fix it properly, ASK FOR HELP. Never bypass or hack.
- NEVER skip tests - All tests must pass locally before committing
- NEVER hack around issues - Fix the root cause, don't disable checks
- NEVER use bypass flags - No
--no-verify, --skip, @ts-ignore, eslint-disable
- NEVER disable rules - Don't add to
.eslintignore, don't lower strictness
- Verify locally first - Always run tests/lint locally before pushing
- Minimal changes - Only fix what's broken, don't refactor unrelated code
- Clear commits - Each fix should have a descriptive commit message
- Clean up - Delete artifacts when workflow completes
Forbidden hacks include: @ts-ignore, eslint-disable, .skip, as any, --no-verify, --legacy-peer-deps, commenting out tests, changing assertions to match wrong output, adding files to ignore lists.
1---2name: ci-fixer3description: Automated CI/CD pipeline fixer - watches CI, fixes errors locally, commits, and loops until green. Use when CI is failing and you want to automatically fix and verify changes.4---56<objective>7Autonomously fix CI/CD pipeline failures by:81. Watching CI runs in real-time92. Analyzing failures (GitHub Actions, Vercel, Netlify, etc.)103. Fixing errors and verifying locally (tests, linter - NO skipping, NO hacks)114. Committing fixes and looping until pipeline is green125. Cleaning up artifacts when done13</objective>1415<quick_start>16**Basic usage (watch and fix CI):**17```bash18/ci-fixer19```2021**Auto mode (no confirmations):**22```bash23/ci-fixer --auto24```2526**With max attempts limit:**27```bash28/ci-fixer --max-attempts=329```3031The skill will:321. Detect your current branch's CI run332. Watch for failures343. Fix errors locally (tests, lint, build)354. Commit and push365. Loop until green ✅3738**CRITICAL**: Zero tolerance for hacks - fixes must be proper, no `@ts-ignore`, `eslint-disable`, or test skipping.39</quick_start>4041<parameters>42| Flag | Description |43|------|-------------|44| `-a, --auto` | Auto mode - skip confirmations, auto-proceed |45| `-m N, --max-attempts=N` | Maximum fix attempts before asking for help (default: 5) |46</parameters>4748<state_variables>49**Persist throughout all steps:**5051| Variable | Type | Description |52|----------|------|-------------|53| `{auto_mode}` | boolean | Skip confirmations |54| `{max_attempts}` | integer | Max fix attempts (default: 5) |55| `{current_attempt}` | integer | Current attempt number |56| `{run_id}` | string | Current GitHub Actions run ID |57| `{branch}` | string | Current git branch |58| `{last_commit_sha}` | string | SHA of commit being watched |59| `{artifacts_dir}` | string | Path to artifacts: `.claude/data/ci-{run_id}/` |60| `{error_source}` | string | Source of error (github-actions, vercel, netlify) |61| `{error_logs}` | string | Captured error logs |62| `{fixes_applied}` | list | List of fixes applied this session |63| `{local_verified}` | boolean | Whether local tests/lint passed |64</state_variables>6566<entry_point>67Load `steps/step-00-init.md`68</entry_point>6970<step_files>71| Step | File | Description |72|------|------|-------------|73| 0 | `step-00-init.md` | Parse flags, detect branch, setup state |74| 1 | `step-01-watch-ci.md` | Find CI run, monitor status |75| 2 | `step-02-analyze-errors.md` | Fetch logs/artifacts, analyze errors |76| 3 | `step-03-fix-locally.md` | Fix errors, verify locally |77| 4 | `step-04-commit-push.md` | Commit and push, loop back |78| 5 | `step-05-cleanup.md` | Cleanup artifacts, show summary |79</step_files>8081<workflow_diagram>82```83┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐84│ Init │───►│ Watch │───►│ Analyze │───►│ Fix │───►│ Commit │85│ Step 0 │ │ CI │ │ Errors │ │ Locally │ │ & Push │86└──────────┘ └────┬─────┘ └──────────┘ └──────────┘ └────┬─────┘87 │ │88 │ ┌─────────────────────────────────────┘89 │ │ (loop until green or max attempts)90 │◄────────┘91 │92 ┌────┴────┐ ┌──────────┐93 │ SUCCESS │───►│ Cleanup │94 │ or STOP │ │ Step 5 │95 └─────────┘ └──────────┘96```97</workflow_diagram>9899<artifacts_storage>100Artifacts are stored in `.claude/data/ci-{run_id}/`:101```102.claude/data/ci-{run_id}/103├── github/104│ ├── failed-logs.txt # Failed job logs105│ └── artifacts/ # Downloaded artifacts106├── vercel/107│ ├── deployment.json # Deployment info108│ └── logs.txt # Build/runtime logs109├── netlify/110│ └── build-logs.txt # Build logs111└── summary.md # Error analysis summary112```113</artifacts_storage>114115<core_principles>116<zero_tolerance_policy>117**ZERO TOLERANCE FOR HACKS**118119If you can't fix it properly, ASK FOR HELP. Never bypass or hack.1201211. **NEVER skip tests** - All tests must pass locally before committing1222. **NEVER hack around issues** - Fix the root cause, don't disable checks1233. **NEVER use bypass flags** - No `--no-verify`, `--skip`, `@ts-ignore`, `eslint-disable`1244. **NEVER disable rules** - Don't add to `.eslintignore`, don't lower strictness1255. **Verify locally first** - Always run tests/lint locally before pushing1266. **Minimal changes** - Only fix what's broken, don't refactor unrelated code1277. **Clear commits** - Each fix should have a descriptive commit message1288. **Clean up** - Delete artifacts when workflow completes129130**Forbidden hacks include:** `@ts-ignore`, `eslint-disable`, `.skip`, `as any`, `--no-verify`, `--legacy-peer-deps`, commenting out tests, changing assertions to match wrong output, adding files to ignore lists.131</zero_tolerance_policy>132</core_principles>133134<success_criteria>135- CI pipeline status successfully monitored136- Errors analyzed and root cause identified137- Fixes applied locally and verified (all tests/lint passing)138- Changes committed with clear messages139- CI pipeline green ✅ after fixes140- Artifacts cleaned up141- No hacks or bypasses used142- Maximum attempts limit respected143</success_criteria>144145<references>146- [CLI Commands](references/cli-commands.md) - GitHub, Vercel, Netlify CLI reference147- [Troubleshooting](references/troubleshooting.md) - Common issues and solutions148</references>