一键导入
pyodide-runtime
Use when writing or fixing Python for run_python — browser WASM Pyodide contract, forbidden APIs, package substitutes, and webagent.http.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when writing or fixing Python for run_python — browser WASM Pyodide contract, forbidden APIs, package substitutes, and webagent.http.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when shell commands fail, npx/curl/git won't run, or you must choose run_shell vs web_fetch vs file tools in Nodebox vs host.
Use when the user says remember this, save a preference or API key, or you must pick memory_save vs session notes vs skill (action=manage) vs wiki_* tools.
Use when the input is an image, screenshot, diagram, PDF/DOCX, audio file, or YouTube link—extract metadata/text before reasoning.
Use when the user wants to discover, search, or install agent skills from online registries—top results by installs, stars, or votes. Or user sends /find_skills.
Use when calling REST or GraphQL APIs with web_fetch/web_post — auth headers, query params, GraphQL shape, Directus GraphQL mutations/relations, discovery order, and reading error bodies.
Use when the user or agent installs a skill from skills.sh or GitHub — map WebFetch, Bash, Python, Playwright, and MCP references to Web Agent built-ins.
| name | Pyodide Runtime |
| description | Use when writing or fixing Python for run_python — browser WASM Pyodide contract, forbidden APIs, package substitutes, and webagent.http. |
| version | 1.0.0 |
| category | bundled |
| primary-tools | ["run_python","web_fetch","web_post","web_upload","skill"] |
| tags | ["pyodide","python","wasm","browser","run_python","micropip","webagent.http"] |
| triggers | ["run_python","pyodide","python script","micropip","browser python","wasm python","python in browser","incompatible python"] |
| Need | Use |
|---|---|
| Run Python in workspace | run_python (code or path, optional cwd, env, packages, timeout_ms) |
| One-off REST from agent | web_fetch / web_post / web_upload — not requests in chat args |
HTTP inside a reusable .py | import webagent.http as http (proxy-backed) |
| File bytes to API | http.upload_file in script, or agent web_upload |
| Shell / git / curl / npx | browser-runtime-map — not available in Nodebox |
| Import map & blocks | Static preflight before worker; see browser-runtime-map Pyodide table |
Non-negotiable: Read this skill (or skill (action=view) browser-runtime-map) before generating Python. Capability manifest: src/runtimes/webcontainer/pyodide-capabilities.json. Substitution patterns: src/runtimes/webcontainer/pyodide-substitution-matrix.json.
run_python call or skill script that will execute in the browser.pyodide_* errors.Not for: simple PDF/DOCX text extraction — try pdf_extract / docx_extract first.
Your execution environment is not native Python.
| Fact | Implication |
|---|---|
| Pyodide + WASM in a browser tab | No OS, no Docker, no real /home/user |
| Virtual Emscripten FS | Write under run_python cwd; host mirrors workspace |
| No subprocess / native binaries | No soffice, git, ffmpeg, pdftoppm, tesseract, … |
| No raw TCP | No psycopg2, pymongo, redis, socket.create_connection |
| Networking = browser fetch | CORS + /api/proxy; use webagent.http or agent HTTP tools |
| Threads limited | Prefer async + await asyncio.sleep(0) for long work |
| Packages | Stdlib, Pyodide wheels (auto-loaded), micropip allowlist only |
subprocess, multiprocessing, os.system, pty, pexpect, signal, resource, pwd, grp, fcntl, asyncio.create_subprocess_exec, playwright, selenium, torch, tensorflow, cv2, pdf2image, host DB drivers opening TCP.
threading for parallelism, raw socket clients, requests/httpx for new code (use webagent.http), sys.stdout.reconfigure, LD_PRELOAD / ctypes.CDLL("*.so"), unbounded sync loops.
web_fetch / web_post / web_uploadimport webagent.http as httpjson, csv, pathlib, zipfile, re, hashlib, …pypdf, python-docx, openpyxl, Pillow, numpy, … (often auto-loaded)pyodide.http.pyfetch only when same-origin/CORS allows direct fetchIf any answer is wrong → redesign (see substitution matrix).
# Good — inside run_python
import webagent.http as http
resp = http.get("https://api.example.com/data")
data = resp.json()
# Bad — host assumptions
import requests
requests.get("http://localhost:3000")
browser-runtime-maphttp-apiimported-skill-compat (script_warnings from preflight)zipfile here; extract: extract_archiverun_shell python3 as full CPython — use run_python with Pyodide rules.pip install in script — use packages arg or preflight auto-load / micropip allowlist.~/.config, /var/tmp, or persistent paths outside workspace cwd.web_upload / http.upload_file.subprocess.run(["git", …]) or os.system("curl …") in browser Python.import playwright / from pdf2image import convert_from_path after preflight already warned.while True: pass without timeout_ms on the tool call.