[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6HXX9425A65QNHAJAP20C30":3,"skill-same:01M6HXX9425A65QNHAJAP20C30":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":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M6HXX9425A65QNHAJAP20C30","safe-script-execution",null,"Fallback workflow for code execution when automated tools fail, using shell heredoc with verification","HKUDS\u002FAgentPilot","HKUDS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F118165258?v=4","01M6HW8VRNZP64G0P4MVJW2KKQ","✨Data Intelligence Lab@HKU✨","01M6HW8VWZVHBRHYH3T330PFWV",8029,"MIT","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Flegacy\u002Fv1\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","6b84b0689ca0d9e7b1e4061188ff6b60758e0f8a","openspace\u002Flegacy\u002Fv1\u002Fgdpval_bench\u002Fskills\u002Fsafe-script-execution",944,"https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot","https:\u002F\u002Fgithub.com\u002FHKUDS","https:\u002F\u002Fsites.google.com\u002Fview\u002Fchaoh","2026-11-12 22:26:39",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add HKUDS\u002FAgentPilot --skill safe-script-execution",{"tool":51,"command":52},"bunx","bunx skills add HKUDS\u002FAgentPilot --skill safe-script-execution",{"tool":54,"command":55},"pnpm","pnpm dlx skills add HKUDS\u002FAgentPilot --skill safe-script-execution","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Flegacy\u002Fv1\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\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Flegacy\u002Fv1\u002Fgdpval_bench\u002Fskills\u002Fsafe-script-execution\u002F.skill_id",[66,85,104,123,145,167],{"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},"01M6HYB297NDABRERJRVG0K8R0","agentpilot","Set up AgentPilot and use its single entry to prepare missing inputs and run configured RSI experiments. Use when the user requests AgentPilot installation or work with AgentPilot.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fplugins\u002Fagentpilot\u002Fskills\u002Fagentpilot\u002FSKILL.md",[],[68,73,74,30,75,76,77,78,79,80,81,82,83,84],"prepare","requests","missing","installation","rsi","up","use","user","work","SET","run","experiments",{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":32},"01M6HYAYWXTTE1J7DJM0MFNQ4H","remember","Review auto-memory entries and propose promotions to OPENSPACE.md, OPENSPACE.local.md, or retained auto-memory topics; detect duplicates, stale facts, conflicts, and ambiguous entries before making changes.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fopenspace\u002Fskills\u002Fremember\u002FSKILL.md",[],[87,92,93,94,95,96,97,98,99,100,101,102,103],"memory","review","auto","openspace","changes","facts","detect","entries","local","conflicts","stale","duplicates",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":32},"01M6HYAVMPM4SBDV60R2B5HPV8","skill-discovery","Search reusable OpenSpace skills locally, and browse cloud packages step by step when a cloud skill may help. Reusing proven skills saves tokens, improves reliability, and extends your capabilities beyond built-in tools.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fopenspace\u002Fhost_skills\u002Fskill-discovery\u002FSKILL.md",[],[111,112,113,95,114,115,116,117,118,119,120,121,122,26],"skill discovery","discovery","reusable","step by step","tokens","packages","help","cloud","reliability","capabilities","browse","search",{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":32},"01M6HYAR811B3RB0M50RBEDGN6","delegate-task","Delegate tasks to OpenSpace — a full-stack autonomous worker for coding, DevOps, web research, and desktop automation, backed by an extensive MCP tool and skill library. Skills auto-improve through use, reducing token consumption over time. A cloud community lets agents share and collectively evolve reusable skills.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fopenspace\u002Fhost_skills\u002Fdelegate-task\u002FSKILL.md",[],[130,131,132,95,133,134,135,136,137,113,94,79,138,139,140,31,141,142,143,144],"delegate","task","delegate task","time","improve","desktop automation","worker","community","autonomous","tool","stack","share","tasks","automation","MCP",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":32},"01M6HYAM9FSGV6E52AYENDQXYH","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\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Flegacy\u002Fv1\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[152,153,154,155,156,157,158,159,160,161,162,163,164,165,31,166,21],"write special chars ts check","write","check","type","files","filters","only","template","file","python","typescript","output","Existing","type-checking","errors",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":173,"publishedAt":32},"01M6HYAH05HGV7SVWSVR8PJRQD","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\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Flegacy\u002Fv1\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[174,175,153,30,31,21,176,177,178,179,180,159,160,25,181,161],"write special chars readback","readback","helper","post","via","scripts","read","cleanup"]