A shared convention for preparing and using Python environments in skills
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What variant of Codex are you using?
Codex integrated into the ChatGPT app for macOS.
- ChatGPT app: 26.901.51231 (build 8109)
- macOS: 26.6.2 (25G83), arm64
What feature would you like to see?
Could skills have a shared convention for preparing and using their Python environments, alongside the format used to describe skills themselves?
It could build on the environment requirements authors already describe, clarify how to prepare the Python environment, and ensure the skill's commands use it. Once that environment is ready, using the same skill again would not require repeating missing-dependency troubleshooting and temporary setup. The convention could also cover environment requirements changing when a skill is updated.
uv may be worth considering as one way to support this convention.
Additional information
Problem and impact
The Agent Skills specification already provides a compatibility field for describing environment requirements, and its script guidance recommends self-contained scripts or clearly documented dependencies. The gap is how those requirements lead to a prepared Python environment and how script commands consistently use it.
Some official skills run Python from PATH, some use Python supplied by Codex, and some ask the agent to install packages and activate an environment. The agent must work out how to prepare and select the environment from each skill's instructions.
This can repeatedly interrupt ordinary work. skill-creator is a particularly costly example: when the selected Python lacks PyYAML, creating or updating a skill reaches the official validation step and stops with a missing-dependency error (#33022, #36245). Codex then has to diagnose the environment and find a way to run the validator, potentially asking the user to intervene.
Codex may get past that failure by creating a temporary environment and installing the package. But unless later invocations reuse a suitable environment, the next task using the skill can hit the same error and repeat the diagnosis and setup. This wastes time and turns a routine validation step into recurring environment troubleshooting.
Providing the packages somewhere is also insufficient: python3 script.py can still select a different Python from PATH. Having the dependencies available and selecting the interpreter that can use them are separate parts of the same problem.
Even when a script runs successfully, different Python or package versions may change its behavior or output, making results harder to reproduce across sessions and machines.
| Official skill | Command or instruction | How Python is selected | Package setup | Related reports |
|---|---|---|---|---|
skill-creator |
scripts/quick_validate.py … |
Python from PATH. The script's first line specifies #!/usr/bin/env python3. |
Requires PyYAML; no setup step documented. | Reported: #33022, #36245. |
plugin-creator |
python3 scripts/validate_plugin.py … |
Python from PATH. | Requires PyYAML; no setup step documented. | Reported: #36245 comment. |
documents |
python scripts/…; separately requires Python supplied by Codex. |
The example selects Python from PATH. The agent must reconcile the example command with the separate requirement to use Python supplied by Codex. | Packages supplied by Codex. | — |
spreadsheets |
Use load_workspace_dependencies to find Python for analysis. |
Python supplied by Codex. The agent uses the path returned by the tool. | Packages supplied by Codex. | — |
presentations |
Get the Python path with load_workspace_dependencies; pass it as pythonExecutable. |
Python supplied by Codex. Its path is passed explicitly to the slide-validation workflow. | Packages supplied by Codex. | — |
pdf |
Prefer Python supplied by Codex; no fixed script command. | Chosen by the agent. The linked report describes Python from PATH being used. | Packages supplied by Codex. If missing, install with uv pip install, or python3 -m pip install when uv is unavailable. |
Reported: #37333. |
imagegen |
When using the image-generation script, activate a Python environment, then run python "$IMAGE_GEN" …. |
Python from PATH. Activating the environment determines which Python is found. | Requires openai for API calls; pillow is optional for image processing. Shows uv installation commands, but does not specify a target Python environment. |
— |
skill-installer |
scripts/list-skills.py … and other scripts. |
Python from PATH. The script's first line specifies #!/usr/bin/env python3. |
No third-party packages; uses Python's standard library and files shipped with the skill. | — |
visualize |
python3 scripts/render.py … |
Python from PATH. | No third-party packages; uses Python's standard library. | — |
google-calendar-daily-brief |
python3 scripts/render_day_brief.py … |
Python from PATH. | No third-party packages; uses Python's standard library. | — |
Relationship to existing discussions
#41177 focuses on installing and preserving plugin dependencies and also notes reliance on host Python. This issue focuses on Python environments for skills, particularly how their documented commands select the prepared environment across repeated uses, including skills installed without plugins.
A comment on #36245 already asks for managed dependencies and documented commands that use the same interpreter for the bundled authoring scripts. This request extends that concern to a shared convention for Python scripts across skills.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Agent Skills specification and the listed official skill commands, especially skill-creator, plugin-creator, documents, spreadsheets, presentations, pdf, and imagegen. Compare how each selects Python and installs packages, then define the scope of a shared convention. Done should include an agreed approach for environment preparation, interpreter selection, dependency updates, and reuse across skill invocations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100