What problem does it solve?
This Skill enables secure, in-browser code execution for Python and JavaScript within a sandboxed Canvas environment, addressing the challenge of running user-provided code safely without leaving the page.
Core Features & Use Cases
- Pyodide-based Python execution with micropip package management for on-demand dependencies.
- JavaScript/TypeScript execution via a restricted iframe sandbox with Monaco editor integration for quick experimentation.
- Robust error handling, timeouts, and security policies (package allowlists, blocklists, and sandbox restrictions).
- Integration with a dedicated execution manager to coordinate loading, execution, and result reporting.
- Real-world use case: build a learning playground where students run small Python snippets and see live output within the canvas.
Quick Start
Load the canvas-code-execution skill, initialize the Pyodide-based Python runtime, and run a simple snippet like print('Hello Canvas') in a sandboxed environment.