[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KJC77H6M8NREXQJDHPMPH2":3,"skill-same:01M6KJC77H6M8NREXQJDHPMPH2":64},{"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":22,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":13,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M6KJC77H6M8NREXQJDHPMPH2","pdf-gen-fallback",null,"Reliable PDF generation using shell-based Python execution 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\u002Fpdf-gen-fallback\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31],"PDF","fallback","pdf gen fallback","python","sandbox","execution","shell","generation","pdf generation","2026-11-10 10:12:30",false,"---\nname: pdf-gen-fallback\ndescription: Reliable PDF generation using shell-based Python execution when sandbox fails\n---\n\n# PDF Generation Fallback\n\nThis skill provides a reliable workflow for generating PDFs and documents when `execute_code_sandbox` returns opaque errors. Use direct `run_shell` with `python -c` as a fallback, with library availability checks and explicit error handling.\n\n## When to Use\n\n- `execute_code_sandbox` fails with cryptic error messages during document\u002FPDF generation\n- You need to generate PDFs, reports, or structured documents\n- Standard library execution is unreliable for document creation tasks\n\n## Step-by-Step Procedure\n\n### Step 1: Check Library Availability\n\nBefore attempting generation, verify that required libraries are installed:\n\n```bash\nrun_shell command=\"python -c \\\"import reportlab; print('reportlab available')\\\"\"\nrun_shell command=\"python -c \\\"import fpdf; print('fpdf available')\\\"\"\nrun_shell command=\"python -c \\\"import pypdf; print('pypdf available')\\\"\"\n```\n\n### Step 2: Attempt execute_code_sandbox First\n\nTry the sandbox approach initially (it's cleaner for iteration):\n\n```python\nexecute_code_sandbox code=\"\"\"\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.pdfgen import canvas\n\nc = canvas.Canvas(\"output.pdf\", pagesize=letter)\nc.drawString(100, 750, \"Document Content\")\nc.save()\nprint(\"ARTIFACT_PATH:\u002Fpath\u002Fto\u002Foutput.pdf\")\n\"\"\"\n```\n\n### Step 3: Detect Opaque Errors\n\nWatch for these failure indicators:\n- Generic \"execution failed\" messages\n- Import errors that don't match library availability checks\n- Timeout errors during document rendering\n- Missing artifact paths in output\n\n### Step 4: Fall Back to run_shell\n\nIf sandbox fails, use direct shell execution:\n\n```bash\nrun_shell command=\"python -c \\\"\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.pdfgen import canvas\nc = canvas.Canvas('output.pdf', pagesize=letter)\nc.drawString(100, 750, 'Document Content')\nc.save()\nprint('PDF created successfully')\n\\\"\"\n```\n\n### Step 5: Verify Output\n\nAfter generation, confirm the file exists:\n\n```bash\nrun_shell command=\"ls -la output.pdf && file output.pdf\"\n```\n\n## Complete Example Workflow\n\n```\n1. Check libraries: run_shell \"python -c \\\"import reportlab\\\"\"\n2. Try sandbox: execute_code_sandbox with PDF generation code\n3. If error detected: Fall back to run_shell with python -c\n4. Verify: run_shell \"ls -la *.pdf\"\n5. Read result: read_file filetype=\"pdf\" file_path=\"output.pdf\"\n```\n\n## Error Handling Tips\n\n- Capture stderr from run_shell to diagnose issues\n- Use absolute paths when possible to avoid working directory issues\n- For complex documents, write the Python script to a file first, then execute\n- Consider installing missing libraries: `run_shell command=\"pip install reportlab\"`\n\n## Library Alternatives\n\nIf reportlab is unavailable, try:\n- `fpdf` - Simpler API, good for basic PDFs\n- `weasyprint` - HTML\u002FCSS to PDF conversion\n- `pypdf` - PDF manipulation and merging\n\n## Common Pitfalls\n\n- Don't assume sandbox errors mean the approach is wrong—often it's环境 issues\n- Always verify the PDF was created before proceeding\n- Handle encoding issues explicitly (use utf-8)\n- For images in PDFs, ensure image files are accessible to the execution context","# PDF Generation Fallback\n\nThis skill provides a reliable workflow for generating PDFs and documents when `execute_code_sandbox` returns opaque errors. Use direct `run_shell` with `python -c` as a fallback, with library availability checks and explicit error handling.\n\n## When to Use\n\n- `execute_code_sandbox` fails with cryptic error messages during document\u002FPDF generation\n- You need to generate PDFs, reports, or structured documents\n- Standard library execution is unreliable for document creation tasks\n\n## Step-by-Step Procedure\n\n### Step 1: Check Library Availability\n\nBefore attempting generation, verify that required libraries are installed:\n\n```bash\nrun_shell command=\"python -c \\\"import reportlab; print('reportlab available')\\\"\"\nrun_shell command=\"python -c \\\"import fpdf; print('fpdf available')\\\"\"\nrun_shell command=\"python -c \\\"import pypdf; print('pypdf available')\\\"\"\n```\n\n### Step 2: Attempt execute_code_sandbox First\n\nTry the sandbox approach initially (it's cleaner for iteration):\n\n```python\nexecute_code_sandbox code=\"\"\"\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.pdfgen import canvas\n\nc = canvas.Canvas(\"output.pdf\", pagesize=letter)\nc.drawString(100, 750, \"Document Content\")\nc.save()\nprint(\"ARTIFACT_PATH:\u002Fpath\u002Fto\u002Foutput.pdf\")\n\"\"\"\n```\n\n### Step 3: Detect Opaque Errors\n\nWatch for these failure indicators:\n- Generic \"execution failed\" messages\n- Import errors that don't match library availability checks\n- Timeout errors during document rendering\n- Missing artifact paths in output\n\n### Step 4: Fall Back to run_shell\n\nIf sandbox fails, use direct shell execution:\n\n```bash\nrun_shell command=\"python -c \\\"\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.pdfgen import canvas\nc = canvas.Canvas('output.pdf', pagesize=letter)\nc.drawString(100, 750, 'Document Content')\nc.save()\nprint('PDF created successfully')\n\\\"\"\n```\n\n### Step 5: Verify Output\n\nAfter generation, confirm the file exists:\n\n```bash\nrun_shell command=\"ls -la output.pdf && file output.pdf\"\n```\n\n## Complete Example Workflow\n\n```\n1. Check libraries: run_shell \"python -c \\\"import reportlab\\\"\"\n2. Try sandbox: execute_code_sandbox with PDF generation code\n3. If error detected: Fall back to run_shell with python -c\n4. Verify: run_shell \"ls -la *.pdf\"\n5. Read result: read_file filetype=\"pdf\" file_path=\"output.pdf\"\n```\n\n## Error Handling Tips\n\n- Capture stderr from run_shell to diagnose issues\n- Use absolute paths when possible to avoid working directory issues\n- For complex documents, write the Python script to a file first, then execute\n- Consider installing missing libraries: `run_shell command=\"pip install reportlab\"`\n\n## Library Alternatives\n\nIf reportlab is unavailable, try:\n- `fpdf` - Simpler API, good for basic PDFs\n- `weasyprint` - HTML\u002FCSS to PDF conversion\n- `pypdf` - PDF manipulation and merging\n\n## Common Pitfalls\n\n- Don't assume sandbox errors mean the approach is wrong—often it's环境 issues\n- Always verify the PDF was created before proceeding\n- Handle encoding issues explicitly (use utf-8)\n- For images in PDFs, ensure image files are accessible to the execution context",{"name":5,"description":7},"main","ff671ef61ed6587c49bd54c81cdc751c0b99e363","gdpval_bench\u002Fskills\u002Fpdf-gen-fallback","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":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add AG064\u002FOpenSpace --skill pdf-gen-fallback",{"tool":50,"command":51},"bunx","bunx skills add AG064\u002FOpenSpace --skill pdf-gen-fallback",{"tool":53,"command":54},"pnpm","pnpm dlx skills add AG064\u002FOpenSpace --skill pdf-gen-fallback","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-gen-fallback\u002FSKILL.md",true,[58],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},".skill_id","OTHER","其他",30,"https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-gen-fallback\u002F.skill_id",[65,88,105,113,143,159],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":32},"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",[],[72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,26,87],"write special chars ts check","check","write","filters","Existing","type-checking","for","errors","script","output","type","files","only","template","file","typescript",{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":32},"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",[],[95,96,74,85,97,98,86,26,99,100,101,102,103,78,80,104],"readback","write special chars readback","cleanup","read","scripts","verification","via","post","helper","with",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":32},"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",[],[74,112,26,78,101,85,29,86,80],"write special chars heredoc",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":124,"publishedAt":32},"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",[119],{"categoryNo":120,"categoryName":121,"taxonomyType":122,"taxonomyTypeDesc":123},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[125,126,127,128,87,129,130,131,132,133,78,134,135,136,137,138,139,140,141,142],"reference","worldmonitor","worldmonitor reference","dashboard","css","architecture","extracting","hierarchy","source","layer","panel","patterns","edge functions","integrations","open","api","data","scheduler",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":32},"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",[],[150,151,152,153,78,154,104,155,156,157,158],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":32},"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",[],[166,167,168,169,170,171,86,172,173,174],"directory","verify","structure","verify directory structure","access","first","issues","diagnose","file access"]