kata-python-refactor
OfficialRefactor Python safely with tests as a net.
Authorguardiatechnology
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It helps you refactor existing Python code without accidentally changing behavior, by using test coverage and incremental, verifiable transformations.
Core Features & Use Cases
- Assess and protect behavior with coverage: confirm what is currently tested and add missing characterization tests before making changes.
- Plan risk-minimized refactoring steps: split work into small, independently committable transformations that can be validated by running the suite.
- Execute with continuous verification: enforce tight feedback loops using Ruff, Black/format checks, mypy, and pytest after each step.
- Use Case: when a module is hard to maintain (e.g., a “god class” or entangled infrastructure/domain logic), you can progressively rename, extract, and reorganize while keeping endpoints and outputs unchanged.
Quick Start
Run the test suite for the target module with coverage, add characterization tests if needed, then apply small refactoring steps while verifying with ruff, mypy, and pytest after each commit.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 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: kata-python-refactor Download link: https://github.com/guardiatechnology/design-system/archive/main.zip#kata-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.