[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KJVBTHS985MX7CR645A3ZT":3,"skill-same:01M6KJVBTHS985MX7CR645A3ZT":59},{"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":27,"linkOnly":28,"markdownContent":29,"markdownBody":30,"frontMatter":31,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":13,"repositoryHtmlUrl":35,"repositoryHomepageUrl":6,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":37,"updatedAt":38,"install":39,"resources":52},"01M6KJVBTHS985MX7CR645A3ZT","python-shell-workaround",null,"Workaround for executing Python code with external packages when sandbox fails","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\u002Fpython-shell-workaround\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26],"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","ff671ef61ed6587c49bd54c81cdc751c0b99e363","gdpval_bench\u002Fskills\u002Fpython-shell-workaround","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":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add AG064\u002FOpenSpace --skill python-shell-workaround",{"tool":45,"command":46},"bunx","bunx skills add AG064\u002FOpenSpace --skill python-shell-workaround",{"tool":48,"command":49},"pnpm","pnpm dlx skills add AG064\u002FOpenSpace --skill python-shell-workaround","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpython-shell-workaround\u002FSKILL.md",true,[53],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},".skill_id","OTHER","其他",37,"https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpython-shell-workaround\u002F.skill_id",[60,82,98,106,136,152],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":27},"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",[],[67,68,69,70,71,72,26,73,74,75,76,77,78,79,80,18,81],"write special chars ts check","check","write","filters","Existing","type-checking","errors","script","output","type","files","only","template","file","typescript",{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":27},"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",[],[89,90,69,79,91,92,80,18,93,94,95,96,97,26,74,24],"readback","write special chars readback","cleanup","read","scripts","verification","via","post","helper",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":27},"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",[],[69,105,18,26,95,79,19,80,74],"write special chars heredoc",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":117,"publishedAt":27},"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",[112],{"categoryNo":113,"categoryName":114,"taxonomyType":115,"taxonomyTypeDesc":116},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[118,119,120,121,81,122,123,124,125,126,26,127,128,129,130,131,132,133,134,135],"reference","worldmonitor","worldmonitor reference","dashboard","css","architecture","extracting","hierarchy","source","layer","panel","patterns","edge functions","integrations","open","api","data","scheduler",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":27},"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",[],[143,144,145,146,26,147,24,148,149,150,151],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":27},"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",[],[159,160,161,162,163,164,80,165,166,167],"directory","verify","structure","verify directory structure","access","first","issues","diagnose","file access"]