[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XC004FHH0S6WM0NGZ7JYC7":3,"skill-same:01M6XC004FHH0S6WM0NGZ7JYC7":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":29,"linkOnly":30,"markdownContent":31,"markdownBody":32,"frontMatter":33,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":13,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":39,"install":40,"resources":53},"01M6XC004FHH0S6WM0NGZ7JYC7","sandbox-fallback-python-e5d7ae",null,"Fallback to run_shell with Python heredoc when execute_code_sandbox fails","UF-gzj\u002Fopenspace-claude-evolution","UF-gzj","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F272393507?v=4","01M6XBCZB755P01VVYGQWPYZY3","01M6XBCZFJA5AREA17WGETA3FW",0,"MIT","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fsandbox-fallback-python-e5d7ae\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28],"python","sandbox","fallback","sandbox fallback python e5d7ae","sandbox fallback python","run","code","shell","execute","with","when","2026-11-10 10:12:30",false,"---\nname: sandbox-fallback-python-e5d7ae\ndescription: Fallback to run_shell with Python heredoc when execute_code_sandbox fails\n---\n\n# Python Sandbox Fallback Pattern\n\n## When to Use\n\nUse this pattern when `execute_code_sandbox` fails with e2b\u002Fsandbox initialization errors, especially when running Python code that requires external libraries like reportlab, pandas, numpy, etc.\n\n## Common Failure Indicators\n\nDetect these error patterns to trigger the fallback:\n- `e2b` initialization errors\n- `sandbox` creation\u002Fcreation timeout failures\n- `container` startup errors\n- Connection\u002Frefusal errors from sandbox service\n\n## The Fallback Pattern\n\n### Basic Heredoc Approach\n\nFor short scripts, use a Python heredoc directly in `run_shell`:\n\n```python\nrun_shell(\n    command=\"\"\"python3 \u003C\u003C 'EOF'\nimport sys\nprint(f\"Python version: {sys.version}\")\n# Your code here\nEOF\n\"\"\",\n    timeout=60\n)\n```\n\n### File-Based Approach for Complex Scripts\n\nFor longer scripts or when you need to preserve state across multiple executions:\n\n```python\n# Step 1: Write the script to a temporary file\nscript_content = '''\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.pdfgen import canvas\nimport os\n\n# Your code here\n'''\n\nrun_shell(command=f\"cat > \u002Ftmp\u002Fscript.py \u003C\u003C 'SCRIPT_EOF'\\n{script_content}\\nSCRIPT_EOF\")\n\n# Step 2: Execute the script\nresult = run_shell(command=\"python3 \u002Ftmp\u002Fscript.py\", timeout=120)\n```\n\n## Key Considerations\n\n### Timeouts\n- `run_shell` typically needs longer timeouts than `execute_code_sandbox`\n- Use `timeout=60` for simple scripts\n- Use `timeout=120` or higher for library-heavy operations (PDF generation, data processing)\n\n### Library Availability\n- Verify required libraries are installed in the shell environment\n- Install missing libraries first if needed:\n  ```python\n  run_shell(command=\"pip install reportlab\", timeout=60)\n  ```\n\n### Error Handling\n- Capture and inspect `run_shell` output for Python errors\n- Check stderr for import failures or runtime exceptions\n\n### Working Directory\n- Files created via `run_shell` are in the current working directory by default\n- Use absolute paths or `os.getcwd()` to reference files reliably\n\n## Example: PDF Generation with reportlab\n\n```python\n# FALLBACK VERSION (when execute_code_sandbox fails):\n\npdf_code = \"\"\"\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.pdfgen import canvas\nfrom reportlab.lib.units import inch\n\ndef create_memo(filename):\n    c = canvas.Canvas(filename, pagesize=letter)\n    c.drawString(1*inch, 10*inch, \"Legal Memorandum\")\n    c.save()\n    print(f\"Created {filename}\")\n\ncreate_memo('\u002Fworkspace\u002Foutput.pdf')\n\"\"\"\n\n# Write script to file\nrun_shell(command=f\"cat > \u002Ftmp\u002Fcreate_pdf.py \u003C\u003C 'PYEOF'\\n{pdf_code}\\nPYEOF\")\n\n# Execute and verify\nrun_shell(command=\"python3 \u002Ftmp\u002Fcreate_pdf.py\", timeout=120)\n\n# Verify output exists\nrun_shell(command=\"ls -la \u002Fworkspace\u002Foutput.pdf\", timeout=30)\n```\n\n## Comparison Table\n\n| Aspect | execute_code_sandbox | run_shell (fallback) |\n|--------|---------------------|---------------------|\n| Isolation | High (containerized) | Low (host environment) |\n| Reliability | Can fail with e2b errors | More reliable |\n| Library Access | Pre-configured sandbox | Depends on host |\n| Timeout | Default 30s | Configurable |\n| File Access | ARTIFACT_PATH convention | Direct filesystem |\n\n## Migration Checklist\n\nWhen switching from `execute_code_sandbox` to `run_shell`:\n\n- [ ] Increase timeout values (typically 2-4x)\n- [ ] Convert ARTIFACT_PATH references to actual file paths\n- [ ] Add explicit file verification steps after execution\n- [ ] Handle potential library import errors\n- [ ] Test script execution in shell environment first","# Python Sandbox Fallback Pattern\n\n## When to Use\n\nUse this pattern when `execute_code_sandbox` fails with e2b\u002Fsandbox initialization errors, especially when running Python code that requires external libraries like reportlab, pandas, numpy, etc.\n\n## Common Failure Indicators\n\nDetect these error patterns to trigger the fallback:\n- `e2b` initialization errors\n- `sandbox` creation\u002Fcreation timeout failures\n- `container` startup errors\n- Connection\u002Frefusal errors from sandbox service\n\n## The Fallback Pattern\n\n### Basic Heredoc Approach\n\nFor short scripts, use a Python heredoc directly in `run_shell`:\n\n```python\nrun_shell(\n    command=\"\"\"python3 \u003C\u003C 'EOF'\nimport sys\nprint(f\"Python version: {sys.version}\")\n# Your code here\nEOF\n\"\"\",\n    timeout=60\n)\n```\n\n### File-Based Approach for Complex Scripts\n\nFor longer scripts or when you need to preserve state across multiple executions:\n\n```python\n# Step 1: Write the script to a temporary file\nscript_content = '''\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.pdfgen import canvas\nimport os\n\n# Your code here\n'''\n\nrun_shell(command=f\"cat > \u002Ftmp\u002Fscript.py \u003C\u003C 'SCRIPT_EOF'\\n{script_content}\\nSCRIPT_EOF\")\n\n# Step 2: Execute the script\nresult = run_shell(command=\"python3 \u002Ftmp\u002Fscript.py\", timeout=120)\n```\n\n## Key Considerations\n\n### Timeouts\n- `run_shell` typically needs longer timeouts than `execute_code_sandbox`\n- Use `timeout=60` for simple scripts\n- Use `timeout=120` or higher for library-heavy operations (PDF generation, data processing)\n\n### Library Availability\n- Verify required libraries are installed in the shell environment\n- Install missing libraries first if needed:\n  ```python\n  run_shell(command=\"pip install reportlab\", timeout=60)\n  ```\n\n### Error Handling\n- Capture and inspect `run_shell` output for Python errors\n- Check stderr for import failures or runtime exceptions\n\n### Working Directory\n- Files created via `run_shell` are in the current working directory by default\n- Use absolute paths or `os.getcwd()` to reference files reliably\n\n## Example: PDF Generation with reportlab\n\n```python\n# FALLBACK VERSION (when execute_code_sandbox fails):\n\npdf_code = \"\"\"\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.pdfgen import canvas\nfrom reportlab.lib.units import inch\n\ndef create_memo(filename):\n    c = canvas.Canvas(filename, pagesize=letter)\n    c.drawString(1*inch, 10*inch, \"Legal Memorandum\")\n    c.save()\n    print(f\"Created {filename}\")\n\ncreate_memo('\u002Fworkspace\u002Foutput.pdf')\n\"\"\"\n\n# Write script to file\nrun_shell(command=f\"cat > \u002Ftmp\u002Fcreate_pdf.py \u003C\u003C 'PYEOF'\\n{pdf_code}\\nPYEOF\")\n\n# Execute and verify\nrun_shell(command=\"python3 \u002Ftmp\u002Fcreate_pdf.py\", timeout=120)\n\n# Verify output exists\nrun_shell(command=\"ls -la \u002Fworkspace\u002Foutput.pdf\", timeout=30)\n```\n\n## Comparison Table\n\n| Aspect | execute_code_sandbox | run_shell (fallback) |\n|--------|---------------------|---------------------|\n| Isolation | High (containerized) | Low (host environment) |\n| Reliability | Can fail with e2b errors | More reliable |\n| Library Access | Pre-configured sandbox | Depends on host |\n| Timeout | Default 30s | Configurable |\n| File Access | ARTIFACT_PATH convention | Direct filesystem |\n\n## Migration Checklist\n\nWhen switching from `execute_code_sandbox` to `run_shell`:\n\n- [ ] Increase timeout values (typically 2-4x)\n- [ ] Convert ARTIFACT_PATH references to actual file paths\n- [ ] Add explicit file verification steps after execution\n- [ ] Handle potential library import errors\n- [ ] Test script execution in shell environment first",{"name":5,"description":7},"main","0650921d63895de3997bc81f1ff1d0ac67032072","gdpval_bench\u002Fskills\u002Fsandbox-fallback-python-e5d7ae","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution","https:\u002F\u002Fgithub.com\u002FUF-gzj","2026-04-16 09:31:03",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill sandbox-fallback-python-e5d7ae",{"tool":46,"command":47},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill sandbox-fallback-python-e5d7ae",{"tool":49,"command":50},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill sandbox-fallback-python-e5d7ae","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fsandbox-fallback-python-e5d7ae\u002FSKILL.md",true,[54],{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},".skill_id","OTHER","其他",44,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fsandbox-fallback-python-e5d7ae\u002F.skill_id",[61,85,101,109,139,155],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":29},"01M6XCCXD3NCM2YKR3WNGBASPC","write-special-chars-ts-check","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, plus a reliable TypeScript type-checking step that filters output to only the newly-written files to avoid being misled by pre-existing errors.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,18],"check","write","write special chars ts check","typescript","filters","characters","Existing","type-checking","for","errors","script","output","type","files","only","template","file",{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":29},"01M6XCCT7E3J922Q345PBGSHPN","write-special-chars-readback","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, with mandatory post-write verification via read_file and cleanup of \u002Ftmp helper scripts.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[92,93,69,84,94,18,95,96,97,98,99,83,100,27,73,76,78],"readback","write special chars readback","helper","post","via","scripts","cleanup","read","verification",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":29},"01M6XCCMQX1R8B6FECWB3P63T7","write-special-chars-heredoc","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) by using a Python heredoc script executed via shell.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[108,69,73,25,78,96,83,84,18,76],"write special chars heredoc",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":120,"publishedAt":29},"01M6XCCG41M994JJEX6VN52PEP","worldmonitor-reference","Curated architecture index of the WorldMonitor open-source dashboard. Reference for extracting patterns — vanilla TypeScript, Panel class hierarchy, service layer, CSS grid, API edge functions, refresh scheduler, and 60+ data source integrations.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[115],{"categoryNo":116,"categoryName":117,"taxonomyType":118,"taxonomyTypeDesc":119},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[121,122,123,124,125,71,126,127,128,129,130,76,131,132,133,134,135,136,137,138],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api","data",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":29},"01M6XCCCHWNKG2W4VH9E6A10HF","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[146,147,148,149,76,150,27,151,152,153,154],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":29},"01M6XCC7X8PKMR2DEW91XGHYSV","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[162,163,164,165,166,167,84,168,169,170],"directory","verify directory structure","structure","verify","access","first","issues","diagnose","file access"]