Skip to content
Skills Library
DevOps & cloud · Automation

fix-ci

/fix-ci

This skill should be used when the user asks to "fix CI", "fix failed checks", "PR is red", "diagnose CI failure". Also triggers when the user says in Japanese: "CI 直して", "CI が落ちてる", "PR の CI を直して".

Repository
claude-code ↗
Licence
GPL-3.0
Last repository change
07.07.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 07.07.2026, without references to retired models or APIs.

Licence

GPL-3.0, otwarta.

What it does and when to use it

This skill should be used when the user asks to "fix CI", "fix failed checks", "PR is red", "diagnose CI failure". Also triggers when the user says in Japanese: "CI 直して", "CI が落ちてる", "PR の CI を直して".

Triggers from the description

fix CIfix failed checksPR is reddiagnose CI failureCI 直してCI が落ちてるPR の CI を直して
Original author description

This skill should be used when the user asks to "fix CI", "fix failed checks", "PR is red", "diagnose CI failure". Also triggers when the user says in Japanese: "CI 直して", "CI が落ちてる", "PR の CI を直して".

How it works

  1. Persistence Target
  2. Workflow (single pass)
  3. Output Template
  4. Guidelines
Original SKILL.md headings · 152 lines, 860 words
SKILL.md preview
---
name: fix-ci
description: This skill should be used when the user asks to "fix CI", "fix failed checks", "PR is red", "diagnose CI failure". Also triggers when the user says in Japanese: "CI 直して", "CI が落ちてる", "PR の CI を直して".
---

# Fix CI (Cursor Skill)

Diagnose and fix CI failures on the current pull request in a single pass. Use the GitHub CLI to gather status and logs, dispatch an `explore` subagent for read-only investigation, then apply edits and push from the main agent. If the fix does not turn the PR green on the first attempt, hand off to the user with a clear report — do not enter a retry loop.

## Persistence Target

Persist intermediate findings and the final summary to the active Cursor plan file:

- Look up the currently active plan via the agent's plan tools (e.g. `read_plan` / `update_plan`).
- If no plan is active, create a new file at `./PLAN.md` and use that as the persistence target.
- Append the `## CI Fix Summary` section to the plan file once the fix is verified (or when handing off to the user).

## Workflow (single pass)

### Step 1. Verify GitHub CLI authentication

Run `gh auth status`. If unauthenticated:

- Surface the error to the user and stop.
- Do not attempt interactive `gh auth login` from the agent — Cursor's shell is not guaranteed to be interactive.
- Recommend the user run `gh auth login` (or set `GH_TOKEN`) and re-trigger the skill.

### Step 2. Read CI status on the current PR

Run:

```bash
gh pr view --json statusCheckRollup --jq '.statusCheckRollup[]'
```

Parse the output to identify failing checks and capture their `name`, `conclusion`, and `detailsUrl` / run id.

### Step 3. Pull failed logs

For each failing check:

```bash
gh run view <run-id>
gh run view <run-id> --log-failed
```

If a run id cannot be derived from the rollup, fall back to `gh pr checks` or `gh run list --branch <branch>` and pick the latest failing run.

Capture for each failure:

- The first actionable error message
- The failing command (e.g. `npm test`, `pytest`, `golangci-lint`, `gradle test`)
- File paths and line numbers
- Whether the failure looks like code, configuration, or environment / permissions

### Step 4. Dispatch an `explore` subagent for analysis

Dispatch one `Task` subagent of type `explore` (read-only). Pass it:

- The captured log excerpts and run ids
- The failing command(s)
- The file paths and line numbers from the logs
- The git diff range (e.g. base..HEAD on this branch) so it can correlate failures with recent changes

Ask the subagent to:

1. Locate the failing code and any related tests / configs.
2. Cross-reference recent commits on this branch.
3. Classify the failure (build / test / lint / type / dep / config / env).
4. Recommend the minimal fix.

The subagent must not make edits or run network commands beyond read-only exploration.

### Step 5. Propose the fix in plain language

Before editing, write a short paragraph in chat that covers:

- Root cause in plain language
- Intended fix and why it should work
- Risks (behavior change, dependency bump, scope creep)
- Out-of-scope notes (anything observed but deliberately not fixed)

### Step 6. Apply edits in the main agent

Apply the fix yourself (do not delegate edits to the subagent). Keep the change minimal:

- Fix only what is required to turn the failing check green.
- Preserve existing style and formatting.
- Do not refactor unrelated code.

### Step 7. Commit and push

Run, in order:

```bash
git status
git add -A
git commit -m "fix(ci): <short summary of the fix>"
git push
```

Use a clear message that names the failing check when helpful.

### Step 8. Watch CI (single attempt)

Run:

```bash
gh pr checks --watch
```

Wait for the run to complete. Do not start another retry pass — this skill is single-attempt by design.

### Step 9. Report and persist

Two outcomes:

- **All green:** Append the `## CI Fix Summary` section (template below) to the active plan file and post a short confirmation in chat.
- **Still failing or fix not possible:** Append a `## CI Fix Summary` section with status `NEEDS_HUMAN_INTERVENTION`, summarize what was tried and what is blocking, and explicitly hand off to the user.

## Output Template

Append this section to the active plan file:

```markdown
## CI Fix Summary

### Status
[RESOLVED | PARTIALLY_RESOLVED | NEEDS_HUMAN_INTERVENTION]

### Failing Checks (before fix)
- <check name> — <one-line failure>

### Root Causes
- <root cause per failure>

### Fixes Applied
- <file>: <what changed and why>

### Verification
- `gh pr checks --watch` outcome: <pass / fail / partial>
- Local checks run (if any): <commands and results>

### Recommendations / Follow-ups
- <items the user should consider next>
```

## Guidelines

- Single attempt only. Do not loop on failures — hand off instead.
- Auth gate first. Never attempt to fix CI without `gh auth status` succeeding.
- Subagent is read-only. All edits, commits, and pushes happen in the main agent.
- Keep edits minimal. The goal is to turn checks green, not to refactor.
- Persist before exiting. The active plan file (or `./PLAN.md`) must contain the summary.
- Surface unfixable cases. Permissions, secrets, infra, manual approvals, or sandbox-only blockers must be reported clearly with the user actions required.

Versions

RepositoryScoreLicence
This page · fumiya-kume/claude-code100GPL-3.0
tojim00d/Orbit-skills100MIT
khaledsaeed18/dotclaude100MIT
tzachbon/srulik-toolkit95MIT
robinnorberg/oh-my-copilot90MIT
mcpjam/inspector90Apache-2.0
cravingmaker/skills90MIT

Database snapshot: 13.11.2026 · package version 683b70c44fe8 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95gh-fix-ci
    Diagnose or fix failing GitHub Actions checks on a pull request. Use for CI failures; report external checks without attempting to repair them.
  • 100fix-ci-failures
    Investigate and fix CI failures on a pull request. Use when CI checks fail on a PR branch — covers finding the PR, identifying failed checks, downloading logs and artifacts, extracting the failure cause, and iterating on a fix. Requires the `gh` CLI.
  • 100ops-deploy-fix
    OPS on-demand: This skill should be used when the user asks to \"deploy auto-fix\", \"failed deploy\", or…
  • 100fix-ci-failures
    Investigate and fix CI failures on a pull request. Use when CI checks fail on a PR branch — covers finding the PR, identifying failed checks, downloading logs and artifacts, extracting the failure cause, and iterating on a fix. Requires the `gh` CLI.
  • 100check-ci
    Diagnose CI failures by inspecting GitHub Actions run logs, identifying root causes, and suggesting fixes. Use when CI is failing, a workflow run failed, checks are red, or the user asks "why is CI failing" or "fix CI".
  • 100fix-failing-actions
    Diagnose and fix failing GitHub Actions workflows in the drift repository. Use when a CI run, security hygiene check, release workflow, or any other GitHub Actions job is red. Keywords: GitHub Actions, workflow failure, CI failure, failed run, failing check, red CI, workflow…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.