[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KHWT4NWV53ATQRWTAQTF0P":3,"skill-same:01M6KHWT4NWV53ATQRWTAQTF0P":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":28,"linkOnly":29,"markdownContent":30,"markdownBody":31,"frontMatter":32,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":13,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":6,"ownerDescription":38,"updatedAt":39,"install":40,"resources":53},"01M6KHWT4NWV53ATQRWTAQTF0P","code-exec-fallback-266cba",null,"Fallback workflow for reliable code execution when sandbox fails repeatedly","AG064\u002FOpenSpace","AG064","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184930299?v=4","01M6KHVFG7TB73NHX3RDYSTMH2","01M6KHVFMM7XA2PZA9Z83PHS3V",0,"MIT","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fcode-exec-fallback-266cba\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27],"code","fallback","exec","code exec fallback 266cba","code exec fallback","sandbox","workflow","execution","code execution","for","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","ff671ef61ed6587c49bd54c81cdc751c0b99e363","gdpval_bench\u002Fskills\u002Fcode-exec-fallback-266cba","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace","https:\u002F\u002Fgithub.com\u002FAG064","AG064, E.Mi.\r\n\r\nA person who thinks all the time, yet all they have to think about is nothing. I want to improve the world and work on open source projects","2026-10-08 06:53:48",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add AG064\u002FOpenSpace --skill code-exec-fallback-266cba",{"tool":46,"command":47},"bunx","bunx skills add AG064\u002FOpenSpace --skill code-exec-fallback-266cba",{"tool":49,"command":50},"pnpm","pnpm dlx skills add AG064\u002FOpenSpace --skill code-exec-fallback-266cba","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fcode-exec-fallback-266cba\u002FSKILL.md",true,[54],{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},".skill_id","OTHER","其他",39,"https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fcode-exec-fallback-266cba\u002F.skill_id",[61,84,101,110,135,151],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":28},"01M6KKMPWA0B5SCCH766F8M5EA","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\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[68,69,70,71,72,73,27,74,75,76,77,78,79,80,81,82,83],"write special chars ts check","check","write","filters","Existing","type-checking","errors","script","output","type","files","only","template","file","python","typescript",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":28},"01M6KKMJXVBNVEY3TRK055F4A7","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\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[91,92,70,80,93,94,81,82,95,96,97,98,99,27,75,100],"readback","write special chars readback","cleanup","read","scripts","verification","via","post","helper","with",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":28},"01M6KKMEGX9M9NC105J0W3Q5B9","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\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[70,108,82,27,97,80,109,81,75],"write special chars heredoc","shell",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":28},"01M6KKM8EJ2AATVHZBNB916WT0","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\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[],[117,118,119,120,83,121,122,123,124,125,27,126,127,128,129,130,131,132,133,134],"reference","worldmonitor","worldmonitor reference","dashboard","css","architecture","extracting","hierarchy","source","layer","panel","patterns","edge functions","integrations","open","api","data","scheduler",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":28},"01M6KKM39PHYK627F19GE2B9XN","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[142,143,144,145,27,146,100,147,148,149,150],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":28},"01M6KKKY7T2P61Y0JH54CDEJKQ","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[158,159,160,161,162,163,81,164,165,166],"directory","verify","structure","verify directory structure","access","first","issues","diagnose","file access"]