[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XC15PVS7F81JHYBSD68Y4V":3,"skill-same:01M6XC15PVS7F81JHYBSD68Y4V":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"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":6,"updatedAt":38,"install":39,"resources":52},"01M6XC15PVS7F81JHYBSD68Y4V","shell-python-heredoc",null,"Execute complex Python code via run_shell heredoc when execute_code_sandbox fails","UF-gzj\u002Fopenspace-claude-evolution","UF-gzj","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F272393507?v=4","01M6XBCZB755P01VVYGQWPYZY3","01M6XBCZFJA5AREA17WGETA3FW",0,"MIT","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fshell-python-heredoc\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27],"python","shell","shell python heredoc","sandbox","run","code","execute","via","python code","when","2026-11-10 10:12:30",false,"---\nname: shell-python-heredoc\ndescription: Execute complex Python code via run_shell heredoc when execute_code_sandbox fails\n---\n\n# Shell Python Heredoc (Fallback Pattern)\n\n## Overview\n\nWhen `execute_code_sandbox` fails repeatedly (e.g., with \"unknown error\"), use `run_shell` with a Python heredoc as a reliable fallback for executing multi-line Python scripts with imports.\n\n## When to Use\n\n- `execute_code_sandbox` has failed 2+ times with unexplained errors\n- You need to run Python code with multiple imports (e.g., ReportLab, pandas)\n- The script is too complex for a one-liner but doesn't require persistence between calls\n- You need better error visibility from raw stdout\u002Fstderr\n\n## How to Use\n\n### Basic Pattern\n\n```python\nrun_shell(\n    command=\"\"\"python3 \u003C\u003C 'EOF'\nimport sys\n# Your Python code here\nprint(\"Hello from heredoc\")\nEOF\"\"\",\n    timeout=300\n)\n```\n\n### Key Syntax Rules\n\n1. **Use `\u003C\u003C 'EOF'`** (with single quotes) to prevent shell variable expansion\n2. **Indent Python code** relative to the heredoc delimiter\n3. **End with `EOF`** on its own line (no leading whitespace)\n4. **Capture output** from stdout\u002Fstderr for debugging\n\n### Example: Generating a PDF with ReportLab\n\n```python\nrun_shell(\n    command=\"\"\"python3 \u003C\u003C 'EOF'\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.pdfgen import canvas\n\nc = canvas.Canvas(\"output.pdf\", pagesize=letter)\nc.drawString(100, 750, \"Hello PDF\")\nc.save()\nprint(\"PDF created successfully\")\nEOF\"\"\",\n    timeout=300\n)\n```\n\n### Example: Multi-file Data Processing\n\n```python\nrun_shell(\n    command=\"\"\"python3 \u003C\u003C 'EOF'\nimport pandas as pd\nimport json\n\n# Load and process data\ndf = pd.read_csv(\"data.csv\")\nsummary = df.describe()\n\n# Output results\nprint(summary.to_string())\nwith open(\"summary.json\", \"w\") as f:\n    json.dump(summary.to_dict(), f)\nprint(\"Processing complete\")\nEOF\"\"\",\n    timeout=300\n)\n```\n\n## Advantages Over execute_code_sandbox\n\n- **More reliable** for complex imports (no sandbox isolation issues)\n- **Full stdout\u002Fstderr** access for debugging\n- **Longer timeout** flexibility (60s default vs 30s)\n- **Direct filesystem access** without ARTIFACT_PATH indirection\n\n## Disadvantages\n\n- **No persistent state** between calls (each heredoc is a fresh process)\n- **Verbose** for simple one-liners\n- **Shell escaping** may be needed for complex string literals\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|----------|\n| `EOF` not recognized | Ensure `EOF` is on its own line with no leading spaces |\n| Import errors | Verify packages are installed in the shell environment |\n| File not found | Use absolute paths or check working directory with `pwd` |\n| Syntax errors | Check Python indentation within heredoc |\n\n## See Also\n\n- Use `execute_code_sandbox` for simpler scripts when available\n- Use `shell_agent` for tasks requiring autonomous iteration and error recovery\n- Consider writing scripts to `.py` files for complex, reusable code","# Shell Python Heredoc (Fallback Pattern)\n\n## Overview\n\nWhen `execute_code_sandbox` fails repeatedly (e.g., with \"unknown error\"), use `run_shell` with a Python heredoc as a reliable fallback for executing multi-line Python scripts with imports.\n\n## When to Use\n\n- `execute_code_sandbox` has failed 2+ times with unexplained errors\n- You need to run Python code with multiple imports (e.g., ReportLab, pandas)\n- The script is too complex for a one-liner but doesn't require persistence between calls\n- You need better error visibility from raw stdout\u002Fstderr\n\n## How to Use\n\n### Basic Pattern\n\n```python\nrun_shell(\n    command=\"\"\"python3 \u003C\u003C 'EOF'\nimport sys\n# Your Python code here\nprint(\"Hello from heredoc\")\nEOF\"\"\",\n    timeout=300\n)\n```\n\n### Key Syntax Rules\n\n1. **Use `\u003C\u003C 'EOF'`** (with single quotes) to prevent shell variable expansion\n2. **Indent Python code** relative to the heredoc delimiter\n3. **End with `EOF`** on its own line (no leading whitespace)\n4. **Capture output** from stdout\u002Fstderr for debugging\n\n### Example: Generating a PDF with ReportLab\n\n```python\nrun_shell(\n    command=\"\"\"python3 \u003C\u003C 'EOF'\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.pdfgen import canvas\n\nc = canvas.Canvas(\"output.pdf\", pagesize=letter)\nc.drawString(100, 750, \"Hello PDF\")\nc.save()\nprint(\"PDF created successfully\")\nEOF\"\"\",\n    timeout=300\n)\n```\n\n### Example: Multi-file Data Processing\n\n```python\nrun_shell(\n    command=\"\"\"python3 \u003C\u003C 'EOF'\nimport pandas as pd\nimport json\n\n# Load and process data\ndf = pd.read_csv(\"data.csv\")\nsummary = df.describe()\n\n# Output results\nprint(summary.to_string())\nwith open(\"summary.json\", \"w\") as f:\n    json.dump(summary.to_dict(), f)\nprint(\"Processing complete\")\nEOF\"\"\",\n    timeout=300\n)\n```\n\n## Advantages Over execute_code_sandbox\n\n- **More reliable** for complex imports (no sandbox isolation issues)\n- **Full stdout\u002Fstderr** access for debugging\n- **Longer timeout** flexibility (60s default vs 30s)\n- **Direct filesystem access** without ARTIFACT_PATH indirection\n\n## Disadvantages\n\n- **No persistent state** between calls (each heredoc is a fresh process)\n- **Verbose** for simple one-liners\n- **Shell escaping** may be needed for complex string literals\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|----------|\n| `EOF` not recognized | Ensure `EOF` is on its own line with no leading spaces |\n| Import errors | Verify packages are installed in the shell environment |\n| File not found | Use absolute paths or check working directory with `pwd` |\n| Syntax errors | Check Python indentation within heredoc |\n\n## See Also\n\n- Use `execute_code_sandbox` for simpler scripts when available\n- Use `shell_agent` for tasks requiring autonomous iteration and error recovery\n- Consider writing scripts to `.py` files for complex, reusable code",{"name":5,"description":7},"main","0650921d63895de3997bc81f1ff1d0ac67032072","gdpval_bench\u002Fskills\u002Fshell-python-heredoc","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution","https:\u002F\u002Fgithub.com\u002FUF-gzj","2026-04-16 09:31:03",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill shell-python-heredoc",{"tool":45,"command":46},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill shell-python-heredoc",{"tool":48,"command":49},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill shell-python-heredoc","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fshell-python-heredoc\u002FSKILL.md",true,[53],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},".skill_id","OTHER","其他",34,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fshell-python-heredoc\u002F.skill_id",[60,84,100,108,133,149],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":28},"01M6XCCXD3NCM2YKR3WNGBASPC","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\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,18],"check","write","write special chars ts check","typescript","filters","characters","Existing","type-checking","for","errors","script","output","type","files","only","template","file",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":28},"01M6XCCT7E3J922Q345PBGSHPN","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\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[91,92,68,83,93,18,94,25,95,96,97,82,98,99,72,75,77],"readback","write special chars readback","helper","post","scripts","cleanup","read","verification","with",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":28},"01M6XCCMQX1R8B6FECWB3P63T7","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\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[107,68,72,19,77,25,82,83,18,75],"write special chars heredoc",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":28},"01M6XCCG41M994JJEX6VN52PEP","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\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[],[115,116,117,118,119,70,120,121,122,123,124,75,125,126,127,128,129,130,131,132],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api","data",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":28},"01M6XCCCHWNKG2W4VH9E6A10HF","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[140,141,142,143,75,144,99,145,146,147,148],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":28},"01M6XCC7X8PKMR2DEW91XGHYSV","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[156,157,158,159,160,161,83,162,163,164],"directory","verify directory structure","structure","verify","access","first","issues","diagnose","file access"]