Py Modernize
ListedPy Modernize automatically updates Python code to use modern features and best practices, improving maintainability and performance.
Install on your platform
Showing Claude Code. One command installs this skill into any of the agents below.
- 1
Run this in your project
terminal$ npx skills add l-mb/python-refactoring-skills --skill py-modernize -a claude-code Uses the open-source
skillsCLI and needs Node.js. Add-gto install it for your user instead of this project.
What we know about this skill
Publisher
l-mb
Taken from the source listing. We haven't verified who controls this account.
Install target
Live repository
Not pinned. Installing fetches whatever the repository holds at the time you run the command.
Automated safety checks
This skill failed 2 of 6 checks. A failure is not proof of bad intent; it means something in the code needs a human to look at it before you run it.
No undeclared network calls: failed
Contacts 1 host that is neither well-known infrastructure nor declared in the skill's frontmatter: astral.sh.
Every host the skill dials — from its scripts, its config endpoints or the commands it tells the agent to run — is either well-known package and API infrastructure or declared in its own frontmatter. Links in documentation are not counted.
Hosts contacted
astral.shundeclaredWhat it found
- skills/py-modernize/SKILL.md:47contacts astral.sh
# curl -LsSf https://astral.sh/uv/install.sh | sh
No pipe-to-shell installers: failed
Runs code fetched at install time in 1 place.
No `curl … | sh` pattern, in the code or in the instructions, that runs code fetched at run time.
What it found
- skills/py-modernize/SKILL.md:47remote script piped into a shell
# curl -LsSf https://astral.sh/uv/install.sh | sh
Declares what it does: passed
SKILL.md parses and declares a name and a description.
SKILL.md exists, its frontmatter parses, and it declares a name and a description.
No obfuscated payloads: passed
No encoded or obfuscated payloads.
No base64, hex or compressed blob is decoded and then executed, and no encoded shell commands.
No credential access: passed
Reads no keys, tokens, keychains or credential files.
Neither the code nor the SKILL.md instructions read SSH keys, cloud credentials, keychains, token stores, browser cookie databases or dotfiles that hold secrets.
Pinned to a commit: passed
Scanned l-mb/python-refactoring-skills at b08357109f.
The exact upstream commit SHA that was scanned is recorded, so the result refers to specific bytes.
- Commit
- b08357109f
- Manifest
- skills/py-modernize/SKILL.md
- Scanned
- 1 file, 293 lines
About this skill
What it does
The py-modernize skill automatically updates Python code to use modern language features and best practices. It handles things like replacing deprecated syntax, updating idioms, and improving overall code style based on current Python conventions. This helps maintain compatibility with newer Python versions and improves code readability.
When to use it
- Legacy Codebases: Modernize older Python 2 or early Python 3 code to take advantage of new features and improve maintainability.
- Code Style Enforcement: Ensure a consistent coding style across a project by automatically applying modern conventions.
- Preparing for Migration: Simplify the process of migrating to newer Python versions by proactively addressing compatibility issues.
- Refactoring Existing Code: Quickly update code to use more efficient or readable constructs without manual intervention.
Key capabilities
- Automatic conversion of deprecated syntax.
- Updates to reflect current Python idioms and best practices.
- Code style improvements based on modern conventions.
- Compatibility updates for newer Python versions.
Example prompts
- "Modernize this Python code: [paste code here]"
- "Update this file to use more modern Python features:
my_script.py" - "Refactor this function using current best practices: [paste function definition here]"
Tips & gotchas
- The skill requires a working Python environment and the
modernizepackage to be installed. Ensure these prerequisites are met before use. - While generally safe, always review the changes made by the skill, especially in critical code sections.