Agent skill

ci-fix

Debug and fix failing CI on the default branch. Use when CI fails on main.

Stars 6
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/max-sixty/tend/tree/main/plugins/tend-ci-runner/skills/ci-fix

Metadata

Additional technical details for this skill

internal
YES

SKILL.md

Fix CI on Default Branch

CI has failed on the default branch. Diagnose the root cause, fix it, and create a PR.

Failed run: $ARGUMENTS

Workflow

0. Load environment skills

Load /tend-ci-runner:running-in-ci first — it contains CI security rules, polling conventions, and comment formatting guidance. It will also prompt you to load any repo-specific skills (e.g., running-tend).

1. Check for existing fixes

bash
gh pr list --state open --head "fix/ci-" --json number,title,headRefName

If an existing PR addresses the same failure, comment on it linking the new run and stop.

2. Diagnose and fix

  1. Get failure logs: gh run view <run-id> --log-failed
  2. Identify the failing job and root cause — don't just fix the symptom
  3. Search for the same pattern elsewhere in the codebase
  4. Reproduce locally using test commands from the project's CLAUDE.md
  5. Fix at the right level (shared helper > per-file fix)

3. Create PR

Re-check for existing fix PRs (one may have been created while you worked).

bash
git checkout -b fix/ci-<run-id>
git add <files>
git commit -m "fix: <description>

Co-Authored-By: Claude <noreply@anthropic.com>"
git push -u origin fix/ci-<run-id>

Create the PR with gh pr create. PR body format:

## Problem
[What failed and the root cause]

## Solution
[What was fixed and why this is the right level]

## Testing
[How the fix was verified]

---
Automated fix for [failed run](run-url)

4. Monitor CI

Poll CI using the approach from running-in-ci (loaded in step 0). If CI fails, diagnose with gh run view <run-id> --log-failed, fix, commit, push, and repeat.

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results