- Home
- Skills
- Testing & Debugging
- python bug hunter
Works with the AI tools you already use
python bug hunter
Evidence-driven Python debugger focused on minimal patches and regression testing.
$9.99
python bug hunter
Example session with this skill installed
I'm getting a KeyError in my data processor when the 'tags' field is missing from the JSON input, even though I have a default value set. Here is the traceback and the snippet.
- Read your context and instructions
- Compiled the python bug hunter
- Generated the document
I have analyzed the traceback and the provided snippet. The issue stems from an explicit dictionary access before the default check is reached.
Python Bug Hunter Report
Failure Summary
A KeyError: 'tags' occurs in processor.py at line 42. The code attempts to access the key directly to check for length before the .get() default logic is applied.
Root Cause
| Status | Cause | Evidence | Location |
|---|---|---|---|
| CONFIRMED | Eager key access | Traceback points to len(data['tags']) before safety check. | processor.py:42 |
| LIKELY | Missing validation | Input schema allows empty or missing keys. | schemas.py:12 |
Minimal Fix
# processor.py
def process_data(data):
# Change: data['tags'] -> data.get('tags', [])
tags = data.get('tags', [])
if not tags:
return None
# ... rest of function
Regression Test
import pytest
from processor import process_data
def test_missing_tags_key():
"""Ensure missing tags field does not raise KeyError."""
input_data = {"id": 123, "content": "test"}
assert process_data(input_data) is None
def test_null_tags_value():
"""Ensure null tags field is handled gracefully."""
input_data = {"id": 124, "tags": None}
# This identifies a secondary risk if .get(key, []) returns None
with pytest.raises(TypeError):
process_data(input_data)
Verification
NOT RUN (Static analysis only)
Remaining Risk
The test_null_tags_value reveals that if the key exists but is explicitly None, the len() check will still fail. A more robust fix would be data.get('tags') or [].
Next steps
- Apply the suggested change to
processor.py. - Run the provided pytest cases to verify the fix.
- Update the input schema to enforce non-null values if
Noneis not valid.
python-bug-hunter.pdf
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
Debugging Python applications often involves chasing ghosts or applying broad refactors that introduce new regressions. This skill enforces an evidence-driven workflow to isolate the root cause and apply the smallest possible patch.
What it does
- Root Cause Isolation identifies the specific logic, state, or dependency failure using a traceback-to-source mapping.
- Evidence Labeling categorizes every finding as CONFIRMED, LIKELY, or NEEDS VERIFICATION to prevent debugging by guesswork.
- Minimal Patching generates the smallest safe code change required to fix the issue without unrelated refactoring.
- Regression Testing creates a specific test case for the failure and the nearest logical edge case.
- Risk Assessment documents potential side effects or remaining edge cases based only on supported evidence.
How it works
- Evidence Collection where the user provides logs, tracebacks, or failing test outputs.
- Trace Mapping to follow the execution path from the input to the point of failure.
- Hypothesis Verification where candidate causes are checked against actual code state and dependency behavior.
- Patch Generation producing a justified, minimal fix and a corresponding regression test.
Frameworks & tools
Works with any Python stack including FastAPI, Django, Flask, Pytest, and Unittest. Handles async/await concurrency, type-hinting issues, and third-party dependency conflicts.
Why this beats prompting it yourself
Generic prompts often hallucinate stack frames or suggest massive refactors for simple logic errors. This skill forces the agent to prove its findings with evidence and strictly limits changes to the minimal justified patch, preserving your existing architecture.
Use cases
- Debugging intermittent race conditions in async tasks.
- Resolving
NoneTypeerrors or unexpected boundary conditions in data pipelines. - Fixing broken dependency assumptions after package updates.
- Creating targeted regression tests for legacy code bugs.
Known limitations
Does not perform live execution unless your environment supports a Python interpreter tool. Cannot verify fixes for external infrastructure or closed-source API failures.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 4 days ago
- Passed all security checks, Safe to install