Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/claude-office-skills-sandbox-executor
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/sandbox-executor
What's inside
- Skill name
sandbox-executor- Description
- 沙盒执行器 — 在安全隔离环境中运行 Python/Shell 脚本获取外部数据
- License
- MIT
- Instructions
- 121 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
## 沙盒执行器
当任务需要 Python 或 Shell 脚本(如安装第三方库、调用外部 API、网页抓取),使用 `sandboxExec()` 在安全沙盒中执行。
### 核心函数
```javascript
var result = sandboxExec(language, code, options);
```
| 参数 | 类型 | 说明 |
|------|------|------|
| language | string | `"python"` 或 `"shell"` |
| code | string | 要执行的代码 |
| options.pip | string[] | Python 依赖包列表(可选) |
| options.timeout | number | 超时秒数,默认 60,最大 120 |
### 返回值
```json
{
"ok": true,
"stdout": "脚本输出内容",
"stderr": "错误信息(如有)",
"exitCode": 0,
"timedOut": false
}
```
### 使用模式
**核心原则:`sandboxExec` 获取数据 → WPS JavaScript 写入表格**
```javascript
// 第一步:在沙盒中用 Python 获取数据
var result = sandboxExec("python", `
import json
from google_play_scraper import reviews, Sort
result, _ = reviews(
'com.example.app',
lang='zh',
country='cn',
sort=Sort.NEWEST,
count=50
)
print(json.dumps(result, ensure_ascii=False, default=str))
`, { pip: ["google-play-scraper"], timeout: 90 });
if (!result.ok) return "Python 执行失败: " + result.error;
// 第二步:解析数据并写入表格
var data = JSON.parse(result.stdout);
var ws = Application.ActiveSheet;
ws.Range("A1").Value2 = "用户名";
ws.Range("B1").Value2 = "评分";
ws.Range("C1").Value2 = "评论";
ws.Range("D1").Value2 = "日期";
for (var i = 0; i < data.length; i++) {
var row = i + 2;
ws.Range("A" + row).Value2 = data[i].userName || "";
ws.Range("B" + row).Value2 = data[i].score || 0;
ws.Range("C" + row).Value2 = (data[i].content || "").substring(0, 200);
ws.Range("D" + row).Value2 = data[i].at || "";
}
return "已写入 " + data.length + " 条评论数据";
```
### 常见场景
#### 网页数据抓取
```javascript
var result = sandboxExec("python", `
import json, urllib.request
url = "https://api.example.com/data"
resp = urllib.request.urlopen(url)
data = json.loads(resp.read())
print(json.dumps(data))
`, { timeout: 30 });
```
#### 使用第三方 Python 库
```javascript
var result = sandboxExec("python", `
import json, pandas as pd
df = pd.read_csv("https://example.com/data.csv")
print(df.to_json(orient="records", force_ascii=False))
`, { pip: ["pandas"], timeout: 60 });
```
#### Shell 命令
```javascript
var result = sandboxExec("shell", `
curl -s "https://api.exchangerate-api.com/v4/latest/USD" | python3 -c "
import sys, json
data = json.load(sys.stdin)
print(json.dumps(data['rates']))
"
`, { timeout: 30 });
```
### 关键规则
1. **始终在一个 JavaScript 代码块中完成**:`sandboxExec()` 获取数据 + WPS API 写入表格
2. **Python 输出必须是 JSON**:在 Python 脚本末尾用 `print(json.dumps(...))` 输出结构化数据
3. **检查 `result.ok`**:沙盒执行可能失败,必须处理错误
4. **pip 依赖声明在 options 中**:不要在 Python 代码里写 `os.system("pip install ...")`
5. **超时保护**:默认 60 秒,大数据量任务设 90-120 秒
6. **不要在沙盒中操作表格**:沙盒是隔离环境,无法访问 WPS API。数据必须通过 JSON 传回
### 不适用场景
- 简单的 WPS 表格操作(直接用 JavaScript)
- 已有 Data Bridge 连接器的数据源(用 `dataBridgePull`)
- 需要持久化状态的服务(沙盒是一次性的)From claude-office-skills/claude-office-plugin, MIT.
More from claude-office-skills/claude-office-plugin
- 0.466score
equity-valuation-framework
claude-office-skills
Provides a decision-grade equity valuation playbook and report standard (multiples, DCF, quality assessment, scenarios, margin of safety); used when users…
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
formula-operations
claude-office-skills
公式运算规范 — .Formula 写入、常用公式模板、纠错方法、WPS 特有限制
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
local-access
claude-office-skills
macOS 本地计算机操作 — 日历、通讯录、邮件、提醒、Finder、剪贴板、浏览器、应用控制
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
wps-core-api
claude-office-skills
WPS ET API 核心参考 — 全局变量、Range 读写、格式化、工作表操作、禁用 API
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
financial-data
claude-office-skills
金融数据连接器 — 通过 Data Bridge 获取实时股票、财务报表、估值比率等结构化数据
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
sensortower
claude-office-skills
SensorTower 移动应用数据连接器 — App 下载量、收入、DAU/MAU 数据
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
chart-creation
claude-office-skills
WPS 图表创建 — AddChart2 方法、图表类型、配色方案、最佳实践
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
code-rules
claude-office-skills
WPS 代码生成规则 — 单块规则、禁止拆分、数据保护、新建工作表模式
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
data-analysis
claude-office-skills
数据解读与分析 — 统计方法、趋势分析、透视汇总、结论输出规范
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
data-cleaning
claude-office-skills
数据清洗最佳实践 — 空值处理、去重、格式统一、异常值检测、分列操作
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
financial-modeling
claude-office-skills
投行级金融建模引擎 — 公式驱动的多Sheet专业DCF/估值模型
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
equity-valuation
claude-office-skills
股票估值报告引擎 — 数据质量门控/多方法估值/质量评估/风险矩阵/决策框架的 Excel 完整估值工作簿
SkillDFreshness: D★ 9Claude Code +9
Signals
- Stars
- 9
- Forks
- 3
- Open issues
- 0
- Last commit (this folder)
- Mar 9, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from claude-office-skills
- 0.549score
amazon-seller
claude-office-skills
Trigger: amazon-seller, Automate Amazon seller operations including inventory, orders, pricing, and advertising management.
SkillBFreshness: B★ 1Claude Code +9 - 0.466score
equity-valuation-framework
claude-office-skills
Provides a decision-grade equity valuation playbook and report standard (multiples, DCF, quality assessment, scenarios, margin of safety); used when users…
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
local-access
claude-office-skills
macOS 本地计算机操作 — 日历、通讯录、邮件、提醒、Finder、剪贴板、浏览器、应用控制
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
financial-data
claude-office-skills
金融数据连接器 — 通过 Data Bridge 获取实时股票、财务报表、估值比率等结构化数据
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
sensortower
claude-office-skills
SensorTower 移动应用数据连接器 — App 下载量、收入、DAU/MAU 数据
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
wps-core-api
claude-office-skills
WPS ET API 核心参考 — 全局变量、Range 读写、格式化、工作表操作、禁用 API
SkillDFreshness: D★ 9Claude Code +9
Cite this page
sandbox-executor skill. Agent Mart. https://agentmart.dev/skills/claude-office-skills-sandbox-executor (last updated 2026-10-24)