fix-bad-practices

Fix bad coding practices detected by automated audits in Python projects.

Updated Jan 25, 2026
One-click install
npx skills add https://github.com/benzwick/SlicerMouseMaster --skill fix-bad-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fix-bad-practices
Source: https://github.com/benzwick/SlicerMouseMaster/tree/main/.claude/skills/fix-bad-practices
Command: npx skills add https://github.com/benzwick/SlicerMouseMaster --skill fix-bad-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Fix Bad Practices Skill identifies and systematically remedies common coding-pattern issues uncovered by audits, enabling faster remediation and higher-quality code.

Core Features & Use Cases

  • Detect and fix patterns like bare except: pass, broad except, silent continue, and return None on error.
  • Provide concrete Before/After examples and logging guidance to ensure failures are visible and traceable.
  • Support for testing and documenting changes, plus a clear commit-message template to record improvements.

Quick Start

Run the code-quality audit to identify issues, then apply the fail-fast fixes described above.

Frequently Asked Questions about fix-bad-practices

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

FAQPage Schema
How do I fix bare except pass and silent failures in Python code?

Fix bare except pass and silent failures by replacing them with specific exception handling, adding logging, and enforcing fail-fast behavior to ensure errors are visible and traceable.

What is the best way to refactor broad exception handling in Python projects?

The best way to refactor broad exception handling is to introduce precise errors, preserve stack traces, and apply patterns that require specific exceptions instead of catching all exceptions generically.

How do I stop my Python code from returning None on error?

Stop returning None on error by implementing fail-fast patterns that raise specific exceptions and adding logging to make failures immediately visible during code quality refactoring.

Can I use automated code-quality audits to detect missing logging and bad exception handling?

Yes, you can run code-quality audits to identify issues like missing logging, broad exception handling, and silent continues, then apply systematic fixes to improve codebase quality.

When do I need to add logging and test coverage during Python refactoring?

Add logging and test coverage during refactoring when addressing silent failures, ensuring failures are traceable, and documenting changes to meet code quality improvement or onboarding standards.

Why does my Python code silently continue instead of raising an error?

Your code silently continues because of bad practices like bare except or returning None on error, which should be refactored to enforce fail-fast behavior and specific exception handling.