/ci-fixer
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 |
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ Init │───►│ Watch │───►│ Analyze │───►│ Fix │───►│ Commit │
│ Step 0 │ │ CI │ │ Errors │ │ Locally │ │ & Push │
└──────────┘ └────┬─────┘ └──────────┘ └──────────┘ └────┬─────┘
│ │
│ ┌─────────────────────────────────────┘
│ │ (loop until green or max attempts)
│◄────────┘
│
┌────┴────┐ ┌──────────┐
│ SUCCESS │───►│ Cleanup │
│ or STOP │ │ Step 5 │
└─────────┘ └──────────┘
.claude/data/ci-{run_id}/
├── github/
│ ├── failed-logs.txt # Failed job logs
│ └── artifacts/ # Downloaded artifacts
├── vercel/
│ ├── deployment.json # Deployment info
│ └── logs.txt # Build/runtime logs
├── netlify/
│ └── build-logs.txt # Build logs
└── summary.md # Error analysis summary
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.
- CI pipeline status successfully monitored
- Errors analyzed and root cause identified
- Fixes applied locally and verified (all tests/lint passing)
- Changes committed with clear messages
- CI pipeline green ✅ after fixes
- Artifacts cleaned up
- No hacks or bypasses used
- Maximum attempts limit respected
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---5
6<objective>
7Autonomously fix CI/CD pipeline failures by:
81. Watching CI runs in real-time
92. 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 green
125. Cleaning up artifacts when done
13</objective>
14
15<quick_start>
16**Basic usage (watch and fix CI):**
17
18```bash
19/ci-fixer
20```
21
22**Auto mode (no confirmations):**
23
24```bash
25/ci-fixer --auto
26```
27
28**With max attempts limit:**
29
30```bash
31/ci-fixer --max-attempts=3
32```
33
34The skill will:
35
361. Detect your current branch's CI run
372. Watch for failures
383. Fix errors locally (tests, lint, build)
394. Commit and push
405. Loop until green ✅
41
42**CRITICAL**: Zero tolerance for hacks - fixes must be proper, no `@ts-ignore`, `eslint-disable`, or test skipping.
43</quick_start>
44
45<parameters>
46| Flag | Description |
47|------|-------------|
48| `-a, --auto` | Auto mode - skip confirmations, auto-proceed |
49| `-m N, --max-attempts=N` | Maximum fix attempts before asking for help (default: 5) |
50</parameters>
51
52<state_variables>
53**Persist throughout all steps:**
54
55| Variable | Type | Description |
56| ------------------- | ------- | ------------------------------------------------- |
57| `{auto_mode}` | boolean | Skip confirmations |
58| `{max_attempts}` | integer | Max fix attempts (default: 5) |
59| `{current_attempt}` | integer | Current attempt number |
60| `{run_id}` | string | Current GitHub Actions run ID |
61| `{branch}` | string | Current git branch |
62| `{last_commit_sha}` | string | SHA of commit being watched |
63| `{artifacts_dir}` | string | Path to artifacts: `.claude/data/ci-{run_id}/` |
64| `{error_source}` | string | Source of error (github-actions, vercel, netlify) |
65| `{error_logs}` | string | Captured error logs |
66| `{fixes_applied}` | list | List of fixes applied this session |
67| `{local_verified}` | boolean | Whether local tests/lint passed |
68
69</state_variables>
70
71<entry_point>
72Load `steps/step-00-init.md`
73</entry_point>
74
75<step_files>
76| Step | File | Description |
77|------|------|-------------|
78| 0 | `step-00-init.md` | Parse flags, detect branch, setup state |
79| 1 | `step-01-watch-ci.md` | Find CI run, monitor status |
80| 2 | `step-02-analyze-errors.md` | Fetch logs/artifacts, analyze errors |
81| 3 | `step-03-fix-locally.md` | Fix errors, verify locally |
82| 4 | `step-04-commit-push.md` | Commit and push, loop back |
83| 5 | `step-05-cleanup.md` | Cleanup artifacts, show summary |
84</step_files>
85
86<workflow_diagram>
87
88```
89┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
90│ Init │───►│ Watch │───►│ Analyze │───►│ Fix │───►│ Commit │
91│ Step 0 │ │ CI │ │ Errors │ │ Locally │ │ & Push │
92└──────────┘ └────┬─────┘ └──────────┘ └──────────┘ └────┬─────┘
93 │ │
94 │ ┌─────────────────────────────────────┘
95 │ │ (loop until green or max attempts)
96 │◄────────┘
97 │
98 ┌────┴────┐ ┌──────────┐
99 │ SUCCESS │───►│ Cleanup │
100 │ or STOP │ │ Step 5 │
101 └─────────┘ └──────────┘
102```
103
104</workflow_diagram>
105
106<artifacts_storage>
107Artifacts are stored in `.claude/data/ci-{run_id}/`:
108
109```
110.claude/data/ci-{run_id}/
111├── github/
112│ ├── failed-logs.txt # Failed job logs
113│ └── artifacts/ # Downloaded artifacts
114├── vercel/
115│ ├── deployment.json # Deployment info
116│ └── logs.txt # Build/runtime logs
117├── netlify/
118│ └── build-logs.txt # Build logs
119└── summary.md # Error analysis summary
120```
121
122</artifacts_storage>
123
124<core_principles>
125<zero_tolerance_policy>
126**ZERO TOLERANCE FOR HACKS**
127
128If you can't fix it properly, ASK FOR HELP. Never bypass or hack.
129
1301. **NEVER skip tests** - All tests must pass locally before committing
1312. **NEVER hack around issues** - Fix the root cause, don't disable checks
1323. **NEVER use bypass flags** - No `--no-verify`, `--skip`, `@ts-ignore`, `eslint-disable`
1334. **NEVER disable rules** - Don't add to `.eslintignore`, don't lower strictness
1345. **Verify locally first** - Always run tests/lint locally before pushing
1356. **Minimal changes** - Only fix what's broken, don't refactor unrelated code
1367. **Clear commits** - Each fix should have a descriptive commit message
1378. **Clean up** - Delete artifacts when workflow completes
138
139**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.
140</zero_tolerance_policy>
141</core_principles>
142
143<success_criteria>
144
145- CI pipeline status successfully monitored
146- Errors analyzed and root cause identified
147- Fixes applied locally and verified (all tests/lint passing)
148- Changes committed with clear messages
149- CI pipeline green ✅ after fixes
150- Artifacts cleaned up
151- No hacks or bypasses used
152- Maximum attempts limit respected
153 </success_criteria>
154
155<references>
156- [CLI Commands](references/cli-commands.md) - GitHub, Vercel, Netlify CLI reference
157- [Troubleshooting](references/troubleshooting.md) - Common issues and solutions
158</references>