python-manager
Installation
SKILL.md
Python Environment Manager Skill
Trigger On
- The user asks "How do I install a package?" or "Which package manager is this project using?".
- The user requests to add, remove, or update Python dependencies.
- Need to initialize a virtual environment or execute a Python script but unsure whether to use
uv run,poetry run, orpython. - The project lacks explicit environment configuration and needs recommendations for suitable tools.
Workflow
- Perceive:
- Scan the project root for characteristic files:
uv.lock,poetry.lock,pyproject.toml,requirements.txt. - Check the system environment to test if tools are installed: execute
uv --versionorpoetry --version.
- Scan the project root for characteristic files:
- Reason:
- Determine the tool the project should use based on characteristic files (Priority:
uv>Poetry>pip). - Check tool availability: If the project is determined to use
uvbut it's not installed, or if the user wants to switch touv/Poetrybut the environment is not ready, mark it as "Pending Installation".
- Determine the tool the project should use based on characteristic files (Priority:
- Act:
- Tool Installation Suggestion: If the tool is not installed, must ask the user first: "Detected that the project uses [Tool Name], but it is not installed in your environment. Would you like me to provide the installation command and assist with the installation?"
- Output Commands: Provide the correct operation commands for the identified management tool.
- Execute Changes: If the user agrees to installation or dependency changes, provide CLI commands for user confirmation.