By rvantonder
Restricts Claude to a pure Python code execution environment, blocking file operations and shell commands, while providing an MCP server for running Python code via a sandboxed tool.
A Claude Code plugin that restricts Claude to ONLY use Python code execution. All other tools are blocked, creating a pure computational environment.
execute_code - One Tool to Rule Them All. Execute Python code and capture results.Claude can only run Python code and is forced to write and execute code to do any real work. This creates a constrained environment ideal for deterministic, computational tasks.
Note: This is experimental. A demo. It may not work for you. It is not production-ready. Use at your own risk.
git clone https://github.com/rvantonder/execute_code_py.git
cd execute_code_py
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
claude --plugin-dir .
Now your Claude session can ONLY execute Python code!
You: randomly generate 1000000 numbers between 0 and 100000 and sort them
Claude
⏺ code-executor - execute_code (MCP)(code: "...")
⎿ PreToolUse:mcp__code-executor__execute_code hook succeeded: Success
⎿
import numpy as np
import time
# Generate 1,000,000 random numbers between 0 and 100,000
gen_start = time.time()
numbers = np.random.randint(0, 100001, size=1000000)
gen_time = time.time() - gen_start
# Sort the numbers
sort_start = time.time()
sorted_numbers = np.sort(numbers)
sort_time = time.time() - sort_start
...
You: Create a bar chat of a binomial distribution in svg
...
Claude Code is not inherently set up to enable what Code-Only aspires to. For example:
Native support would provide a much better UX:
Nevertheless, the concept stands!
How it works--
Exposes the execute_code tool with:
result variable, handles large outputs to temp filesA PreToolUse hook that:
mcp__code-executor__execute_codeTeaches Claude about:
See these as tweakable harness parameters.
{
"name": "execute_code",
"description": "Execute Python code. Set a 'result' variable to return data.",
"parameters": {
"code": {
"type": "string",
"description": "Python code to execute",
"required": true
},
"working_dir": {
"type": "string",
"description": "Working directory (default: current directory)",
"required": false
}
}
}
{
"success": true/false,
"result": "<value of result variable>",
"stdout": "<captured output>",
"stderr": "<captured errors>",
"result_file": "<path if result too large>",
"error": "<error message if failed>"
}
Matches all tools
Hooks run on every tool call, not just specific ones
Admin access level
Server config contains admin-level keywords
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub rvantonder/execute_code_py --plugin execute_code_pyAchieve flow state safely with Claude Code. Auto-approves routine work, gates risky actions, hard-blocks dangerous patterns. Dual enforcement (skill + hooks), token cap for cost governance, full audit trail. Zero dependencies.
A secure runtime for Claude Code. Intercepts every tool call with policy-based allow/block/ask decisions, evasion detection, path fencing, file snapshots, and audit logging.
Smart command safety filter for Claude Code — parses shell pipelines and evaluates per-command safety rules to auto-approve safe commands and block dangerous ones
Harness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
A growing collection of Claude-compatible academic workflow bundles. Covers scientific figures, manuscript writing and polishing, reviewer assessment, citation retrieval, data availability, paper reading, literature search, response letters, paper-to-PPTX conversion, and evidence-grounded Chinese invention patent drafting. Rules are organized as reusable skill folders with explicit workflows and quality checks.