fix-pr-tests

Diagnoses GitHub CI test failures and applies minimal fixes to resolve them.

121|2|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/AgentSystemLabs/core --skill fix-pr-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fix-pr-tests
Source: https://github.com/AgentSystemLabs/core/tree/main/plugins/agentsystem-core/skills/fix-pr-tests
Command: npx skills add https://github.com/AgentSystemLabs/core --skill fix-pr-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you diagnose and fix failing CI tests on a GitHub pull request without guessing whether the bug is in production code or the test itself, reducing the risk of shipping real regressions or silently “teaching to the test.”

Core Features & Use Cases

  • Failure localization with GitHub logs: Pulls failing check/job details and the exact assertion/error from gh pr checks and gh run view so you understand what actually broke.
  • Local reproduction loop: Runs only the failing test to confirm whether the failure is reproducible and to identify environment deltas between CI and local.
  • Load-bearing classification: Determines whether the issue is a real bug, stale test, or flake and applies the minimal fix to the correct side only.
  • Verification before push: Re-verifies the relevant tests (and the right breadth) before pushing and re-checking CI.
  • Use case: Your PR shows multiple red CI jobs; you want the AI to find the true failing assertion, reproduce it locally, classify the root cause, apply the smallest correct fix, and ensure CI is green again.

Quick Start

Ask the AI: fix the failing tests on this PR #123 and make CI green.

Frequently Asked Questions about fix-pr-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix failing GitHub pull request tests and make CI green?

To fix failing GitHub pull request tests, you can use this Skill to fetch failing check logs via GitHub CLI, reproduce the exact failing test locally, and classify the failure as a real bug, stale test, or flake. It then applies the minimal correct fix and re-verifies before pushing.

Why does my CI test fail locally but pass in GitHub Actions, or vice versa?

CI test failures that differ from local runs often stem from environment deltas. This Skill identifies these runner environment differences by reproducing the exact failing test locally, helping you determine whether the issue is a true code bug or a flaky test caused by environment variations.

What is the best way to diagnose flaky tests in a GitHub PR?

The best way to diagnose flaky tests in a GitHub PR is to fetch the exact assertion message and source location from the CI run logs, reproduce the test locally to check for environment deltas, and classify the root cause to apply the minimal fix only to the correct side.

Do I need GitHub CLI to reproduce and fix failing PR checks?

Yes, you need GitHub CLI installed and authenticated to use this Skill. It requires GitHub CLI commands like `gh pr checks` and `gh run view` to fetch failing check details, pull exact assertion messages, and identify runner environment deltas for local reproduction.

Can I automate fixing stale tests without shipping real regressions?

Yes, you can safely automate fixing stale tests by classifying each failure as a real bug, stale test, or flake first. This Skill applies the minimal change to only the correct side—production code or test file—and re-verifies the relevant tests before pushing to prevent regressions.

What should I do when multiple GitHub Actions jobs are red on my pull request?

When multiple GitHub Actions jobs are red on your pull request, this Skill finds the true failing assertion by pulling job details, reproduces the specific failing test locally, and applies the smallest correct fix to make CI green again without guessing the root cause.