plugins/python3-development/skills/analyze-test-failures/SKILL.md
Use when analyzing failing test cases to determine whether failures indicate genuine bugs or test implementation issues. Activates on "analyze failing tests", "debug test failures", "investigate test errors", or when provided with specific failing test names or output. Applies balanced investigative reasoning — does not auto-fix tests without establishing root cause.
npx skillsauth add jamie-bitflight/claude_skills analyze-test-failuresInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze failing test cases with a balanced, investigative approach.
Consult ../python3-development/references/python3-standards.md when shared testing or quality rules from this plugin apply; full standards, graphs, and amendment process are documented there.
When tests fail, there are two primary possibilities:
Assuming tests are wrong by default is a dangerous anti-pattern that defeats the purpose of testing.
For each failing test, ask:
Classify the failure as one of:
| Classification | Meaning | | ---------------------- | --------------------------------- | | Test Bug | Test's expectations are incorrect | | Implementation Bug | Code doesn't behave as it should | | Ambiguous | Intended behavior is unclear |
Provide clear explanation including:
Scenario: Test expects calculateDiscount(100, 0.2) to return 20, but it returns 80
Analysis:
Determination: Ambiguous Recommendation: Check documentation or clarify intended behavior
Scenario: Test expects validateEmail("[email protected]") to return true, but it returns false
Analysis:
Determination: Implementation Bug Recommendation: Fix the regex to properly validate email addresses per RFC standards
Scenario: Test expects divide(10, 0) to return 0, but it throws an error
Analysis:
Determination: Test Bug Recommendation: Update test to expect an error, not 0
For each failing test, provide:
Test: [test name/description]
Failure: [what failed and how]
Investigation:
- Test expects: [expected behavior]
- Implementation does: [actual behavior]
- Root cause: [why they differ]
Determination: [Test Bug | Implementation Bug | Ambiguous]
Recommendation:
[Specific fix to either test or implementation]
development
When an application needs to store config, data, cache, or state files. When designing where user-specific files should live. When code writes to ~/.appname or hardcoded home paths. When implementing cross-platform file storage with platformdirs.
testing
Enforce mandatory pre-action verification checkpoints to prevent pattern-matching from overriding explicit reasoning. Use this skill when about to execute implementation actions (Bash, Write, Edit) to verify hypothesis-action alignment. Blocks execution when hypothesis unverified or action targets different system than hypothesis identified. Critical for preventing cognitive dissonance where correct diagnosis leads to wrong implementation.
tools
Reference guide for the Twelve-Factor App methodology — 15 principles (12 original + 3 modern extensions) for building portable, resilient, cloud-native applications. Use when evaluating application architecture, designing cloud-native services, reviewing codebases for methodology compliance, advising on configuration, scaling, observability, security, and deployment patterns. Incorporates the 2025 open-source community evolution and cloud-native reinterpretations of each factor.
tools
Converts user-facing documentation (how-to guides, tutorials, API references, examples) in any format — Markdown, PDF, DOCX, PPTX, XLSX, AsciiDoc, RST, HTML, Jupyter notebooks, man pages, TOML/YAML/JSON configs, and plain text — into Claude Code skill directories with SKILL.md plus thematically grouped references/*.md files. Use when given a docs directory or mixed-format documentation to transform into an AI skill. Uses MCP file-reader server for binary formats.