[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XBKRBKXH5RCRGKT9YEQA2C":3,"skill-same:01M6XBKRBKXH5RCRGKT9YEQA2C":64},{"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":22,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":13,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":43,"install":44,"resources":57},"01M6XBKRBKXH5RCRGKT9YEQA2C","execute-code-fallback",null,"Fallback from execute_code_sandbox to run_shell when e2b sandbox is unavailable","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\u002Fexecute-code-fallback\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[23,24,25,26,27,28,29,30,31,32],"code","execute","fallback","execute code fallback","sandbox","run","shell","e2b sandbox","e2b","when","2026-11-10 10:12:30",false,"---\nname: execute-code-fallback\ndescription: Fallback from execute_code_sandbox to run_shell when e2b sandbox is unavailable\n---\n\n# Execute Code Fallback Pattern\n\nWhen `execute_code_sandbox` fails due to e2b unavailability, immediately fall back to `run_shell` with embedded Python code. This ensures task continuity when the sandbox service is down.\n\n## When to Apply\n\nUse this pattern when you observe:\n- `execute_code_sandbox` returns errors mentioning \"e2b\", \"sandbox unavailable\", or connection timeouts\n- Repeated sandbox execution failures (2+ attempts)\n- Error messages indicating the code execution environment is unreachable\n\n## Fallback Procedure\n\n### Step 1: Detect the Failure\n\nIdentify that `execute_code_sandbox` has failed. Common error indicators:\n- \"e2b service unavailable\"\n- \"Sandbox connection failed\"\n- \"Execution environment not reachable\"\n- Timeout errors during code execution\n\n### Step 2: Switch to run_shell with Embedded Python\n\nInstead of:\n```python\nexecute_code_sandbox(code=\"...\")\n```\n\nUse:\n```bash\nrun_shell(command=\"python3 -c '...your Python code...'\")\n```\n\n### Step 3: Install Dependencies First (If Needed)\n\nIf your Python code requires external packages, install them first:\n\n```bash\nrun_shell(command=\"pip install pandas requests matplotlib\")\n```\n\nThen execute your main code:\n\n```bash\nrun_shell(command=\"python3 \u003C\u003C 'EOF'\nimport pandas as pd\nimport requests\n\n# Your code here\nprint(\"Success\")\nEOF\n\")\n```\n\n### Step 4: Use Heredoc for Multi-line Code\n\nFor complex Python scripts, use heredoc syntax for cleaner code:\n\n```bash\nrun_shell(command=\"python3 \u003C\u003C 'PYTHON_SCRIPT'\nimport json\nimport os\n\n# Complex logic here\ndata = {'key': 'value'}\nwith open('output.json', 'w') as f:\n    json.dump(data, f)\n\nprint('File created successfully')\nPYTHON_SCRIPT\n\")\n```\n\n## Complete Example\n\n**Scenario:** You need to process a CSV file and generate a report.\n\n**Original approach (sandbox):**\n```python\nexecute_code_sandbox(code=\"\"\"\nimport pandas as pd\ndf = pd.read_csv('data.csv')\nsummary = df.describe()\nprint(summary)\n\"\"\")\n```\n\n**Fallback approach (run_shell):**\n```bash\n# First install dependencies if needed\nrun_shell(command=\"pip install pandas --quiet\")\n\n# Then execute the code\nrun_shell(command=\"python3 \u003C\u003C 'EOF'\nimport pandas as pd\ndf = pd.read_csv('data.csv')\nsummary = df.describe()\nprint(summary)\nEOF\n\")\n```\n\n## Important Considerations\n\n1. **State Persistence**: Unlike `execute_code_sandbox`, `run_shell` executions may not share state between calls. Save intermediate results to files if needed.\n\n2. **Working Directory**: Ensure you're operating in the correct directory. Use `pwd` to verify or include `cd \u002Fpath\u002Fto\u002Fworkdir` in your commands.\n\n3. **Python Version**: Use `python3` explicitly to avoid ambiguity. Verify with `python3 --version` if needed.\n\n4. **Error Handling**: Check the stdout\u002Fstderr from `run_shell` to confirm success. Failed Python scripts will return non-zero exit codes.\n\n5. **Security**: Be cautious when embedding user-provided data into shell commands. Escape appropriately or use file-based input.\n\n6. **Performance**: For large computations, `run_shell` may be slower than sandbox. Consider breaking into smaller steps if timeouts occur.\n\n## Quick Reference\n\n| Task | Sandbox Approach | Fallback Approach |\n|------|-----------------|-------------------|\n| Simple calculation | `execute_code_sandbox(code=\"print(2+2)\")` | `run_shell(command=\"python3 -c 'print(2+2)'\")` |\n| Install + run | `execute_code_sandbox(code=\"import pkg; ...\")` | `run_shell(command=\"pip install pkg && python3 -c '...'\")` |\n| Multi-line script | `execute_code_sandbox(code=\"...\")` | `run_shell(command=\"python3 \u003C\u003C 'EOF'...EOF\")` |\n| File I\u002FO | `execute_code_sandbox(code=\"...\")` | `run_shell(command=\"python3 \u003C\u003C 'EOF'...EOF\")` |\n\n## Recovery Checklist\n\n- [ ] Confirm `execute_code_sandbox` failure (not a code bug)\n- [ ] Switch to `run_shell` immediately\n- [ ] Install required packages with `pip install`\n- [ ] Use heredoc for multi-line Python\n- [ ] Verify output and handle errors\n- [ ] Save intermediate results to files if multi-step","# Execute Code Fallback Pattern\n\nWhen `execute_code_sandbox` fails due to e2b unavailability, immediately fall back to `run_shell` with embedded Python code. This ensures task continuity when the sandbox service is down.\n\n## When to Apply\n\nUse this pattern when you observe:\n- `execute_code_sandbox` returns errors mentioning \"e2b\", \"sandbox unavailable\", or connection timeouts\n- Repeated sandbox execution failures (2+ attempts)\n- Error messages indicating the code execution environment is unreachable\n\n## Fallback Procedure\n\n### Step 1: Detect the Failure\n\nIdentify that `execute_code_sandbox` has failed. Common error indicators:\n- \"e2b service unavailable\"\n- \"Sandbox connection failed\"\n- \"Execution environment not reachable\"\n- Timeout errors during code execution\n\n### Step 2: Switch to run_shell with Embedded Python\n\nInstead of:\n```python\nexecute_code_sandbox(code=\"...\")\n```\n\nUse:\n```bash\nrun_shell(command=\"python3 -c '...your Python code...'\")\n```\n\n### Step 3: Install Dependencies First (If Needed)\n\nIf your Python code requires external packages, install them first:\n\n```bash\nrun_shell(command=\"pip install pandas requests matplotlib\")\n```\n\nThen execute your main code:\n\n```bash\nrun_shell(command=\"python3 \u003C\u003C 'EOF'\nimport pandas as pd\nimport requests\n\n# Your code here\nprint(\"Success\")\nEOF\n\")\n```\n\n### Step 4: Use Heredoc for Multi-line Code\n\nFor complex Python scripts, use heredoc syntax for cleaner code:\n\n```bash\nrun_shell(command=\"python3 \u003C\u003C 'PYTHON_SCRIPT'\nimport json\nimport os\n\n# Complex logic here\ndata = {'key': 'value'}\nwith open('output.json', 'w') as f:\n    json.dump(data, f)\n\nprint('File created successfully')\nPYTHON_SCRIPT\n\")\n```\n\n## Complete Example\n\n**Scenario:** You need to process a CSV file and generate a report.\n\n**Original approach (sandbox):**\n```python\nexecute_code_sandbox(code=\"\"\"\nimport pandas as pd\ndf = pd.read_csv('data.csv')\nsummary = df.describe()\nprint(summary)\n\"\"\")\n```\n\n**Fallback approach (run_shell):**\n```bash\n# First install dependencies if needed\nrun_shell(command=\"pip install pandas --quiet\")\n\n# Then execute the code\nrun_shell(command=\"python3 \u003C\u003C 'EOF'\nimport pandas as pd\ndf = pd.read_csv('data.csv')\nsummary = df.describe()\nprint(summary)\nEOF\n\")\n```\n\n## Important Considerations\n\n1. **State Persistence**: Unlike `execute_code_sandbox`, `run_shell` executions may not share state between calls. Save intermediate results to files if needed.\n\n2. **Working Directory**: Ensure you're operating in the correct directory. Use `pwd` to verify or include `cd \u002Fpath\u002Fto\u002Fworkdir` in your commands.\n\n3. **Python Version**: Use `python3` explicitly to avoid ambiguity. Verify with `python3 --version` if needed.\n\n4. **Error Handling**: Check the stdout\u002Fstderr from `run_shell` to confirm success. Failed Python scripts will return non-zero exit codes.\n\n5. **Security**: Be cautious when embedding user-provided data into shell commands. Escape appropriately or use file-based input.\n\n6. **Performance**: For large computations, `run_shell` may be slower than sandbox. Consider breaking into smaller steps if timeouts occur.\n\n## Quick Reference\n\n| Task | Sandbox Approach | Fallback Approach |\n|------|-----------------|-------------------|\n| Simple calculation | `execute_code_sandbox(code=\"print(2+2)\")` | `run_shell(command=\"python3 -c 'print(2+2)'\")` |\n| Install + run | `execute_code_sandbox(code=\"import pkg; ...\")` | `run_shell(command=\"pip install pkg && python3 -c '...'\")` |\n| Multi-line script | `execute_code_sandbox(code=\"...\")` | `run_shell(command=\"python3 \u003C\u003C 'EOF'...EOF\")` |\n| File I\u002FO | `execute_code_sandbox(code=\"...\")` | `run_shell(command=\"python3 \u003C\u003C 'EOF'...EOF\")` |\n\n## Recovery Checklist\n\n- [ ] Confirm `execute_code_sandbox` failure (not a code bug)\n- [ ] Switch to `run_shell` immediately\n- [ ] Install required packages with `pip install`\n- [ ] Use heredoc for multi-line Python\n- [ ] Verify output and handle errors\n- [ ] Save intermediate results to files if multi-step",{"name":5,"description":7},"main","0650921d63895de3997bc81f1ff1d0ac67032072","gdpval_bench\u002Fskills\u002Fexecute-code-fallback","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":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill execute-code-fallback",{"tool":50,"command":51},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill execute-code-fallback",{"tool":53,"command":54},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill execute-code-fallback","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fexecute-code-fallback\u002FSKILL.md",true,[58],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},".skill_id","OTHER","其他",35,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fexecute-code-fallback\u002F.skill_id",[65,90,107,115,143,159],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":33},"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",[],[72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89],"check","write","write special chars ts check","typescript","filters","characters","Existing","type-checking","for","errors","script","output","type","files","only","template","file","python",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":33},"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",[],[97,98,73,88,99,89,100,101,102,103,104,87,105,106,77,80,82],"readback","write special chars readback","helper","post","via","scripts","cleanup","read","verification","with",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":33},"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",[],[114,73,77,29,82,101,87,88,89,80],"write special chars heredoc",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":124,"publishedAt":33},"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",[121],{"categoryNo":122,"categoryName":123,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000033","数据分析师",[125,126,127,128,129,75,130,131,132,133,134,80,135,136,137,138,139,140,141,142],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api","data",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":33},"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",[],[150,151,152,153,80,154,106,155,156,157,158],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":33},"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",[],[166,167,168,169,170,171,88,172,173,174],"directory","verify directory structure","structure","verify","access","first","issues","diagnose","file access"]