Python refactor
Skill adryledo/arca-cli/samples/maintainer/skills/python-refactor
Guidance for refactoring Python code to improve clarity and maintainability. Use this skill when the user asks to simplify Python logic, restructure functions, or improve code quality.From its SKILL.md
npx -y skills add adryledo/arca-cli --skill python-refactorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
1.3 KB, 212 tokens by cl100k_base, as published. Nobody here has run it
Python Refactor Skill
This skill provides practical steps for improving Python code structure and readability.
Goals
- Improve maintainability
- Simplify complex logic
- Clarify naming and responsibilities
- Remove unused or redundant code
Recommended Process
1. Analyze the structure
Identify:
- Functions, classes, modules
- Deep nesting or long functions
- Side effects and repeated logic
2. Detect common issues
Look for:
- Unclear naming
- Duplicate logic
- Unreachable code
- Long parameter lists
- Mutable default arguments
3. Apply refactoring techniques
Use patterns such as:
- Extract Function
- Inline Variable
- Replace Temp with Query
- Introduce Parameter Object
- Remove Dead Code
- Simplify Conditional Expressions
4. Produce output
Return:
- The refactored code
- A short explanation of changes
- Any recommended follow‑up improvements
Example
Input
What ships with it: 1 file
168 B alongside SKILL.md, 1 of them executable
scripts/
- process.pyruns168 B