python-runtime

A guide for installing, upgrading, switching, and troubleshooting Python and pip environments. Python is a programming language, while pip installs Python packages.

In plain words
What is it for?
Use it to install Python, manage multiple Python versions, create virtual environments, configure pip, and diagnose runtime or package problems.
Why use it?
It helps resolve problems such as missing Python commands, broken package imports, incompatible versions, virtual-environment issues, and installation errors.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/desirecore/market/python-runtime
Any agent
npx skills add desirecore/market --skill python-runtime
Clone the repo
git clone --depth 1 https://github.com/desirecore/market

Made for: Claude Code, Codex.

Per session 228 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,868 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00228 $0.02868
Opus 5 $0.00114 $0.01434
Sonnet 5 $0.00046 $0.00574
Haiku 4.5 $0.00023 $0.00287

Measured yesterday against content hash fb3b0b4b599c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

python-runtime scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/probe-python.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| Debian/Ubuntu | `sudo apt install python3 python3-pip python3-venv` |

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sk "${BASE}/python/available"
skills/python-runtime/SKILL.md · 219 lines

How it starts

The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.

python-runtime Skill

L0: One-line Summary

When to use: The user needs to install Python / upgrade Python / switch between multiple Python versions / configure pip / create virtual environments (venv / pipx / conda) / troubleshoot python: command not found, pip: command not found, PEP 668 "externally-managed", SSL certificates, import failures, PATH anomalies, and other Python runtime issues; or when another skill (docx / pdf / xlsx / pptx) reports "Python unavailable".

How to do it: Prefer DesireCore's built-in Hatch, executing through the four-tier fallback (HTTP API → Hatch CLI → system package manager brew/apt/dnf/winget → community solution pyenv).

L1: Overview and Use Cases

Capability Description

Procedural skill. Before each Python environment operation, first run scripts/probe-python.sh to obtain a JSON snapshot, then follow references/decision-tree (→ ../dev-environment-setup/references/decision-tree.md) to choose a path through the four-tier fallback.

Use Cases

  • "python not found" / "pip not found"
  • The user requests to install/upgrade Python
  • The user requests multi-version management (3.10/3.11/3.12 switching)
  • Create/activate/debug virtual environments (venv/pipx/conda)
  • "externally-managed-environment" (PEP 668) error
  • import failures, PATH issues, SSL certificate errors
  • Other skills (docx/pdf/xlsx/pptx) report Python unavailable

Core Value

  • DesireCore first: Hatch + HTTP API as mandatory L1/L2, avoiding pollution of system Python
  • JSON-driven decisions: the probe script outputs structured data that Claude can parse directly
  • Cross-platform consistency: macOS / Linux / Windows share a unified 4-tier fallback

L2: Detailed Specification

Step 1: Environment Probe (mandatory)

bash skills/python-runtime/scripts/probe-python.sh > /tmp/py-probe.json
cat /tmp/py-probe.json | jq .

For the meaning of output fields, see ../dev-environment-setup/references/probe-snapshot.md.

Read the full file on GitHub · 219 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 219 lines · 228 tokens per session scan B fb3b0b4b599c

Subscribe to this mod's changes

python-runtime is a skill published in the GitHub repository desirecore/market (2 stars, last pushed yesterday), licensed MIT. It adds 228 tokens to every session and 2,868 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.