用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/HKUDS/OpenSpace --skill pdf-gen-fallback命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Incremental audio production with duration mismatch handling, adaptive stem extension, and pre-mix alignment verification
Audio production with diagnostic analysis, timecode parsing from documents, and verified export workflow
Incremental audio production with duration alignment handling, per-stem verification, and adaptive extension strategies
基于 SOC 职业分类
正在显示 SKILL.md
| name | pdf-gen-fallback |
| description | Reliable PDF generation using shell-based Python execution when sandbox fails |
This 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.
execute_code_sandbox fails with cryptic error messages during document/PDF generationBefore attempting generation, verify that required libraries are installed:
run_shell command="python -c \"import reportlab; print('reportlab available')\""
run_shell command="python -c \"import fpdf; print('fpdf available')\""
run_shell command="python -c \"import pypdf; print('pypdf available')\""
Try the sandbox approach initially (it's cleaner for iteration):
execute_code_sandbox code="""
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas
c = canvas.Canvas("output.pdf", pagesize=letter)
c.drawString(100, 750, "Document Content")
c.save()
print("ARTIFACT_PATH:/path/to/output.pdf")
"""
Watch for these failure indicators:
If sandbox fails, use direct shell execution:
run_shell command="python -c \"
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas
c = canvas.Canvas('output.pdf', pagesize=letter)
c.drawString(100, 750, 'Document Content')
c.save()
print('PDF created successfully')
\""
After generation, confirm the file exists:
run_shell command="ls -la output.pdf && file output.pdf"
1. Check libraries: run_shell "python -c \"import reportlab\""
2. Try sandbox: execute_code_sandbox with PDF generation code
3. If error detected: Fall back to run_shell with python -c
4. Verify: run_shell "ls -la *.pdf"
5. Read result: read_file filetype="pdf" file_path="output.pdf"
run_shell command="pip install reportlab"If reportlab is unavailable, try:
fpdf - Simpler API, good for basic PDFsweasyprint - HTML/CSS to PDF conversionpypdf - PDF manipulation and merging