debug-tests

Investigate pytest test failures by checking fixtures and environment before modifying code.

Updated Nov 24, 2025
One-click install
npx skills add https://github.com/ByronWilliamsCPA/.claude --skill debug-tests-byronwilliamscpa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug-tests
Source: https://github.com/ByronWilliamsCPA/.claude/tree/main/.claude/skills/debug-tests
Command: npx skills add https://github.com/ByronWilliamsCPA/.claude --skill debug-tests-byronwilliamscpa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the wasted effort of applying superficial fixes to failing tests that don't address the actual root cause, which leads to recurring test failures and wasted engineering time.

Core Features & Use Cases

  • Root-cause-first investigation workflow: Guides you to systematically check fixtures, environment mismatches, dependency drift, and test isolation before modifying application code.
  • Guardrails against bad fixes: Includes a reference table of common rationalizations (like adding sleeps or mocking away failures) that defer problems instead of solving them.
  • Use case: If your CI pipeline is reporting random authentication test failures, this Skill guides you to first check for fixture scope issues or shared test state before changing any auth logic.

Quick Start

Use the debug-tests skill to investigate and fix the failing test at tests/unit/test_auth.py.

Frequently Asked Questions about debug-tests

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

FAQPage Schema
How do I debug failing pytest tests without applying superficial fixes?

Debug failing pytest tests by enforcing a prioritized root-cause-first investigation workflow that systematically checks fixtures, environment mismatches, dependency drift, and test isolation before modifying application code to prevent recurring test failures.

What is the best way to resolve flaky tests in a CI pipeline?

Resolve flaky tests in CI by following a structured root-cause-first analysis that investigates fixture scope issues and shared test state, preventing superficial rationalizations like adding sleeps or mocking away failures that defer the actual underlying problem.

How do I stop recurring test failures caused by environment mismatches?

Stop recurring test failures by investigating environment mismatches and dependency drift through a structured pytest debugging process before adjusting any application code, ensuring all fixes target the actual underlying root cause instead of symptoms.

Does this root-cause test debugging approach work for local and remote development environments?

Yes, this structured test debugging approach applies to Python software engineering workflows involving pytest test suites, CI test failures, and flaky test resolution across both local and remote development environments without requiring specific dependencies.

What are common rationalizations to avoid when fixing CI test failures?

Avoid rationalizations like adding sleeps or mocking away failures when fixing CI test failures, as these defer problems instead of solving them; use guardrails to enforce root-cause investigation of fixture scope and shared test state first.