python-executor

Execute Python scripts with dependency checks, timeouts, and file safety restrictions.

Updated Mar 9, 2026
One-click install
npx skills add https://github.com/tocadaoncamod/agentes-ia-agno --skill python-executor-tocadaoncamod
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-executor
Source: https://github.com/tocadaoncamod/agentes-ia-agno/tree/main/.agent/skills/python-executor
Command: npx skills add https://github.com/tocadaoncamod/agentes-ia-agno --skill python-executor-tocadaoncamod

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps users write, test, and safely execute Python code while managing dependencies and avoiding destructive operations.

Core Features & Use Cases

  • Execution Best Practices: Guidance for planning code, placing imports at the top, using try/except for error handling, and printing results for clarity.
  • Dependency Management: Instructions to check for and install missing packages via provided helper functions before execution.
  • Safety and Sandboxing: Rules to prevent destructive commands, restrict file access to the project directory, use temporary files, and apply timeouts to avoid hangs.
  • Use Case: Run a data-processing script that requires pandas and yfinance, automatically install any missing packages, and return the script output.

Quick Start

Execute the provided Python snippet, install any missing packages as needed, and return the printed output.

Frequently Asked Questions about python-executor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely execute Python scripts and manage missing dependencies?

To safely execute Python scripts, place imports at the top, use try/except for error handling, and use helper functions to check and install missing packages before running the code. This approach ensures controlled runtime and clear printed outputs.

What is the best way to run Python code for data processing without causing destructive file operations?

Running Python code for data processing safely requires restricting file access to the project directory, using temporary files, and applying timeouts. These sandboxing rules prevent destructive commands and avoid infinite hangs during calculations.

Can I automatically install Python packages like pandas during code execution?

Yes, you can automatically install Python packages like pandas by using provided dependency verification and installation helpers. The runtime checks for missing packages and installs them dynamically before executing your data processing scripts.

Does Python code execution work for automating tasks with dependency checks and error handling?

Python code execution works for automating tasks by integrating dependency checks, package installation, and structured error handling patterns. It applies to automation scenarios where scripts require a controlled runtime for calculations, data processing, or debugging.

Why does my Python code execution hang and how do I apply timeout guidance?

Python code execution hangs when scripts run infinite loops or unresponsive operations. You can apply timeout guidance to enforce a controlled runtime, ensuring the execution environment automatically halts stuck processes and prevents system freezes.

What are the limitations of running Python code in a restricted runtime environment?

Limitations of a restricted Python runtime include blocks against destructive file operations and strict boundaries limiting file access to the project directory. You must use temporary files and cannot execute commands that modify system configurations.