Skip to content
Back to skills

Github.Get Pr To Pass Local Tests

ASecurity

Make the local unit tests pass for the current PR

  • 158 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 7, 2026
testinggobashgit

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add gpsaggese/helpers --skill github.get_pr_to_pass_local_tests --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Github.Get Pr To Pass Local Tests?

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

Security grade badge for Github.Get Pr To Pass Local Tests
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gpsaggese-github-get-pr-to-pass-local-tests/badge)](https://www.skillsdirectory.com/skills/gpsaggese-github-get-pr-to-pass-local-tests)

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
---
description: Make the local unit tests pass for the current PR
model: sonnet
---

# Goal
- Run, monitor, and fix the local unit tests for the current PR

# Workflow

## Create and Update a Plan
- Create `plan-github.get_pr_to_pass_local_tests.md`: a bullet list of actions
- Keep it updated, marking each action `[.]` in progress, `[x]` done, `[F]` failed

## Get the PR Number and Branch Name
- Get the PR number
  ```bash
  > GH_PR_NUM=$(gh pr view --json number -q .number)
  ```

- Get the branch name
  ```bash
  > BRANCH_NAME=$(git branch --show-current)
  ```

## Run Local Regressions
- Run full test suite locally:
  ```bash
  > pytest_multi_build.py --target . 2>&1 --timeout -1 | tee tmp.auto_task.pytest_multi_build.log
  ```
- Wait for the script to terminate

## Check Regressions to Complete

- Check the output of the local regressions with:
  ```bash
  > pytest_failed_multi_build.py 2>&1 | tee tmp.auto_task.pytest_failed_multi_build.log
  ```

## Report Status on the PR
- If local regressions are passing:
  ```bash
  > gh pr comment $GH_PR_NUM --body "Local tests passing"
  ```
- If any failures, document error and post:
  ```bash
  > gh pr comment $GH_PR_NUM --body "Local test failures found: [error summary]. Investigating..."
  ```

## Fix the Failures
- If failures were found, run `tmp.pytest_failed_multi_build.repro.sh` to understand
  what failed and use `/pytest.fix_local_tests` to analyze and fix them
  - If the fix is simple, just fix it and commit
  - If the fix is not clear, stop and ask for the user to help

## Never Commit Junk Files
- Never run `git add -A` or `git add .` to stage a fix: they sweep in every
  untracked file (logs, `tmp.*` scratch files, test-run artifacts like
  `.pkl`/`.json` caches), not just the intended files
- Always stage files explicitly by path, e.g. `git add <file1> <file2>`
- Before committing, run `git status --short` and drop anything that is not part
  of the intended fix
- If junk was already committed and pushed, amend the commit to hold only the
  intended files and force-push (`git push --force-with-lease`)

## Loop
- Keep repeating until the PR is passing all the local tests

# Constraints
- This skill runs both when executed locally on a dev computer and remotely on cloud
  (e.g., on GitHub or Anthropic infrastructure)

# Verification

- [ ] `pytest_failed_multi_build.py` reports no failing tests
- [ ] A PR comment reports the final local test status
- [ ] `git status --short` shows only the intended files staged before commit

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.

View all in testing →

Comments

Loading comments…

Newsletter

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