run-python-safely

Community

Safely run agent-generated Python code.

Authorlibertininick
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Automates safe execution of Python code generated by agents.

Core Features & Use Cases

  • AST-based analysis to detect and block dangerous operations before execution.
  • Supports running code inline or from files to fit into automated workflows.
  • Enforces a 5-minute timeout and exposes clear exit codes for blocked or timed-out runs.
  • Ideal for agent workflows and testing pipelines where Python code is dynamically produced.

Quick Start

Inline code: uv run python .claude/skills/run-python-safely/scripts/run_python_safely.py -c "print(2 + 2)" File-based: uv run python .claude/skills/run-python-safely/scripts/run_python_safely.py -f script.py

Dependency Matrix

Required Modules

None required

Components

scripts

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: run-python-safely
Download link: https://github.com/libertininick/chain-reaction/archive/main.zip#run-python-safely

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.