---
name: "code-interpreter-sandbox-executor"
description: "Empower agents with a stateful Python REPL for exact mathematics, plotting, and file manipulation."
metadata:
  author: "OpenAI"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "execute python code in agent"
  - "solve math with code interpreter"
  - "generate charts python repl"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Python Code Interpreter Sandbox Executor

Connects language models to a stateful Python execution environment: evaluating mathematical equations, running data transformations with Pandas, rendering Matplotlib charts, and capturing stdout.

## When to Invoke
Invoke this skill whenever you need to:
- execute python code in agent
- solve math with code interpreter
- generate charts python repl

## Execution SOP & Rules
1. Delegate all non-trivial arithmetic, sorting, and statistical calculations to the Python interpreter.
2. Capture stdout, stderr, and returned expression values cleanly into observation blocks.
3. Save generated visualization plots to disk and return accessible file paths to the user.
4. Isolate interpreter sessions inside containerized or WASM environments to prevent host damage.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
