s-python-refactor
CommunityRefactor Python code with best practices
Authorgyarra
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Refactor Python code to improve readability, maintainability, and correctness by enforcing Single Responsibility, Pythonic idioms, explicit type hints, robust error handling, consistent naming, and test-friendly structure. It guides developers to perform deliberate, staged refactors rather than ad-hoc rewrites.
Core Features & Use Cases
- SRP-first: Break large modules into focused functions and classes with clear responsibilities.
- Type hints & idioms: Introduce modern Python typings, idiomatic constructs, and safer patterns.
- Testing-friendly: Preserve behavior while improving testability; provide rationale for changes.
- Use Case: You have a legacy module with tangled logic; refactor into smaller, well-named components with explicit interfaces ready for unit tests.
Quick Start
Refactor the provided Python function to follow SRP and typing guidelines, producing a clean, well-structured version suitable for testing.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: s-python-refactor Download link: https://github.com/gyarra/cine_medallo_2/archive/main.zip#s-python-refactor Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.