[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KFX6TK059Z026GMXTQMF1A":3,"skill-same:01M6KFX6TK059Z026GMXTQMF1A":61},{"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":28,"linkOnly":29,"markdownContent":30,"markdownBody":31,"frontMatter":32,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":14,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":38,"ownerDescription":39,"updatedAt":40,"install":41,"resources":54},"01M6KFX6TK059Z026GMXTQMF1A","python-shell-workaround",null,"Workaround for executing Python code with external packages when sandbox fails","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\u002Fpython-shell-workaround\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27],"python","shell","python shell workaround","sandbox","packages","code","with","python code","for","2026-11-10 10:12:30",false,"---\nname: python-shell-workaround\ndescription: Workaround for executing Python code with external packages when sandbox fails\n---\n\n# Python Shell Workaround\n\n## When to Use This Skill\n\nUse this pattern when `execute_code_sandbox` fails with Python code that requires external packages (like `openpyxl`, `python-docx`, `pandas`, etc.) that may not be available in the sandbox environment.\n\n## The Pattern\n\nInstead of relying solely on `execute_code_sandbox`, use `run_shell` with inline Python commands as a fallback:\n\n```bash\npython3 -c \"your python code here\"\n```\n\n## Step-by-Step Instructions\n\n### Step 1: Detect Sandbox Failure\n\nWatch for errors like:\n- ModuleNotFoundError for common packages\n- Import errors for external libraries\n- Sandbox environment limitations\n\n### Step 2: Convert Python Code to Shell Command\n\nTransform your Python script into a one-liner or use a heredoc for longer scripts:\n\n**For simple code:**\n```bash\npython3 -c \"import openpyxl; wb = openpyxl.Workbook(); wb.save('file.xlsx')\"\n```\n\n**For complex code (using heredoc):**\n```bash\npython3 \u003C\u003C 'EOF'\nimport openpyxl\nfrom openpyxl.utils import get_column_letter\n\nwb = openpyxl.Workbook()\nws = wb.active\nws['A1'] = 'Header'\nwb.save('output.xlsx')\nprint('File created successfully')\nEOF\n```\n\n### Step 3: Execute with run_shell\n\nUse `run_shell` to execute the command:\n\n```\ntool: run_shell\ncommand: python3 -c \"import openpyxl; print('Package available')\"\n```\n\n### Step 4: Verify Output\n\nCheck the stdout\u002Fstderr from run_shell to confirm success, then proceed with subsequent steps.\n\n## Best Practices\n\n1. **Escape quotes properly**: Use single quotes inside double-quoted strings or vice versa\n2. **Use heredocs for multiline code**: Cleaner and easier to debug\n3. **Install packages if needed**: Add `pip install package` before your Python command if packages are missing\n4. **Chain commands safely**: Use `&&` to ensure prerequisites succeed before running Python code\n\n## Example Scenarios\n\n### Creating Excel Files\n```bash\npython3 \u003C\u003C 'EOF'\nimport openpyxl\nfrom openpyxl.worksheet.datavalidation import DataValidation\n\nwb = openpyxl.Workbook()\nws = wb.active\nws.title = \"Data\"\n\n# Add headers\nheaders = ['Name', 'Email', 'Status']\nfor col, header in enumerate(headers, 1):\n    ws.cell(row=1, column=col, value=header)\n\nwb.save('output.xlsx')\nEOF\n```\n\n### Creating Word Documents\n```bash\npython3 -c \"\nfrom docx import Document\ndoc = Document()\ndoc.add_heading('Report', 0)\ndoc.save('report.docx')\nprint('Document created')\n\"\n```\n\n## Limitations\n\n- Complex multiline scripts are harder to maintain as one-liners\n- Debugging is less convenient than in sandbox\n- Some packages may still not be available in the shell environment\n\n## Related Patterns\n\n- If packages are truly unavailable, consider installing them first: `pip install package_name && python3 -c \"...\"`\n- For persistent scripts, write to a `.py` file first, then execute with `python3 script.py`","# Python Shell Workaround\n\n## When to Use This Skill\n\nUse this pattern when `execute_code_sandbox` fails with Python code that requires external packages (like `openpyxl`, `python-docx`, `pandas`, etc.) that may not be available in the sandbox environment.\n\n## The Pattern\n\nInstead of relying solely on `execute_code_sandbox`, use `run_shell` with inline Python commands as a fallback:\n\n```bash\npython3 -c \"your python code here\"\n```\n\n## Step-by-Step Instructions\n\n### Step 1: Detect Sandbox Failure\n\nWatch for errors like:\n- ModuleNotFoundError for common packages\n- Import errors for external libraries\n- Sandbox environment limitations\n\n### Step 2: Convert Python Code to Shell Command\n\nTransform your Python script into a one-liner or use a heredoc for longer scripts:\n\n**For simple code:**\n```bash\npython3 -c \"import openpyxl; wb = openpyxl.Workbook(); wb.save('file.xlsx')\"\n```\n\n**For complex code (using heredoc):**\n```bash\npython3 \u003C\u003C 'EOF'\nimport openpyxl\nfrom openpyxl.utils import get_column_letter\n\nwb = openpyxl.Workbook()\nws = wb.active\nws['A1'] = 'Header'\nwb.save('output.xlsx')\nprint('File created successfully')\nEOF\n```\n\n### Step 3: Execute with run_shell\n\nUse `run_shell` to execute the command:\n\n```\ntool: run_shell\ncommand: python3 -c \"import openpyxl; print('Package available')\"\n```\n\n### Step 4: Verify Output\n\nCheck the stdout\u002Fstderr from run_shell to confirm success, then proceed with subsequent steps.\n\n## Best Practices\n\n1. **Escape quotes properly**: Use single quotes inside double-quoted strings or vice versa\n2. **Use heredocs for multiline code**: Cleaner and easier to debug\n3. **Install packages if needed**: Add `pip install package` before your Python command if packages are missing\n4. **Chain commands safely**: Use `&&` to ensure prerequisites succeed before running Python code\n\n## Example Scenarios\n\n### Creating Excel Files\n```bash\npython3 \u003C\u003C 'EOF'\nimport openpyxl\nfrom openpyxl.worksheet.datavalidation import DataValidation\n\nwb = openpyxl.Workbook()\nws = wb.active\nws.title = \"Data\"\n\n# Add headers\nheaders = ['Name', 'Email', 'Status']\nfor col, header in enumerate(headers, 1):\n    ws.cell(row=1, column=col, value=header)\n\nwb.save('output.xlsx')\nEOF\n```\n\n### Creating Word Documents\n```bash\npython3 -c \"\nfrom docx import Document\ndoc = Document()\ndoc.add_heading('Report', 0)\ndoc.save('report.docx')\nprint('Document created')\n\"\n```\n\n## Limitations\n\n- Complex multiline scripts are harder to maintain as one-liners\n- Debugging is less convenient than in sandbox\n- Some packages may still not be available in the shell environment\n\n## Related Patterns\n\n- If packages are truly unavailable, consider installing them first: `pip install package_name && python3 -c \"...\"`\n- For persistent scripts, write to a `.py` file first, then execute with `python3 script.py`",{"name":5,"description":7},"main","af1b40a42167d09c30b3a63000aa14ace4c1e229","gdpval_bench\u002Fskills\u002Fpython-shell-workaround","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":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add xyliu-cs\u002FOpenSpace-GDPval --skill python-shell-workaround",{"tool":47,"command":48},"bunx","bunx skills add xyliu-cs\u002FOpenSpace-GDPval --skill python-shell-workaround",{"tool":50,"command":51},"pnpm","pnpm dlx skills add xyliu-cs\u002FOpenSpace-GDPval --skill python-shell-workaround","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpython-shell-workaround\u002FSKILL.md",true,[55],{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},".skill_id","OTHER","其他",37,"https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpython-shell-workaround\u002F.skill_id",[62,75,83,98,119,134],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":28},"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",[],[69,70,71,72,73,74],"zip export deliverable","zip","export","deliverables","codebase","as",{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":28},"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",[],[82,70,72,73,74],"zip deliverable finalization",{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":28},"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",[],[90,91,92,93,94,25,95,96,74,97],"failure analysis","ZeRO","analysis","iteration","zero iteration failure analysis","issues","execution","system",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":28},"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",[],[105,106,107,108,109,110,111,112,113,114,115,116,117,118],"fallback","write","file","report","write file fallback report","domain","professional","sources","retrieval","generate","embedded","documents","data","knowledge",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":28},"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",[],[126,25,105,127,128,20,116,114,107,129,130,131,106,132,111,133,27],"fallback doc with delegation","doc","delegation","markdown","tool","text","simple","formats",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":28},"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",[],[105,108,141,142,114,107,143,144,106,145,146,113,25,147,116],"context","context anchored fallback report","Guardrails","Tools","task","drift","context drift"]