Skip to content

ghs-action-fix

Fix failing GitHub Actions pipelines directly — detect broken workflows, diagnose from run logs, apply fixes, and create PRs. No prior scan or backlog required.

Skill Info

Version: 2.0.0 Arguments: [owner/repo] [--workflow <name>]Trigger phrases: "fix my pipeline", "fix CI", "my actions are failing", "fix my workflows", "repair my build", "CI is broken", "fix GitHub Actions", "debug my workflow", "why is my build failing", "action fix"

What It Does

ghs-action-fix detects failing GitHub Actions workflows, reads their run logs, diagnoses root causes, and applies targeted fixes — each in its own worktree with a dedicated PR.

How It Differs from ghs-backlog-fix

SkillWhen to Use
ghs-backlog-fixFix pre-existing backlog items from a scan
ghs-action-fixDirect: "my CI is broken" — detect, diagnose, fix, PR

Scope Boundary

Only modifies .github/workflows/ files. If CI fails due to broken application code (test failures, compilation errors), the skill reports NEEDS_HUMAN with a diagnosis instead of attempting a fix.

Process

  1. Detect — Find failing workflows via gh run list
  2. Prepare — Clone/pull repo, detect tech stack
  3. Confirm — Show triage table, wait for user confirmation
  4. Worktrees — One worktree per failing workflow (fix/action-{slug})
  5. Agents — Spawn parallel CI Fix Agents (one per workflow)
  6. Collect — Parse results, apply circuit breaker (3 attempts max)
  7. Cleanup — Remove worktrees for PASS/FAILED; preserve NEEDS_HUMAN
  8. Report — Show results table with PR links and NEEDS_HUMAN instructions

Root Cause Classification

Each CI Fix Agent classifies failures before acting:

CategoryExamplesAction
WORKFLOW_FIXDeprecated actions, wrong runtime versions, missing permissions, YAML errorsFix the workflow file
APP_CODETest failures, compilation errors, missing importsNEEDS_HUMAN
ENVIRONMENTExpired secrets, missing repo variablesNEEDS_HUMAN

Example

## Failing Workflows: phmatray/my-project

| # | Workflow | File     | Last Run | Branch | Run ID |
|---|----------|----------|----------|--------|--------|
| 1 | CI       | ci.yml   | failure  | main   | 12345  |
| 2 | Deploy   | deploy.yml | failure | main   | 12346  |

Workflows to fix: 2

Proceed with all? (y/n)

After fixing:

## Results: phmatray/my-project

| Workflow | File       | Diagnosis             | Status        | PR  |
|----------|------------|-----------------------|---------------|-----|
| CI       | ci.yml     | Node 16 → 20 upgrade | [PASS]        | #42 |
| Deploy   | deploy.yml | Broken app test       | [NEEDS_HUMAN] | —   |

---

Summary:
  Fixed: 1/2
  PRs created: 1

Needs human attention:
  [NEEDS_HUMAN] Deploy (deploy.yml) — CI fails due to broken test in
    src/auth.test.ts, not a workflow issue

Routes To

After fixing, GHS suggests:

Technical Details

PropertyValue
Allowed toolsBash(gh:*), Bash(git:*), Read, Write, Edit, Glob, Grep, Task
Spawns sub-agentsYes — one CI Fix Agent per failing workflow, parallel execution
Phases8 (Detect, Prepare, Confirm, Worktrees, Agents, Collect, Cleanup, Report)
Circuit breaker3 attempts per workflow, then NEEDS_HUMAN
Requiresgh CLI (authenticated), git, network access, write access to repo
Re-run safeYes — only targets currently failing workflows

Released under the MIT License.