[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XBE193DR9W1PQX4HSFJ1GK":3,"skill-same:01M6XBE193DR9W1PQX4HSFJ1GK":70},{"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":27,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":13,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":49,"install":50,"resources":63},"01M6XBE193DR9W1PQX4HSFJ1GK","code-exec-fallback-266cba",null,"Fallback workflow for reliable code execution when sandbox fails repeatedly","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\u002Fcode-exec-fallback-266cba\u002FSKILL.md",[17,22],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":25,"taxonomyTypeDesc":26},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[28,29,30,31,32,33,34,35,36,37,38],"code","fallback","exec","code exec fallback 266cba","code exec fallback","sandbox","workflow","execution","code execution","for","when","2026-11-10 10:12:30",false,"---\nname: code-exec-fallback-266cba\ndescription: Fallback workflow for reliable code execution when sandbox fails repeatedly\n---\n\n# Code Execution Fallback Pattern\n\n## When to Use This Skill\n\nApply this pattern when you encounter **repeated failures** with `execute_code_sandbox`:\n- 2+ consecutive failures with opaque or unknown errors\n- Timeout errors that persist across retry attempts\n- Environment-related errors that don't resolve with code fixes\n\n## The Fallback Workflow\n\n### Step 1: Detect Repeated Failures\n\nTrack execution failures. After 2 consecutive failures with `execute_code_sandbox`, switch to the fallback approach.\n\n### Step 2: Write Script to File\n\nUse `write_file` to save your Python script:\n\n```\nwrite_file(\n    path=\"\u002Fworkspace\u002Fscript_name.py\",\n    content=\"# Your Python code here\\nimport sys\\n...\"\n)\n```\n\n### Step 3: Execute via Shell\n\nUse `run_shell` to run the script:\n\n```\nrun_shell(\n    command=\"python \u002Fworkspace\u002Fscript_name.py\",\n    timeout=300\n)\n```\n\n### Step 4: Capture Output\n\nParse stdout\u002Fstderr from `run_shell` output to verify success or diagnose issues.\n\n## Complete Example\n\n```python\n# Instead of this (which may fail):\nresult = execute_code_sandbox(code=\"import pandas as pd\\n...\")\n\n# Use this fallback pattern:\nscript_content = \"\"\"\nimport pandas as pd\nimport sys\n\ntry:\n    # Your logic here\n    df = pd.DataFrame({'col': [1, 2, 3]})\n    print(df.to_csv())\n    sys.exit(0)\nexcept Exception as e:\n    print(f\"ERROR: {e}\", file=sys.stderr)\n    sys.exit(1)\n\"\"\"\n\n# Write the script\nwrite_file(path=\"\u002Fworkspace\u002Fmy_script.py\", content=script_content)\n\n# Execute via shell\nresult = run_shell(command=\"python \u002Fworkspace\u002Fmy_script.py\", timeout=300)\n```\n\n## Best Practices\n\n1. **Add error handling** in your script - use try\u002Fexcept with `sys.exit()` codes\n2. **Set appropriate timeouts** - `run_shell` default is 30s, increase for heavy operations\n3. **Clean up temporary files** after execution if needed\n4. **Log the fallback trigger** - document why you switched approaches\n5. **Verify Python availability** - Most sandboxes have Python 3.x by default\n\n## Why This Works\n\n- `write_file` is more reliable for file I\u002FO operations\n- `run_shell` gives you direct control over execution environment\n- Shell execution bypasses sandbox serialization issues\n- Better error visibility through stdout\u002Fstderr streams\n\n## When NOT to Use This Pattern\n\n- First-time execution failures (retry the sandbox first)\n- Simple one-liner code (sandbox is faster)\n- When sandbox errors are clearly code bugs (fix the code instead)\n- Security-sensitive operations requiring sandbox isolation","# Code Execution Fallback Pattern\n\n## When to Use This Skill\n\nApply this pattern when you encounter **repeated failures** with `execute_code_sandbox`:\n- 2+ consecutive failures with opaque or unknown errors\n- Timeout errors that persist across retry attempts\n- Environment-related errors that don't resolve with code fixes\n\n## The Fallback Workflow\n\n### Step 1: Detect Repeated Failures\n\nTrack execution failures. After 2 consecutive failures with `execute_code_sandbox`, switch to the fallback approach.\n\n### Step 2: Write Script to File\n\nUse `write_file` to save your Python script:\n\n```\nwrite_file(\n    path=\"\u002Fworkspace\u002Fscript_name.py\",\n    content=\"# Your Python code here\\nimport sys\\n...\"\n)\n```\n\n### Step 3: Execute via Shell\n\nUse `run_shell` to run the script:\n\n```\nrun_shell(\n    command=\"python \u002Fworkspace\u002Fscript_name.py\",\n    timeout=300\n)\n```\n\n### Step 4: Capture Output\n\nParse stdout\u002Fstderr from `run_shell` output to verify success or diagnose issues.\n\n## Complete Example\n\n```python\n# Instead of this (which may fail):\nresult = execute_code_sandbox(code=\"import pandas as pd\\n...\")\n\n# Use this fallback pattern:\nscript_content = \"\"\"\nimport pandas as pd\nimport sys\n\ntry:\n    # Your logic here\n    df = pd.DataFrame({'col': [1, 2, 3]})\n    print(df.to_csv())\n    sys.exit(0)\nexcept Exception as e:\n    print(f\"ERROR: {e}\", file=sys.stderr)\n    sys.exit(1)\n\"\"\"\n\n# Write the script\nwrite_file(path=\"\u002Fworkspace\u002Fmy_script.py\", content=script_content)\n\n# Execute via shell\nresult = run_shell(command=\"python \u002Fworkspace\u002Fmy_script.py\", timeout=300)\n```\n\n## Best Practices\n\n1. **Add error handling** in your script - use try\u002Fexcept with `sys.exit()` codes\n2. **Set appropriate timeouts** - `run_shell` default is 30s, increase for heavy operations\n3. **Clean up temporary files** after execution if needed\n4. **Log the fallback trigger** - document why you switched approaches\n5. **Verify Python availability** - Most sandboxes have Python 3.x by default\n\n## Why This Works\n\n- `write_file` is more reliable for file I\u002FO operations\n- `run_shell` gives you direct control over execution environment\n- Shell execution bypasses sandbox serialization issues\n- Better error visibility through stdout\u002Fstderr streams\n\n## When NOT to Use This Pattern\n\n- First-time execution failures (retry the sandbox first)\n- Simple one-liner code (sandbox is faster)\n- When sandbox errors are clearly code bugs (fix the code instead)\n- Security-sensitive operations requiring sandbox isolation",{"name":5,"description":7},"main","0650921d63895de3997bc81f1ff1d0ac67032072","gdpval_bench\u002Fskills\u002Fcode-exec-fallback-266cba","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":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill code-exec-fallback-266cba",{"tool":56,"command":57},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill code-exec-fallback-266cba",{"tool":59,"command":60},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill code-exec-fallback-266cba","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fcode-exec-fallback-266cba\u002FSKILL.md",true,[64],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},".skill_id","OTHER","其他",39,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fcode-exec-fallback-266cba\u002F.skill_id",[71,95,112,121,149,165],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":39},"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",[],[78,79,80,81,82,83,84,85,37,86,87,88,89,90,91,92,93,94],"check","write","write special chars ts check","typescript","filters","characters","Existing","type-checking","errors","script","output","type","files","only","template","file","python",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":39},"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",[],[102,103,79,93,104,94,105,106,107,108,109,92,110,111,83,37,87],"readback","write special chars readback","helper","post","via","scripts","cleanup","read","verification","with",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":39},"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",[],[119,79,83,120,87,106,92,93,94,37],"write special chars heredoc","shell",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":130,"publishedAt":39},"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",[127],{"categoryNo":128,"categoryName":129,"taxonomyType":25,"taxonomyTypeDesc":26},"01JBSEEDCAT000000000000033","数据分析师",[131,132,133,134,135,81,136,137,138,139,140,37,141,142,143,144,145,146,147,148],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api","data",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":39},"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",[],[156,157,158,159,37,160,111,161,162,163,164],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":171,"publishedAt":39},"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",[],[172,173,174,175,176,177,93,178,179,180],"directory","verify directory structure","structure","verify","access","first","issues","diagnose","file access"]