Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

github-workflow-auto-fix

БесплатноБез исполняемых скриптовНе проверен

Set up automated CI fixing with Claude Code. Use when adding a workflow that analyzes failures, applies fixes, and files issues; pass --reusable for a…

laurigatesот laurigates★ 61 звезда на GitHub

Об этом скилле

GitHub Workflow Auto-Fix

Automated CI failure analysis and remediation using Claude Code Action.

Two shapes, selected by flag:

Shape Flag Output Use for
Single-repo inline (default) --setup One self-contained github-workflow-auto-fix.yml A single repo that owns its auto-fix logic
Reusable workflow_call --reusable (+ --caller) A reusable-ci-autofix.yml definition plus a thin auto-fix.yml caller Multiple repos invoking one shared template

When to Use This Skill

Use this skill when... Use something else when...
Setting up auto-fix for a single repo (default) Fixing a single PR's checks (/git:fix-pr)
Setting up a reusable template multiple repos invoke (--reusable) Inspecting workflow runs manually (/workflow:github-actions-inspection)
Customizing which workflows trigger auto-fix Writing new workflows from scratch (/workflow:dev)

Context

  • Inline workflow exists: !find . -path '*/.github/workflows/*' -maxdepth 3 -name 'github-workflow-auto-fix.yml'
  • Reusable workflow exists: !find . -path '*/.github/workflows/*' -maxdepth 3 -name 'reusable-ci-autofix.yml' -type f
  • Caller workflow exists: !find . -path '*/.github/workflows/*' -maxdepth 3 -name 'auto-fix.yml' -type f
  • Current workflows: !find . -path '*/.github/workflows/*' -maxdepth 3 -name '*.yml' -type f
  • Claude secrets configured: !gh secret list

Parameters

Parse from $ARGUMENTS:

  • --setup: Create or update the single-repo inline workflow in .github/workflows/github-workflow-auto-fix.yml
  • --reusable: Create or update the reusable workflow_call definition in .github/workflows/reusable-ci-autofix.yml (see Step 5)
  • --caller: Create the thin caller workflow in .github/workflows/auto-fix.yml that invokes the reusable definition (see Step 5)
  • --workflows <names>: Comma-separated workflow names to monitor (default: auto-detect CI workflows)
  • --dry-run: Show what would be created without writing files

Default (no --reusable/--caller) generates the single-repo inline workflow described in Steps 1–4. --reusable/--caller switch to the reusable variant in Step 5.

Execution

Execute this workflow setup process:

Step 1: Assess current state

  1. Check if .github/workflows/github-workflow-auto-fix.yml already exists
  2. List all current workflow files and their name: fields
  3. Check if CLAUDE_CODE_OAUTH_TOKEN secret is configured

Step 2: Select workflows to monitor

If --workflows provided, use those. Otherwise, auto-detect suitable workflows:

Good candidates for auto-fix monitoring:

  • CI/test workflows (lint, test, build, type-check)
  • Code quality checks (formatting, style)
  • Config validation workflows

Skip these (not suitable for auto-fix):

  • Release workflows (release-please, deploy)
  • Claude-powered workflows (avoid recursive triggers)
  • Scheduled audit workflows
  • Reusable workflow definitions

Step 3: Generate workflow file

If --setup or workflow is missing, create .github/workflows/github-workflow-auto-fix.yml.

The workflow's display name follows <Domain>: <Action> (Auto-fix: is the canonical domain for workflow_run-triggered remediation; quote the value because YAML treats : as a key separator). The strings under workflows: must match the display names of the target workflows exactly — update both sides whenever a target's name: changes. See .claude/rules/workflow-naming.md.

name: "Auto-fix: CI failures"

on:
  workflow_run:
    workflows:
      # List monitored workflows by display name (must match their `name:` exactly)
      - "Test: Suite"
      - "Plugin: Lint skills"
    types: [completed]

concurrency:
  group: auto-fix-${{ github.event.workflow_run.head_branch }}
  cancel-in-progress: false

permissions:
  contents: write
  pull-requests: write
  issues: write
  actions: read
  id-token: write

jobs:
  auto-fix:
    if: >-
      github.event.workflow_run.conclusion == 'failure' &&
      github.event.workflow_run.actor.type != 'Bot' &&
      github.event.workflow_run.head_branch != 'main' &&
      github.event.workflow_run.head_branch != 'master'
    runs-on: ubuntu-latest
    steps:
      - name: Checkout failed branch
        uses: actions/[email protected]
        with:
          ref: ${{ github.event.workflow_run.head_branch }}
          fetch-depth: 0

      - name: Gather failure context
        id: context
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          RUN_ID="${{ github.event.workflow_run.id }}"
          gh run view "$RUN_ID" --log-failed 2>&1 | tail -500 > .auto-fix-failed-logs.txt
          gh run view "$RUN_ID" --json conclusion,status,name,headBranch,headSha,jobs > .auto-fix-run-summary.json
          PR_NUMBER=$(gh pr list --head "${{ github.event.workflow_run.head_branch }}" --json number --jq '.[0].nu
Полный SKILL.md на GitHub

Установить github-workflow-auto-fix в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash(gh run *)
Bash(gh pr *)
Bash(gh issue *)
Bash(git status *)
Bash(git diff *)
Bash(git log *)
Read
Write
Edit
Grep
Glob
TodoWrite

Вложенные файлы

REFERENCE.md

FAQ

Что делает скилл github-workflow-auto-fix?

Set up automated CI fixing with Claude Code. Use when adding a workflow that analyzes failures, applies fixes, and files issues; pass --reusable for a multi-repo workflow_call template.

Как установить скилл github-workflow-auto-fix?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл github-workflow-auto-fix запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить github-workflow-auto-fix с