luan

pr-ci

"Fix failing CI/GitHub Actions checks. Triggers: 'fix CI', 'fix GHA', 'build failing', 'tests failing in CI', 'checks red'."

luan 4 3 Updated 3mo ago
GitHub

Install

npx skillscat add luan/dot-claude/pr-ci

Install via the SkillsCat registry.

SKILL.md

PR GHA Fixer

Fix failed GitHub Actions checks.

Safety: NEVER rebases. Push optional + requires confirmation (unless --auto).

Steps

  1. Detect PR: gh pr view --json number -q '.number' or ask user

  2. Verify branch (if PR specified manually)

  3. Fetch failed checks:

    gh pr checks <PR> --json name,state,bucket,link

    --auto → fix all failed checks. Without --auto → display as numbered list, ask "Which to fix?"

  4. Fetch logs:

    gh run list --branch <BRANCH> --json databaseId,name,conclusion --limit 20
    gh run view <RUN_ID> --log-failed
  5. Plan fixes: Identify root cause, create concise plan. --auto → proceed. Without --auto → ask "Ready to execute?"

  6. Execute: Apply fixes, summarize changes.

  7. Commit: --auto → commit with suggested message. Without --auto → ask first, suggest message like fix: resolve CI failures.

  8. Push (optional): --auto → push automatically. Without --auto → ask first. Use Skill(gt:submit) if gt plugin is loaded, otherwise git push.

Common Failures & Remediation

  • Build — missing imports, type errors, syntax → read error output, fix source directly
  • Test — outdated assertions, missing fixtures → update expectations or add missing test data
  • Lint — formatting, unused imports/vars → run the project formatter, remove dead code
  • Infra — secrets, rate limits, runner issues → can't fix locally; inform user to check repo/org settings