python-executor
Execute Python code in a sandboxed environment
Also available from: skillssh,inference-sh-9,inference-sh
Running Python code locally requires setting up environments and managing dependencies. This skill provides instant access to a pre-configured Python environment with 100+ libraries ready to use.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
Toggle on and start using
Test it
Using "python-executor". Execute: import pandas as pd; df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]}); print(df.mean())
Expected outcome:
Code executed successfully. Output: A 1.5
B 3.5
dtype: float64
Using "python-executor". Create a bar chart from data and save to outputs/chart.png
Expected outcome:
Code executed successfully. Output: Chart saved!
Attached files: chart.png (PNG image, 800x600)
Security Audit
Medium RiskStatic analyzer flagged 69 patterns in SKILL.md documentation file, but all are false positives. The 'backtick execution' patterns are markdown code block formatting, not shell execution. Network patterns are documentation URLs and example snippets. The skill legitimately uses the infsh CLI to send Python code to a remote sandboxed execution service (inference.sh). Risk is medium due to remote code execution capability, but execution occurs in an isolated subprocess on their infrastructure with timeout limits (1-300s).
Medium Risk Issues (1)
Risk Factors
⚙️ External commands (1)
🌐 Network access (1)
Quality Score
What You Can Build
Data Analysis Pipeline
Process and visualize datasets using Pandas and Matplotlib without local environment setup.
Automated Web Scraping
Extract data from websites using requests, BeautifulSoup, or browser automation tools.
Media Processing
Create and manipulate images, videos, and 3D models using specialized Python libraries.
Try These Prompts
Run this Python code: print('Hello World')Create a DataFrame with columns 'name' and 'sales', then calculate the average sales and display a bar chart.
Scrape the title and all links from https://example.com using requests and BeautifulSoup, then return the results as JSON.
Load an image, apply a grayscale filter, resize to 800x600, and save the result. Then create a thumbnail version at 150x150 pixels.
Best Practices
- Always save output files to the outputs/ directory to ensure they are returned in the response
- Set appropriate timeout values for long-running operations like video processing or web scraping
- Use non-interactive methods like plt.savefig() instead of plt.show() for visualizations
Avoid
- Do not attempt interactive operations like plt.show() or input() - the environment is non-interactive
- Avoid relying on GPU libraries - the environment is CPU-only
- Do not expect persistent state between separate code executions - each run is isolated