| created | "2025-12-16T00:00:00.000Z" |
| modified | "2026-06-18T00:00:00.000Z" |
| reviewed | "2026-04-25T00:00:00.000Z" |
| allowed-tools | Bash(gh pr checks *), Bash(gh pr view *), Bash(gh run view *), Bash(gh run list *), Bash(gh repo view *), Bash(git status *), Bash(git diff *), Bash(git log *), Bash(git add *), Bash(git commit *), Bash(git push *), Bash(pre-commit *), Bash(npm run *), Bash(uv run *), Read, Edit, Grep, Glob, TodoWrite, mcp__github__pull_request_read |
| args | [pr-number] [--auto-fix] [--push] |
| argument-hint | [pr-number] [--auto-fix] [--push] |
| disable-model-invocation | true |
| description | Analyze and fix failing PR checks. Use when asked to fix a PR, resolve red CI checks, auto-fix lint/test failures, or reproduce CI errors locally before pushing. |
| name | git-fix-pr |
When to Use This Skill
| Use this skill when... | Use the alternative when... |
|---|
| Fixing failing CI checks on an existing PR (lint, type, test) | Use git-pr-feedback to address reviewer comments rather than CI failures |
| Reproducing red GitHub Actions runs locally before pushing corrections | Use gh-workflow-monitoring to passively watch a run rather than fix it |
| Auto-applying lint/format/type fixes and pushing them to the PR branch | Use git-conflicts when the failure is a merge conflict, not a check |
| Diagnosing why a pull request is red after a push | Use git-triage to sweep many PRs at once instead of fixing one |
Context
- Repo: !
git remote -v
- Current branch: !
git branch --show-current
- Git status: !
git status --porcelain=v2 --branch
- Staged changes: !
git diff --cached --numstat
- Unstaged changes: !
git diff --numstat
- Recent commits: !
git log --format='%h %s' --max-count=5
Parameters
Parse these parameters from the command (all optional):
$1: PR number (if not provided, detect from current branch)
--auto-fix: Automatically apply fixes for common issues
--push: Push fixes to the branch after committing
Your task
Analyze and fix failing PR checks.
Step 1: Determine PR
- Get PR number from argument or detect from current branch
- Fetch PR status using
gh pr checks <pr-number> or mcp__github__pull_request_read
Step 2: Analyze Failures
- Identify failing checks from PR status
- Research error messages in workflow logs
- Categorize failures:
- Linting errors
- Type errors
- Test failures
- Build errors
Step 3: Reproduce Locally
- to reproduce issues