Skip to content
Development
Command

/watch-ci

Monitor CI/CD pipeline and automatically fix failures. Watches GitHub Actions runs and applies fixes when tests fail.

From plugin
fusengine-claude-plugins
3434 skills40 agents34 commands
$ npx -y skills add fusengine/claude-plugins --agent claude-code

Command definition

watch-ci.md
description: Monitor CI/CD pipeline and automatically fix failures. Watches GitHub Actions runs and applies fixes when tests fail.
disable-model-invocation: false

Watch CI/CD

Monitor and auto-fix CI failures:

1. **Get Latest CI Run**:

   gh run list --limit 1
   gh run view [RUN_ID]
   gh run view [RUN_ID] --json headBranch,event

**Pick the fix branch now, before any fix touches the tree:**

  • **Run from a PR** (`gh pr list --head <headBranch> --state open` returns one) → the fix goes on that PR's head branch: `git switch <headBranch>` if not already on it (dirty tree → stop and report, never stash). No new PR.
  • **Run on a protected branch** (`main`/`master`/`develop`/`production`, e.g. a push run) → stay put: the commit agent's Step 0 moves the fix to a new `fix/ci-<scope>` branch and full mode opens a **new PR** for it. That is expected — say so in the report. The PR stays open (`--no-merge`); merge, tag and release happen at the end of the mandate, announced; a push to the protected branch itself needs the owner.

2. **Check Status**:

  • ✅ Success → Done
  • 🔄 In Progress → Wait (sleep 30s, check again)
  • ❌ Failed → Proceed to fix

3. **Analyze Failures**:

   gh run view [RUN_ID] --log-failed

Extract:

  • Which jobs failed
  • Error messages
  • Stack traces
  • File locations

4. **Categorize Failures**:

  • **Linter Errors**: Run linters locally, fix with sniper
  • **Test Failures**: Identify failing tests, fix logic
  • **Build Errors**: Resolve compilation/build issues
  • **Dependency Issues**: Update/fix package conflicts

5. **Apply Fixes**: Based on failure type:

  • > Use sniper for linter errors
  • > Use research-expert for framework-specific issues
  • Fix code logic for test failures
  • Update dependencies for build issues

6. **Verify Locally**:

   bun run lint
   bun test
   bun run build

7. **Commit and Push** (hand-off to the commit agent): This command never commits, pushes, opens a PR, merges, rebases, force-pushes or tags itself.

  • **WIP commit**: launch agent `fuse-ai-pilot:commit` with `mode: wip`, the files changed by the fix, and the summary for the message (`fix(ci): resolve CI pipeline failures` + one line per fix). It commits on the working branch only: no push, no bump, no PR, no merge, no tag.
  • **Push**: then launch agent `fuse-ai-pilot:commit` in **full mode** (rules `06-tooling-rules`, Git & GitHub Flow) with `mode: full`, `--no-merge`, and the branch picked in step 1. Onto an existing PR, also pass `--no-bump`: each CI round would otherwise stack a PATCH bump + CHANGELOG entry on the same PR. Never on the final, merging full-mode run at the end of the mandate — that run bumps what these rounds left unbumped. It pushes, watches CI and fills `ci:` (under `--no-merge` too); no merge here — the merge, tag and release happen at the end of the mandate, announced (D4) (merge is always a real `--merge`, never squash; a force-push needs the owner).
  • Blocked (secret in the diff, push rejected) → it stops with `status: blocked`; go back to step 3 with its report. Red CI is not a block: it reports `status: left-open`, `ci: failed:<check>` → step 8.

8. **Monitor New Run**: Read the `ci:` line of the commit agent's report; `failed:<check>` → repeat from step 3 (the next push passes `--no-bump`: the PR exists now). `watched-and-passed` / `no-checks-verified` → done. Empty or missing `ci:` → not verified: run `gh pr checks <pr> --watch` yourself before concluding.

**Arguments**:

  • $ARGUMENTS can specify specific job to watch

**Example Usage**:

  • `/watch-ci` → Monitor latest CI run
  • `/watch-ci test` → Watch only test jobs
Read more
@fusengine
Ships withfusengine-claude-plugins

A plugin ecosystem that turns Claude Code into a supervised, multi-agent development environment.

34200 skills40 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
34
Star history of fusengine/agents on GitHub, a chart by star-history.com

Other commands on fusengine-claude-plugins.

apex

apex

Command

APEX Methodology - The systematic Analyze-Plan-Execute-eLicit-eXamine approach for intelligent development. Reduces hallucination…

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command