跳到正文
TakoAPI
返回技能列表

xpr-code-sandbox

由 paulgnz 提供

Web & Frontend Development
586下载量由 clawskills.sh 提供
1浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Execute JavaScript code in a sandboxed VM for data processing and computation.

描述

该技能的功能

Runs JavaScript code in an isolated V8 sandbox with no network or filesystem access. Supports both full scripts via `execute_js` and quick single-expression evaluation via `eval_expression`. Data is passed in via JSON input and results are returned directly.

Lets an agent perform arbitrary computation mid-workflow without spinning up a separate runtime or exposing the host environment.

何时使用

  • Calculate compound interest across a loan schedule
  • Transform and reshape a JSON API response
  • Validate a sorting algorithm before deploying
  • Convert a CSV of numbers into aggregated statistics
  • Compute date differences and format timestamps

示例工作流

输入

User asks: 'Given this sales CSV, calculate total revenue per region and return sorted descending'

智能体
  1. 1

    Parse the CSV using the structured-data skill's parse_csv tool

  2. 2

    Pass the parsed rows as JSON via the input parameter to execute_js

  3. 3

    Write a script that groups rows by region and sums revenue values

  4. 4

    Sort the resulting object entries by value descending

  5. 5

    Return the formatted result and store it with store_deliverable

输出

A JSON array of { region, totalRevenue } objects sorted highest to lowest

安装

clawhub install paulgnz/xpr-code-sandbox

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接