clean-general

Guide Python code cleanup to improve readability and reduce duplication.

2|1|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/proven-xyz/proven-app --skill clean-general
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-general
Source: https://github.com/proven-xyz/proven-app/tree/main/.agents/skills/clean-general
Command: npx skills add https://github.com/proven-xyz/proven-app --skill clean-general

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Python codebases often accumulate duplication and unclear intent, making maintenance expensive and error-prone.

Core Features & Use Cases

  • Enforces DRY and clarity by guiding refactoring decisions.
  • Provides practical rules (e.g., G5: DRY, G16: No Obscured Intent, G23: Prefer Polymorphism To If/Else, G25: Replace Magic Numbers) with concrete examples.
  • Use cases include reviewing legacy modules, removing duplication, and improving readability while preserving behavior.

Quick Start

Run a focused review on the target module to identify duplication and obscured intent, then propose targeted cleanups.

Frequently Asked Questions about clean-general

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

FAQPage Schema
How do I refactor Python code to reduce duplication and improve readability?

Python code cleanup improves readability by enforcing DRY, consistent naming, and single-responsibility functions. It guides refactoring decisions to reduce duplication and clarify intent, making legacy modules easier to maintain.

What clean code principles help remove duplication during a Python code review?

Python code cleanup applies practical rules like G5 (DRY), G16 (No Obscured Intent), and G25 (Replace Magic Numbers) to enforce clarity and remove duplication. It provides concrete examples for reviewing legacy modules and improving maintainable structure.

Can I use this refactoring approach for legacy Python modules without changing behavior?

Python code cleanup provides guardrails for safe changes, ensuring refactoring preserves behavior while improving clarity. It applies single-responsibility functions and modularization to legacy modules without altering existing functionality.

What is the best way to structure Python functions for single responsibility and maintainability?

Python code cleanup specifies requirements for consistent naming, clear intent, and modularization, ensuring single-responsibility functions that improve maintainable structure and reduce obscured logic across reviewed modules.

When should I avoid refactoring if/else statements with polymorphism in Python?

Python code cleanup applies guardrails for safe changes, ensuring refactoring preserves behavior while improving clarity. It applies single-responsibility functions and modularization to legacy modules without altering existing functionality.