python-executor
在沙盒环境中执行 Python 代码
也可从以下获取: skillssh,inference-sh-skills,inferen-sh,infsh-skills,inference-sh-9,inference-skills,inference-sh
配置带有专用库的 Python 环境需要花费时间和精力。本技能可通过简单的 CLI 命令在远程沙盒中运行 Python 代码,预装 100+ 库。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“python-executor”。 在沙盒中运行 print('Hello, World!')
预期结果:
Hello, World!
正在使用“python-executor”。 根据销售数据生成柱状图并保存到 outputs/
预期结果:
图表已保存!输出文件:outputs/chart.png(PNG 图像,480x360 像素)
正在使用“python-executor”。 抓取 https://api.github.com/users/octocat 并打印 JSON 响应
预期结果:
包含用户资料数据的 JSON 响应,包括 login、id、avatar_url 和 public_repos 等字段,并进行缩进格式化
安全审计
低风险This skill is a documentation-only skill that describes how to invoke the inference.sh Python execution service via the belt CLI. The static analyzer flagged 70 patterns, but all are false positives: 'Ruby/shell backtick execution' findings are Markdown formatting for code spans (e.g., `belt login`), 'Python HTTP libraries' are example code shown in documentation, 'Hardcoded URL' findings are legitimate service URLs and example endpoints, and the 'Weak cryptographic algorithm' and 'Network reconnaissance' findings are triggered by the words 'safe' and 'isolated subprocess' with no actual crypto or network recon code present. The allowed-tools is narrowly scoped to Bash(belt *) and code execution occurs remotely in inference.sh's sandbox, not locally. No prompt injection, data exfiltration, or malicious intent detected.
低风险问题 (2)
风险因素
质量评分
你能构建什么
网页抓取与数据提取
使用 BeautifulSoup 或 Selenium 从网站提取数据,然后将结果保存到文件。非常适合研究和数据收集任务。
带可视化的数据分析
使用 Pandas 处理数据集,并使用 Matplotlib 或 Plotly 创建图表。输出文件会自动从沙盒返回。
媒体处理与生成
使用 PIL 处理图像,使用 MoviePy 制作视频,或使用 trimesh 处理 3D 模型。所有输出文件都会被自动捕获。
试试这些提示
在沙盒中运行以下 Python 代码:print('Hello, World!')使用 python-executor 抓取 https://example.com,并使用 requests 和 BeautifulSoup 打印页面标题。
使用 python-executor 创建一个展示销售数据的柱状图:Alice 有 100 单销售,Bob 有 150 单。将图表保存到 outputs/chart.png。
使用 python-executor 创建一个 3 秒的视频,蓝色背景上显示白色文字"Hello!"。使用 MoviePy 保存到 outputs/hello.mp4,超时时间设为 120 秒。
最佳实践
- 将输出文件保存到 outputs/ 目录,以便自动从沙盒返回
- 使用 plt.savefig() 而不是 plt.show(),因为沙盒是非交互式的
- 对于超过默认 8GB 限制的大型数据集,请使用 high_memory 变体(16GB RAM)
避免
- 不要尝试安装包 - 只能使用 100+ 预装库
- 避免运行超过 300 秒超时限制的长时间脚本
- 不要使用 plt.show() 或其他交互式显示函数 - 沙盒无法显示它们