Skip to content
Back to skills

Pytest.Fix Local Tests

ASecurity

Analyze and fix failure of local tests

  • 158 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 7, 2026
testinggobashdockerdocumentation

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add gpsaggese/helpers --skill pytest.fix_local_tests --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pytest.Fix Local Tests?

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

Security grade badge for Pytest.Fix Local Tests
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gpsaggese-pytest-fix-local-tests/badge)](https://www.skillsdirectory.com/skills/gpsaggese-pytest-fix-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: Analyze and fix failure of local tests
model: haiku
---

# Goal
- Given info about failed tests `<FAILURE_INFO>`, run the tests, find the root
  cause, and fix them

# Workflow

## Run Tests
- The input `<FAILURE_INFO>` can be:
  - A failing pytest test
    - E.g., `dev_scripts_helpers/documentation/test/test_notes_to_pdf.py`
  - A repro generated by `pytest_failed_multi_build.py`
    - E.g., `tmp.pytest_failed_multi_build.repro.sh`

- Gather information about the failing tests by:
  - Reading the code
  - Inspecting the content of `<FAILURE_INFO>`
  - Running the tests locally, if needed
    - E.g.,
      ```bash
      > pytest_log `<FAILURE_INFO>`
      > tmp.pytest_failed_multi_build.repro.sh
      ```

## Analyze Failures
- Read `.claude/skills/pytest.rules.md` to learn how to diagnose issues

- Collect the failing tests from the run
  ```bash
  > i pytest_failed
  ...
  Failed tests: 25/7
  dev_scripts_helpers/documentation/test/test_notes_to_pdf.py::Test_notes_to_pdf_actions::test1
  dev_scripts_helpers/documentation/test/test_notes_to_pdf.py::Test_notes_to_pdf_actions::test2
  dev_scripts_helpers/documentation/test/test_notes_to_pdf.py::Test_notes_to_pdf_edge_cases::test1
  dev_scripts_helpers/documentation/test/test_notes_to_pdf.py::Test_notes_to_pdf_edge_cases::test2
  dev_scripts_helpers/documentation/test/test_notes_to_pdf.py::Test_notes_to_pdf_edge_cases::test3
  dev_scripts_helpers/documentation/test/test_notes_to_pdf.py::Test_notes_to_pdf_edge_cases::test4
  dev_scripts_helpers/documentation/test/test_notes_to_pdf.py::Test_notes_to_pdf_filters::test1
  dev_scripts_helpers/documentation/test/test_notes_to_pdf.py::Test_notes_to_pdf_filters::test2
  dev_scripts_helpers/documentation/test/test_notes_to_pdf.py::Test_notes_to_pdf_filters::test3
  dev_scripts_helpers/documentation/test/test_notes_to_pdf.py::Test_notes_to_pdf_filters::test4
  dev_scripts_helpers/documentation/test/test_notes_to_pdf.py::Test_notes_to_pdf_filters::test5
  ...
  13:07:36 - WARN  lib_tasks_pytest.py pytest_failed:1745                 To run the failed tests run: tmp.pytest_failed.sh
  ...
  ```

- For tests that run Docker / Apple containers, run them with different builds,
  per `## Analyze the Effect of Container Builds` in
  `.claude/skills/pytest.rules.md`

- Check whether the root cause and the solution are the same for all 3 builds

## Prepare A Plan to Fix Failures
- Prepare a plan following `# Format for Unit Test Fixing Plan` in
  `.claude/skills/pytest.rules.md`
- Save it in `plan-pytest.fix_local_tests.md` in the current dir
- Do not print anything on screen

## Implement and Verify the Fix
- If the root cause and the fix are clear, implement the fixes directly
- If the root cause or the fix is unclear, stop and ask the user before
  implementing anything
- Verify the fixes as per `# Verification of the Fix` in
  `.claude/skills/pytest.rules.md`

# Verification

- [ ] `plan-pytest.fix_local_tests.md` lists a fix for every failing test
- [ ] Every fix follows `# Verification of the Fix` in
      `.claude/skills/pytest.rules.md`
- [ ] The failing tests pass locally after the fix

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.