[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KG05S97NWHM5CJMMC5RKGA":3,"skill-same:01M6KG05S97NWHM5CJMMC5RKGA":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":14,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M6KG05S97NWHM5CJMMC5RKGA","safe-script-execution",null,"Fallback workflow for code execution when automated tools fail, using shell heredoc with verification","xyliu-cs\u002FOpenSpace-GDPval","xyliu-cs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F89236536?v=4","01M6KF8Z1V4TXS86CKSH48BY8T","xy","01M6KF8Z67443W0SHXM85JEF0B",0,"MIT","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fsafe-script-execution\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31],"safe","execution","script","safe script execution","workflow","code","verification","Tools","shell","fallback","code execution","with","for","2026-11-10 10:12:30",false,"---\nname: safe-script-execution\ndescription: Fallback workflow for code execution when automated tools fail, using shell heredoc with verification\n---\n\n# Safe Script Execution Fallback\n\n## When to Use This Skill\n\nUse this pattern when `execute_code_sandbox` or `shell_agent` repeatedly fails to produce expected outputs. This manual fallback provides explicit control over script creation and execution with built-in verification.\n\n## Step-by-Step Instructions\n\n### Step 1: Verify Working Directory\n\nBefore creating any scripts, confirm your current location and permissions:\n\n```bash\npwd\nls -la\n```\n\nDocument the absolute path. All subsequent file operations should use explicit paths from this point.\n\n### Step 2: Create Script via Heredoc\n\nUse shell heredoc syntax to create scripts. This avoids issues with multi-line string escaping:\n\n```bash\ncat > \u002Ffull\u002Fpath\u002Fto\u002Fscript.py \u003C\u003C 'HEREDOC_END'\n#!\u002Fusr\u002Fbin\u002Fenv python3\n# Your script content here\n# Single quotes around delimiter prevent variable expansion\nprint(\"Hello from script\")\nHEREDOC_END\n```\n\n**Key escaping rules:**\n- Use single quotes around heredoc delimiter (`'EOF'`) to prevent shell variable expansion\n- If script contains the delimiter string, choose a different unique delimiter\n- For bash scripts containing special characters, escape `$`, backticks, and `!`\n\n### Step 3: Make Executable and Run with Explicit Path\n\n```bash\nchmod +x \u002Ffull\u002Fpath\u002Fto\u002Fscript.py\n\u002Ffull\u002Fpath\u002Fto\u002Fscript.py\n```\n\nAlways use the full absolute path, never rely on `.` or relative paths.\n\n### Step 4: Verify Output\n\nConfirm files were created and inspect their properties:\n\n```bash\n# Check file exists with size\nls -lh \u002Ffull\u002Fpath\u002Fto\u002Foutput.file\n\n# For PDFs, inspect metadata\npdfinfo \u002Ffull\u002Fpath\u002Fto\u002Foutput.pdf 2>\u002Fdev\u002Fnull || file \u002Ffull\u002Fpath\u002Fto\u002Foutput.pdf\n\n# For Word docs, check file type\nfile \u002Ffull\u002Fpath\u002Fto\u002Foutput.docx\n```\n\n### Step 5: Error Handling\n\nIf execution fails:\n1. Check script syntax: `python3 -m py_compile \u002Fpath\u002Fto\u002Fscript.py`\n2. Check permissions: `ls -l \u002Fpath\u002Fto\u002Fscript.py`\n3. Check available disk space: `df -h .`\n4. Review stderr output carefully\n\n## Example: PDF Generation Fallback\n\n```bash\n# Step 1: Verify directory\npwd\nls -la\n\n# Step 2: Create Python script\ncat > \u002Fworkspace\u002Fgenerate_pdf.py \u003C\u003C 'SCRIPT_END'\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.pdfgen import canvas\n\nc = canvas.Canvas(\"\u002Fworkspace\u002Foutput.pdf\", pagesize=letter)\nc.drawString(100, 750, \"Generated PDF\")\nc.save()\nSCRIPT_END\n\n# Step 3: Execute\nchmod +x \u002Fworkspace\u002Fgenerate_pdf.py\npython3 \u002Fworkspace\u002Fgenerate_pdf.py\n\n# Step 4: Verify\nls -lh \u002Fworkspace\u002Foutput.pdf\npdfinfo \u002Fworkspace\u002Foutput.pdf 2>\u002Fdev\u002Fnull || echo \"PDF created, pdfinfo unavailable\"\n```\n\n## Anti-Patterns to Avoid\n\n- ❌ Don't use relative paths like `.\u002Fscript.py` - always use absolute paths\n- ❌ Don't rely on unquoted heredoc delimiters if script contains variables\n- ❌ Don't skip verification steps - always confirm output exists and has expected size\n- ❌ Don't assume working directory - always `pwd` first\n\n## Troubleshooting Checklist\n\n- [ ] Working directory confirmed with `pwd`\n- [ ] Script file exists after heredoc creation (`ls -l`)\n- [ ] Script has execute permissions (`chmod +x`)\n- [ ] Output file exists with non-zero size (`ls -lh`)\n- [ ] File type verified (`file` command or type-specific inspection)","# Safe Script Execution Fallback\n\n## When to Use This Skill\n\nUse this pattern when `execute_code_sandbox` or `shell_agent` repeatedly fails to produce expected outputs. This manual fallback provides explicit control over script creation and execution with built-in verification.\n\n## Step-by-Step Instructions\n\n### Step 1: Verify Working Directory\n\nBefore creating any scripts, confirm your current location and permissions:\n\n```bash\npwd\nls -la\n```\n\nDocument the absolute path. All subsequent file operations should use explicit paths from this point.\n\n### Step 2: Create Script via Heredoc\n\nUse shell heredoc syntax to create scripts. This avoids issues with multi-line string escaping:\n\n```bash\ncat > \u002Ffull\u002Fpath\u002Fto\u002Fscript.py \u003C\u003C 'HEREDOC_END'\n#!\u002Fusr\u002Fbin\u002Fenv python3\n# Your script content here\n# Single quotes around delimiter prevent variable expansion\nprint(\"Hello from script\")\nHEREDOC_END\n```\n\n**Key escaping rules:**\n- Use single quotes around heredoc delimiter (`'EOF'`) to prevent shell variable expansion\n- If script contains the delimiter string, choose a different unique delimiter\n- For bash scripts containing special characters, escape `$`, backticks, and `!`\n\n### Step 3: Make Executable and Run with Explicit Path\n\n```bash\nchmod +x \u002Ffull\u002Fpath\u002Fto\u002Fscript.py\n\u002Ffull\u002Fpath\u002Fto\u002Fscript.py\n```\n\nAlways use the full absolute path, never rely on `.` or relative paths.\n\n### Step 4: Verify Output\n\nConfirm files were created and inspect their properties:\n\n```bash\n# Check file exists with size\nls -lh \u002Ffull\u002Fpath\u002Fto\u002Foutput.file\n\n# For PDFs, inspect metadata\npdfinfo \u002Ffull\u002Fpath\u002Fto\u002Foutput.pdf 2>\u002Fdev\u002Fnull || file \u002Ffull\u002Fpath\u002Fto\u002Foutput.pdf\n\n# For Word docs, check file type\nfile \u002Ffull\u002Fpath\u002Fto\u002Foutput.docx\n```\n\n### Step 5: Error Handling\n\nIf execution fails:\n1. Check script syntax: `python3 -m py_compile \u002Fpath\u002Fto\u002Fscript.py`\n2. Check permissions: `ls -l \u002Fpath\u002Fto\u002Fscript.py`\n3. Check available disk space: `df -h .`\n4. Review stderr output carefully\n\n## Example: PDF Generation Fallback\n\n```bash\n# Step 1: Verify directory\npwd\nls -la\n\n# Step 2: Create Python script\ncat > \u002Fworkspace\u002Fgenerate_pdf.py \u003C\u003C 'SCRIPT_END'\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.pdfgen import canvas\n\nc = canvas.Canvas(\"\u002Fworkspace\u002Foutput.pdf\", pagesize=letter)\nc.drawString(100, 750, \"Generated PDF\")\nc.save()\nSCRIPT_END\n\n# Step 3: Execute\nchmod +x \u002Fworkspace\u002Fgenerate_pdf.py\npython3 \u002Fworkspace\u002Fgenerate_pdf.py\n\n# Step 4: Verify\nls -lh \u002Fworkspace\u002Foutput.pdf\npdfinfo \u002Fworkspace\u002Foutput.pdf 2>\u002Fdev\u002Fnull || echo \"PDF created, pdfinfo unavailable\"\n```\n\n## Anti-Patterns to Avoid\n\n- ❌ Don't use relative paths like `.\u002Fscript.py` - always use absolute paths\n- ❌ Don't rely on unquoted heredoc delimiters if script contains variables\n- ❌ Don't skip verification steps - always confirm output exists and has expected size\n- ❌ Don't assume working directory - always `pwd` first\n\n## Troubleshooting Checklist\n\n- [ ] Working directory confirmed with `pwd`\n- [ ] Script file exists after heredoc creation (`ls -l`)\n- [ ] Script has execute permissions (`chmod +x`)\n- [ ] Output file exists with non-zero size (`ls -lh`)\n- [ ] File type verified (`file` command or type-specific inspection)",{"name":5,"description":7},"main","af1b40a42167d09c30b3a63000aa14ace4c1e229","gdpval_bench\u002Fskills\u002Fsafe-script-execution","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval","https:\u002F\u002Fgithub.com\u002Fxyliu-cs","https:\u002F\u002Fxyliu-cs.github.io","PhD Student in CS, CUHK-Shenzhen.","2026-04-06 20:32:15",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add xyliu-cs\u002FOpenSpace-GDPval --skill safe-script-execution",{"tool":51,"command":52},"bunx","bunx skills add xyliu-cs\u002FOpenSpace-GDPval --skill safe-script-execution",{"tool":54,"command":55},"pnpm","pnpm dlx skills add xyliu-cs\u002FOpenSpace-GDPval --skill safe-script-execution","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fsafe-script-execution\u002FSKILL.md",true,[59],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},".skill_id","OTHER","其他",35,"https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fsafe-script-execution\u002F.skill_id",[66,79,87,101,126,146],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":32},"01M6KG8MF1S664SWBDENYRSCK8","zip-export-deliverable","Ensures codebase deliverables are properly exported as ZIP archives through a dedicated finalization step","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fzip-export-deliverable\u002FSKILL.md",[],[73,74,75,76,77,78],"zip export deliverable","zip","export","deliverables","codebase","as",{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":32},"01M6KG8GAZWHHEK7VNJDW0ME21","zip-deliverable-finalization","Ensure codebase deliverables are properly packaged as ZIP exports in a dedicated final step","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fzip-deliverable-finalization\u002FSKILL.md",[],[86,74,76,77,78],"zip deliverable finalization",{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":32},"01M6KG8CMQQ1PYMNTSRZ9VS1MD","zero-iteration-failure-analysis","Identify and handle agent failures with 0 iterations as pre-execution system issues","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fzero-iteration-failure-analysis\u002FSKILL.md",[],[94,95,96,97,98,30,99,20,78,100],"failure analysis","ZeRO","analysis","iteration","zero iteration failure analysis","issues","system",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":112,"publishedAt":32},"01M6KG86W3PA07FT9W58YHHERM","write-file-fallback-report","Generate professional documents using write_file when primary data sources fail, leveraging embedded domain knowledge instead of external retrieval","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fwrite-file-fallback-report\u002FSKILL.md",[107],{"categoryNo":108,"categoryName":109,"taxonomyType":110,"taxonomyTypeDesc":111},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[28,113,114,115,116,117,118,119,120,121,122,123,124,125],"write","file","report","write file fallback report","domain","professional","sources","retrieval","generate","embedded","documents","data","knowledge",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":137,"publishedAt":32},"01M6KG82GAEY3GG77CMGCK1C2T","fallback-doc-with-delegation","Generate professional documents after tool failures using shell_agent for complex formats or write_file for simple text\u002Fmarkdown","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fwrite-file-fallback-report-enhanced\u002FSKILL.md",[132],{"categoryNo":133,"categoryName":134,"taxonomyType":135,"taxonomyTypeDesc":136},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[138,30,28,139,140,27,123,121,114,141,142,143,113,144,118,145,31],"fallback doc with delegation","doc","delegation","markdown","tool","text","simple","formats",{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":153,"publishedAt":32},"01M6KG7WT7GX5NYCGEFHW22NV7","context-anchored-fallback-report","Generate documents with write_file when retrieval tools fail, with explicit guardrails against task context drift","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fwrite-file-fallback-report-enhanced-4bc5c2\u002FSKILL.md",[152],{"categoryNo":108,"categoryName":109,"taxonomyType":110,"taxonomyTypeDesc":111},[28,115,154,155,121,114,156,26,113,157,158,120,30,159,123],"context","context anchored fallback report","Guardrails","task","drift","context drift"]