Skip to content
Back to skills

Git Fix Pr

ASecurity

Analyze and fix failing PR checks

  • 58 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added February 8, 2026
toolsjavascripttypescriptpythongojavabashgit

Works with

  • mcp

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add laurigates/claude-plugins --skill git-fix-pr --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Fix Pr?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Git Fix Pr
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/laurigates-git-fix-pr/badge)](https://www.skillsdirectory.com/skills/laurigates-git-fix-pr)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
model: haiku
created: 2025-12-16
modified: 2026-01-17
reviewed: 2026-01-17
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
argument-hint: [pr-number] [--auto-fix] [--push]
description: Analyze and fix failing PR checks
name: git-fix-pr
---

## Context

- Repo: !`gh repo view --json nameWithOwner 2>/dev/null`
- Current branch: !`git branch --show-current`
- Git status: !`git status --porcelain=v2 --branch 2>/dev/null`
- Staged changes: !`git diff --cached --numstat 2>/dev/null`
- Unstaged changes: !`git diff --numstat 2>/dev/null`
- Recent commits: !`git log --format='%h %s' -n 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

1. **Get PR number** from argument or detect from current branch
2. **Fetch PR status** using `gh pr checks <pr-number>` or mcp__github__pull_request_read

### Step 2: Analyze Failures

1. **Identify failing checks** from PR status
2. **Research error messages** in workflow logs
3. **Categorize failures**:
   - Linting errors
   - Type errors
   - Test failures
   - Build errors

### Step 3: Reproduce Locally

1. **Run tests locally** to reproduce issues
2. **Run linters** to check for style issues
3. **Run type checker** if applicable

### Step 4: Apply Fixes (if --auto-fix)

Based on failure type:

- **Linting errors**: Run appropriate linters/formatters
  ```bash
  # Python
  uv run ruff check --fix .
  uv run ruff format .

  # JavaScript/TypeScript
  npm run lint -- --fix
  ```

- **Type errors**: Fix type annotations or implementations
- **Test failures**: Fix failing tests or implementation bugs

### Step 5: Commit and Push (if --push)

1. **Stage fixes**: `git add -u`
2. **Commit**: `git commit -m "fix: resolve CI failures"`
3. **Push**: `git push`

### Step 6: Verify

1. **Re-run checks** locally to verify fixes
2. **Monitor PR checks** after push

## Common Fix Patterns

| Check Type | Common Fixes |
|------------|--------------|
| Linting | Run formatter, fix import order |
| Types | Add type annotations, fix mismatches |
| Tests | Fix assertions, update snapshots |
| Build | Fix imports, resolve dependencies |

## See Also

- **github-actions-inspection** skill for workflow analysis
- **git-branch-pr-workflow** skill for PR patterns

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.