xpr-code-sandbox

Web & Frontend Development
v0.2.11
Benign

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

586 downloads586 installsby @paulgnz

Setup & Installation

Install command

clawhub install paulgnz/xpr-code-sandbox

If the CLI is not installed:

Install command

npx clawhub@latest install paulgnz/xpr-code-sandbox

Or install with OpenClaw CLI:

Install command

openclaw skills install paulgnz/xpr-code-sandbox

or paste the repo link into your assistant's chat

Install command

https://github.com/openclaw/skills/tree/main/skills/paulgnz/xpr-code-sandbox

What This Skill Does

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.

When to Use It

  • 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
View original SKILL.md file
## Code Sandbox

You have sandboxed JavaScript execution tools for computation and data processing:

**Full scripts:**
- `execute_js` — run JavaScript code in an isolated V8 sandbox
  - Pass data via the `input` parameter (JSON) — access it as `INPUT` in your code
  - Use `console.log()` to capture intermediate values (returned in `logs` array)
  - Available globals: `JSON`, `Math`, `Date`, `Array`, `Object`, `String`, `Number`, `RegExp`, `Map`, `Set`, `parseInt`, `parseFloat`, `isNaN`, `isFinite`, `encodeURIComponent`, `decodeURIComponent`, `atob`, `btoa`
  - No network access, no filesystem, no imports — pure computation only
  - Default timeout 5 seconds, max 30 seconds
  - 10MB output limit

**Quick expressions:**
- `eval_expression` — evaluate a single JavaScript expression and return the result
  - Use for quick math: `"15 * 4500 * 0.01"` → `675`
  - Date calculations: `"new Date().toISOString()"`
  - Array operations: `"[1,2,3].map(x => x*x)"` → `[1, 4, 9]`

**Best practices:**
- Use `execute_js` for multi-step data processing, algorithm testing, code validation
- Use `eval_expression` for quick math, string ops, date calculations
- Pass large datasets via `input` parameter rather than embedding in code
- Combine with `parse_csv` (structured-data skill) for CSV → transform → output workflows
- Combine with `store_deliverable` to save computed results as job evidence

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: Calculate compound interest across a loan schedule

AGENT
  1. 1Calculate compound interest across a loan schedule
  2. 2Transform and reshape a JSON API response
  3. 3Validate a sorting algorithm before deploying
  4. 4Convert a CSV of numbers into aggregated statistics
  5. 5Compute date differences and format timestamps
OUTPUT
Execute JavaScript code in a sandboxed VM for data processing and computation.

Share this skill

Security Audits

VirusTotalBenign
OpenClawBenign
View full report

These signals reflect official OpenClaw status values. A Suspicious status means the skill should be used with extra caution.

Details

LanguageMarkdown
Last updatedFeb 25, 2026