ci-fixlisted
Install: claude install-skill pricklywiggles/fractally-claude-marketplace
# ci-fix: watch CI and fix failures
Drive a pull request's CI to green by watching it and fixing the cause of any failure in the PR's branch. Bounded, cause-only, and it never games a check.
## 1. Resolve the target
- **PR number, URL, or branch given** (an argument, or passed by the ship-it orchestrator as a work-unit carrying `prNumber` / `branch` / `worktree`): use it.
- **Nothing given** (standalone): resolve the current branch's open PR with `gh pr view --json number,headRefName,url`. If the branch has no PR, say so and stop, there is nothing to watch.
- The working copy to fix in is the work-unit's `worktree` when set, otherwise the current checkout.
## 2. Read config, else defaults
Load the resolved config: `config="$("${CLAUDE_PLUGIN_ROOT}/scripts/load-config.sh")"` (it locates `ship-it.config.json`, applies defaults, and inlines `@FILE` refs). Read keys with `jq`:
- `ci.fixAttempts` (default 2),
- `verify` (commands to re-run after a fix; if absent, detect from package.json, e.g. lint + typecheck),
- `houseRules` / `safety` (carry these into every edit and commit: no em dashes, no AI attribution, plus any project rails).
No config means use the defaults and proceed.
## 3. Watch, then fix
1. **Watch** (give the Bash call the 10-minute max timeout; if it is killed while CI is still pending, run it again):
```bash
"${CLAUDE_PLUGIN_ROOT}/scripts/ci-watch.sh" <pr>
```
Exit 0 = all checks passed: report green, done. Exit 1 = at least one check failed, w