ag064/openspace/python-execution-fallback-9d4989
Claude Code and agent skill by ag064/openspace
- community
Checking that the SKILL.md file is still in the repository.
Fallback method for executing Python when execute_code_sandbox fails with unknown errors
Install
npx vskill@latest install ag064/openspace/python-execution-fallback-9d4989SKILL.md
The same SKILL.md was published earlier as xyliu-cs/openspace-gdpval/python-execution-fallback-9d4989.
Python Execution Fallback
When to Use
Use this skill when execute_code_sandbox returns 'unknown error' or fails unexpectedly, even on simple Python code like print statements.
Solution
Switch to using run_shell with Python heredoc syntax instead of execute_code_sandbox.
Basic Syntax
How to Call
Instead of:
Use:
For multi-line code, build the command string:
Why This Works
run_shellexecutes commands directly in the shell environment, bypassing sandbox issues- Heredoc syntax (
<< 'EOF') allows clean multi-line Python code without complex escaping - Single quotes around EOF prevent unwanted shell variable expansion
- More reliable for simple to moderate Python execution tasks
Guidelines
- Always use single quotes around EOF (
'EOF') to prevent variable expansion - Test with a simple print statement first to verify Python is available
- For longer scripts, consider writing to a
.pyfile first, then executing:
``python run_shell(command="python3 /path/to/script.py") ``
- Capture stdout from run_shell to get Python output
- Handle errors by checking run_shell's stderr output
Example: Complete Workflow
Troubleshooting
| Issue | Solution | |
|---|---|---|
| Python not found | Use which python3 to verify installation | |
| Heredoc not working | Ensure single quotes around EOF delimiter | |
| Complex imports fail | Install required packages or write to .py file | |
| Output not captured | Check run_shell stdout, not return value |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinggdpval_bench/skills/python-execution-fallback-9d4989/SKILL.md
Popularity
- 7-day trend score
- 5
Refreshed 1 Nov 2026, a month ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ag064/openspace/python-execution-fallback-9d4989)