Skip to content
Back to skills

Fix Python Test

ASecurity

minimal-patch loop for a failing pytest in a python project

  • 10 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 19, 2026
ai-agentspythongoshell

Security analysis

A100/100

Scanned September 19, 2026

npx -y skills add initxy/noeta --skill fix-python-test --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fix Python Test?

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

Security grade badge for Fix Python Test
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/initxy-fix-python-test/badge)](https://www.skillsdirectory.com/skills/initxy-fix-python-test)

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
---
name: fix-python-test
description: minimal-patch loop for a failing pytest in a python project
priority: 50
---

When a Python test is failing, follow this loop precisely:

1. Run `pytest -q` via `shell_run` and read the tail of the output.
   The tail names the failing test + the offending line.
2. Use `grep` to find the function under test in the source tree.
   Read just the relevant lines of that file with `read`.
3. Apply the smallest possible patch with `edit` —
   `old` MUST match the file exactly once. Prefer changing a single
   operator or literal over rewriting a function.
4. Rerun `pytest -q` to confirm the suite is green. If a test
   still fails, go back to step 2 — do NOT pile more `edit`
   calls on top.

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…