sandbox-executor

sandbox-executor is a skill for Claude Code from claude-office-skills/claude-office-plugin. It costs 27 tokens per session (1,124 once invoked), scanned C, original, MIT.

A sandboxed runner for Python and Shell scripts, keeping execution isolated from the main workspace.

In plain words
What is it for?
Use it to collect outside data, run calculations, scrape web pages, or prepare results that can then be written into a spreadsheet.
Why use it?
It lets an agent run scripts, install optional Python packages, call external APIs, or fetch web data without running them directly in the main environment.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-wps-excel plugin — 26 skills, 14 commands, 8 agents, 2 MCP servers shipped together

Good fit Use it to collect outside data, run calculations, scrape web pages, or prepare results that can then be written into a spreadsheet.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/claude-office-skills/claude-office-plugin/sandbox-executor
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.

Any agent
npx skills add claude-office-skills/claude-office-plugin --skill sandbox-executor
Clone the repo
git clone --depth 1 https://github.com/claude-office-skills/claude-office-plugin

Made for: Claude Code.

Or install claude-wps-excel, the plugin that ships this one along with the rest of its 26 skills, 14 commands, 8 agents, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sandbox-executor

README.md
[![agentmods](https://agentmods.dev/badge/skills/claude-office-skills/claude-office-plugin/sandbox-executor/github.svg)](https://agentmods.dev/skills/claude-office-skills/claude-office-plugin/sandbox-executor)
Your own site
<a href="https://agentmods.dev/skills/claude-office-skills/claude-office-plugin/sandbox-executor"><img src="https://agentmods.dev/badge/skills/claude-office-skills/claude-office-plugin/sandbox-executor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sandbox-executor

Your own site · 80×15
<a href="https://agentmods.dev/skills/claude-office-skills/claude-office-plugin/sandbox-executor"><img src="https://agentmods.dev/badge/skills/claude-office-skills/claude-office-plugin/sandbox-executor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,124 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 3 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00027 $0.01124
Opus 5 $0.00014 $0.00562
Sonnet 5 $0.00005 $0.00225
Haiku 4.5 $0.00003 $0.00112

Measured 11d ago against content hash c2c289e0303b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade C, and why

sandbox-executor scanned grade C with 3 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 11d ago.

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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -s "https://api.exchangerate-api.com/v4/latest/USD" | python3 -c "

Makes network callslowCapability

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

keywords: [python, pip, 爬虫, 抓取, scrape, crawl, 脚本, script, 下载, 安装, shell, bash, 命令行, terminal, 终端, pandas, numpy, requests, beautifulsoup, selenium, playwright, google play, app store, 评论, reviews, 数据采集, 数据抓取, 网页抓取, api调

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

4. **pip 依赖声明在 options 中**:不要在 Python 代码里写 `os.system("pip install ...")`
skills/bundled/sandbox-executor/SKILL.md · 130 lines

How it starts

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

沙盒执行器

当任务需要 Python 或 Shell 脚本(如安装第三方库、调用外部 API、网页抓取),使用 sandboxExec() 在安全沙盒中执行。

核心函数

var result = sandboxExec(language, code, options);
参数 类型 说明
language string "python""shell"
code string 要执行的代码
options.pip string[] Python 依赖包列表(可选)
options.timeout number 超时秒数,默认 60,最大 120

返回值

{
  "ok": true,
  "stdout": "脚本输出内容",
  "stderr": "错误信息(如有)",
  "exitCode": 0,
  "timedOut": false
}

使用模式

核心原则:sandboxExec 获取数据 → WPS 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 + " 条评论数据";

常见场景

网页数据抓取
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 库
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 });

Read the full file on GitHub · 130 lines

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. 11d ago First seen · 130 lines · 27 tokens per session scan C c2c289e0303b

Subscribe to this mod's changes

sandbox-executor is a skill published in the GitHub repository claude-office-skills/claude-office-plugin (9 stars, last pushed 5mo ago), licensed MIT. It adds 27 tokens to every session and 1,124 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 3 findings (downloads and executes remote code, makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens