一键导入
code-runner
Execute Python code snippets in a sandboxed environment. Supports data analysis, visualization, and quick scripts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Execute Python code snippets in a sandboxed environment. Supports data analysis, visualization, and quick scripts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create and edit PowerPoint (.pptx) presentations programmatically. Requires python-pptx.
Create and edit Excel (.xlsx) workbooks with openpyxl. Supports formulas, charts, formatting, and data analysis.
Generate images via DALL-E, Stable Diffusion, or free alternatives. Supports multi-channel delivery.
Generate meme images with text overlays using Pillow. Pick templates or create custom image macros.
GitHub CLI for issues, PRs, code search, CI logs, releases, and API queries. Requires gh CLI and auth.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
| name | code-runner |
| description | Execute Python code snippets in a sandboxed environment. Supports data analysis, visualization, and quick scripts. |
| version | 1.0.0 |
| metadata | {"echo":{"tags":["Python","Code","Execute","Sandbox","DataAnalysis"]}} |
Safe Python code execution with resource limits and import restrictions.
python3 scripts/safe_exec.py "print(sum(range(100)))"
python3 scripts/safe_exec.py --file script.py
python3 scripts/safe_exec.py --timeout 10 "import time; time.sleep(5); print('done')"
Best-effort guards (NOT a true sandbox — code can still read the filesystem):
os.system, subprocess, shutil.rmtree, __import__('os')Limitations: This is NOT a security sandbox. The child process can read arbitrary files on the host filesystem. For untrusted code, use a container-based executor (e.g., docker-manage skill) instead.
Safe for use (common data/analysis):
math, statistics, decimal, fractionsjson, csv, re, datetime, collectionspandas, numpy (if installed)matplotlib (saves to file, no display)BLOCKED = [
"os.system", "os.exec", "os.popen", "os.remove",
"subprocess", "shutil.rmtree", "importlib",
"__import__", "eval(", "exec(",
"open('/etc", "open('/root",
]
Data analysis:
import pandas as pd
df = pd.read_csv("/tmp/data.csv")
print(df.describe())
print(df.groupby("category")["amount"].sum())
Quick plot (saved to file):
import matplotlib.pyplot as plt
plt.plot([1,2,3,4], [1,4,2,3])
plt.savefig("/tmp/plot.png")
print("Plot saved to /tmp/plot.png")