0
Refactor py
Netlik, performans ve Pythonic deyimler için Python kodunu yeniden düzenleyin.
yazan kuscubasiece·8 Eylül 2026
Kaynak: rohitg00/awesome-claude-code-toolkit · Apache-2.0
Netlik, performans ve Pythonic deyimler için Python kodunu yeniden düzenleyin.
Kaynak: rohitg00/awesome-claude-code-toolkit · Apache-2.0
mkdir -p .claude/commands && curl -sL https://www.antrophiclove.com/api/kaynak/refactor-py/raw -o .claude/commands/refactor-py.mdHedef dosya: .claude/commands/refactor-py.md
---
name: refactor-py
description: Refactor Python code for clarity, performance, and Pythonic idioms.
---
Refactor Python code for clarity, performance, and Pythonic idioms.
## Steps
1. Read the target Python file or module.
2. Identify refactoring opportunities:
3. Apply Pythonic improvements:
4. Improve code structure:
5. Improve error handling:
6. Run the tests to verify behavior is unchanged.
7. Run linting tools (ruff, flake8) to verify style compliance.
## Format
```
File: <path>
Refactorings Applied:
- <pattern replaced> -> <Pythonic alternative>
Lines Changed: <before> -> <after>
```
## Rules
- Never change behavior during refactoring.
- Run tests after every refactoring step.
- Follow PEP 8 style guidelines.