Mathmodel Skill
handsomeZR-netizen/mathmodel-skill
CUMCM 国赛、MCM/ICM 美赛与电工杯数学建模竞赛的端到端协作工作流。Use when a user explicitly works on one of these modeling contests or asks to run/review a modeling-competition paper from problem selection through modeling…
Robust document generation with engine fallback chain, error diagnostics, and Python alternatives
$ npx skills add HKUDS/OpenSpace --skill document-gen-resilient-workflow -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install HKUDS/OpenSpace document-gen-resilient-workflow --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/HKUDS/OpenSpace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced .claude/skills/document-gen-resilient-workflow && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "document-gen-resilient-workflow" agent skill from https://github.com/HKUDS/OpenSpace/tree/main/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced into .claude/skills/document-gen-resilient-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "document-gen-resilient-workflow", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/HKUDS/OpenSpace/tree/main/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhancedType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add HKUDS/OpenSpace --skill document-gen-resilient-workflow -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install HKUDS/OpenSpace document-gen-resilient-workflow --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/OpenSpace.git skills-src && mkdir -p .agents/skills && cp -r skills-src/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced .agents/skills/document-gen-resilient-workflow && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "document-gen-resilient-workflow" agent skill from https://github.com/HKUDS/OpenSpace/tree/main/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced into .agents/skills/document-gen-resilient-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "document-gen-resilient-workflow", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add HKUDS/OpenSpace --skill document-gen-resilient-workflow -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install HKUDS/OpenSpace document-gen-resilient-workflow --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/OpenSpace.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced .cursor/skills/document-gen-resilient-workflow && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "document-gen-resilient-workflow" agent skill from https://github.com/HKUDS/OpenSpace/tree/main/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced into .cursor/skills/document-gen-resilient-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "document-gen-resilient-workflow", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/HKUDS/OpenSpace.git --path benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add HKUDS/OpenSpace --skill document-gen-resilient-workflow -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install HKUDS/OpenSpace document-gen-resilient-workflow --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/OpenSpace.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced .gemini/skills/document-gen-resilient-workflow && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "document-gen-resilient-workflow" agent skill from https://github.com/HKUDS/OpenSpace/tree/main/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced into .gemini/skills/document-gen-resilient-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "document-gen-resilient-workflow", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install HKUDS/OpenSpace document-gen-resilient-workflowInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add HKUDS/OpenSpace --skill document-gen-resilient-workflow -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/HKUDS/OpenSpace.git skills-src && mkdir -p .github/skills && cp -r skills-src/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced .github/skills/document-gen-resilient-workflow && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "document-gen-resilient-workflow" agent skill from https://github.com/HKUDS/OpenSpace/tree/main/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced into .github/skills/document-gen-resilient-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "document-gen-resilient-workflow", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add HKUDS/OpenSpace --skill document-gen-resilient-workflow -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install HKUDS/OpenSpace document-gen-resilient-workflow --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/OpenSpace.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced .opencode/skills/document-gen-resilient-workflow && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "document-gen-resilient-workflow" agent skill from https://github.com/HKUDS/OpenSpace/tree/main/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced into .opencode/skills/document-gen-resilient-workflow/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "document-gen-resilient-workflow", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
document-gen-resilient-workflowRobust document generation with engine fallback chain, error diagnostics, and Python alternatives
Document Gen Resilient Workflow is an agent skill from HKUDS/OpenSpace. Robust document generation with engine fallback chain, error diagnostics, and Python alternatives
Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `sanitize_for_pdf.sh`).
It sits in Documents & Office. It works with Python and LaTeX. The repository describes itself as: "OpenSpace: The Skill Management Layer for AI Agents" -- https://open-space.cloud/. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 3827781. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships script files (Shell), which the agent can run.
Shell commands in SKILL.md call:
pandocapt-getFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Document Gen Resilient Workflow loads about 3.4k tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 820 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from HKUDS/OpenSpace at commit 3827781, republished under its MIT licence (© HKUDS). 820 words, ~3,353 tokens.
.claude/skills/document-gen-resilient-workflow/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Use this skill when document generation tasks encounter tool errors or failures, especially:
run_shell commands return 'unknown error' without diagnostic detailsshell_agent has failed multiple times on similar tasksSplit document generation into observable, verifiable steps with explicit error capture and progressive fallback:
write_file for source Markdown with full visibility'unknown error' from run_shell: This typically indicates:
Solution: Use explicit error capture with 2>&1 and verify tool availability first:
run_shell
command: pandoc --version 2>&1 || echo "PANDOC NOT AVAILABLE"Before starting conversion, verify your environment:
## Pre-Flight Checks
### Check 1: Verify working directory
run_shell
command: pwd && ls -la
### Check 2: Verify pandoc availability
run_shell
command: pandoc --version 2>&1 | head -3 || echo "PANDOC MISSING"
### Check 3: Check LaTeX engines
run_shell
command: which pdflatex xelatex wkhtmltopdf 2>&1 || echo "Some engines missing"
### Check 4: Check Python libraries (fallback option)
run_shell
command: python3 -c "import fpdf; print('fpdf OK')" 2>&1 || echo "fpdf missing"
run_shell
command: python3 -c "import docx; print('python-docx OK')" 2>&1 || echo "python-docx missing"Confirm you're in the correct directory and can write files:
run_shell
command: pwd && echo "Test write" > /tmp/workspace_test_$$.txt && ls -la /tmp/workspace_test_$$.txt && rm /tmp/workspace_test_$$.txtIf this fails, you may have directory permission issues. Use absolute paths for all files.
Write document content as Markdown to a source file:
write_file
path: /tmp/document_source.md
content: |
# Document Title
## Section 1
Content here...Only needed for PDF conversion via LaTeX engines. DOCX and HTML handle Unicode natively.
Create a sanitized version replacing LaTeX-problematic characters:
write_file
path: /tmp/document_source_sanitized.md
content: |
# Document Title
[Same content with: em-dash → --, curly quotes → straight, → arrows → text, etc.]Common replacements (see full table below):
| Original | Replace With |
|---|---|
— (em dash) | -- |
" " (curly quotes) | " " (straight) |
… (ellipsis) | ... |
→ ← (arrows) | -> <- |
✓ ✗ | [x] [ ] |
© ® ™ | (c) (r) (tm) |
Alternative: Use sanitization script (see Scripts section below).
Try multiple methods in order of preference. Capture stderr explicitly for diagnosis.
run_shell
command: pandoc /tmp/document_source.md -o output.docx 2>&1 && echo "SUCCESS" || echo "FAILED: $?"If this fails, try with explicit UTF-8 flag:
run_shell
command: pandoc /tmp/document_source.md -f markdown+utf8 -o output.docx 2>&1Try engines in this order until one succeeds:
run_shell
command: pandoc /tmp/document_source_sanitized.md -o output.pdf 2>&1 | tee /tmp/pdf_error.log && echo "PDF SUCCESS"If Method B fails, check error log and try next engine:
run_shell
command: pandoc /tmp/document_source_sanitized.md --pdf-engine=xelatex -o output.pdf 2>&1 | tee /tmp/pdf_error.log && echo "PDF SUCCESS"If xelatex fails:
run_shell
command: pandoc /tmp/document_source_sanitized.md --pdf-engine=wkhtmltopdf -o output.pdf 2>&1 | tee /tmp/pdf_error.log && echo "PDF SUCCESS"If all pandoc methods fail, use Python libraries:
Option C1: FPDF2 for PDF
execute_code_sandbox
language: python
code: |
from fpdf import FPDF
pdf = FPDF()
pdf.add_page()
pdf.set_font('Arial', 'B', 16)
pdf.cell(40, 10, 'Document Title')
pdf.ln(20)
pdf.set_font('Arial', '', 12)
pdf.multi_cell(0, 10, 'Your content here...')
pdf.output('output.pdf')
print('PDF created successfully')Option C2: python-docx for DOCX
execute_code_sandbox
language: python
code: |
from docx import Document
doc = Document()
doc.add_heading('Document Title', 0)
doc.add_paragraph('Your content here...')
doc.save('output.docx')
print('DOCX created successfully')Don't just check existence—verify files are valid:
run_shell
command: ls -lh output.* 2>&1run_shell
command: file output.docx output.pdf 2>&1For DOCX, verify content:
run_shell
command: unzip -p output.docx word/document.xml 2>&1 | head -50 || echo "Cannot read DOCX"For PDF, check page count:
run_shell
command: pdfinfo output.pdf 2>&1 | grep Pages || echo "pdfinfo not available"Alternative verification via Python:
execute_code_sandbox
code: |
import os
for f in ['output.docx', 'output.pdf', 'output.html']:
if os.path.exists(f):
size = os.path.getsize(f)
print(f'{f}: {size} bytes')
else:
print(f'{f}: NOT FOUND')# Generate Quarterly Report (DOCX + PDF)
## Step 1: Pre-flight checks
run_shell
command: pandoc --version 2>&1 | head -1
## Step 2: Write Markdown source
write_file
path: /tmp/quarterly_report.md
content: |
# Quarterly Business Report
## Executive Summary
Q4 performance exceeded expectations...
## Key Metrics
- Revenue: $1.2M
- Growth: 15%
## Recommendations
Continue current strategy...
## Step 3: Create sanitized version for PDF
write_file
path: /tmp/quarterly_report_sanitized.md
content: |
# Quarterly Business Report
## Executive Summary
Q4 performance exceeded expectations...
[Rest of content with special chars replaced]
## Step 4: Generate DOCX
run_shell
command: pandoc /tmp/quarterly_report.md -o quarterly_report.docx 2>&1 && echo "DOCX OK"
## Step 5: Generate PDF (try xelatex for Unicode safety)
run_shell
command: pandoc /tmp/quarterly_report_sanitized.md --pdf-engine=xelatex -o quarterly_report.pdf 2>&1 && echo "PDF OK"
## Step 6: Verify outputs
run_shell
command: ls -lh quarterly_report.* && file quarterly_report.*| Character | Unicode | Issue | Safe Replacement |
|---|---|---|---|
— | U+2014 | LaTeX incompatible | -- |
– | U+2013 | LaTeX incompatible | - |
" " | U+201C/U+201D | Encoding errors | " (straight) |
' ' | U+2018/U+2019 | Encoding errors | ' (straight) |
… | U+2026 | May not render | ... |
→ | U+2192 | LaTeX incompatible | -> or to |
← | U+2190 | LaTeX incompatible | <- |
↑ ↓ | U+2191/U+2193 | LaTeX incompatible | ^ v |
• | U+2022 | Font-dependent | - or * |
✓ | U+2713 | May not render | [x] |
✗ | U+2717 | May not render | [ ] |
★ ● | U+2605/U+25CF | May not render | * - |
© | U+00A9 | May require packages | (c) |
® | U+00AE | May require packages | (r) |
™ | U+2122 | May require packages | (tm) |
é ñ ü | Various | Font-dependent | Use xelatex or replace |
Save this script for repeated use:
#!/bin/bash
# sanitize_for_pdf.sh - Replace problematic unicode chars for LaTeX/PDF
set -e
if [ -z "$1" ]; then
echo "Usage: $0 <input.md> [output.md]"
exit 1
fi
INPUT="$1"
OUTPUT="${2:-${1%.md}_sanitized.md}"
sed -e 's/—/--/g' \
-e 's/–/-/g' \
-e 's/"\([^"]*\)"/"\1"/g' \
-e "s/'\([^']*\)'/\'\1\'/g" \
-e 's/…/.../g' \
-e 's/→/->/g' \
-e 's/←/<-/g' \
-e 's/↑/^/g' \
-e 's/↓/v/g' \
-e 's/•/-/g' \
-e 's/✓/[x]/g' \
-e 's/✗/[ ]/g' \
-e 's/★/*/g' \
-e 's/©/(c)/g' \
-e 's/®/(r)/g' \
-e 's/™/(tm)/g' \
"$INPUT" > "$OUTPUT"
echo "Sanitized: $INPUT -> $OUTPUT"Usage:
run_shell
command: chmod +x sanitize_for_pdf.sh && ./sanitize_for_pdf.sh /tmp/document_source.md /tmp/document_source_sanitized.mdDiagnosis:
run_shell
command: pandoc --version 2>&1
run_shell
command: echo "test" | pandoc -f markdown -t plain 2>&1If pandoc works in isolation, the issue is likely:
Solutions in order:
--pdf-engine=xelatex--pdf-engine=wkhtmltopdfapt-get install texlive-latex-recommended texlive-fonts-recommendedSolutions:
pandoc -f markdown+utf8file -i source.mdrun_shell
command: iconv -f UTF-8 -t UTF-8 source.md -o source_utf8.mdDiagnosis:
run_shell
command: pdfinfo output.pdf 2>&1execute_code_sandbox
code: |
import fitz # PyMuPDF
doc = fitz.open('output.pdf')
print(f'Pages: {doc.page_count}')
if doc.page_count > 0:
page = doc[0]
print(f'Text: {page.get_text()[:200]}')Solutions:
Diagnosis:
run_shell
command: unzip -l output.docx 2>&1 | head -10Solutions:
--reference-doc with valid templatepandoc -v input.md -o output.docx 2>&1Diagnosis:
run_shell
command: pwd && find /tmp -name "*.docx" -o -name "*.pdf" 2>/dev/null | head -10Solutions:
cd /path/to/workspace && ...run_shell
command: cp /tmp/output.docx ./output.docxSolutions:
df -h .| Situation | Recommended Approach |
|---|---|
| Simple DOCX generation, no special chars | shell_agent (faster) |
| PDF with Unicode/symbols | Manual workflow with sanitization |
| Multiple 'unknown error' failures | Manual workflow with error capture |
| Need to debug conversion issues | Manual workflow (visible steps) |
| Time-critical, simple format | shell_agent |
| Critical document, must succeed | Manual workflow with fallbacks |
For reliability with less manual effort:
## Hybrid Workflow
1. **First attempt**: `shell_agent` with clear task description
2. **On first error**: Switch to manual workflow:
- `write_file` for source
- `run_shell` with error capture (2>&1)
- Verify with explicit checks
3. **On repeated errors**: Use Python library fallback (execute_code_sandbox)
This balances speed with reliability.workspace-path-troubleshooting: For diagnosing file location issuespdf-verification-cli: For validating generated PDFswrite-file-fallback-report: For content-first document creation when web sources failQUICK START: Generate Document in 3 Formats
1. Write source: write_file → /tmp/doc.md
2. Sanitize (PDF only):
Replace: — → --, "" → "", … → ...
3. Convert with error capture:
DOCX: pandoc /tmp/doc.md -o out.docx 2>&1
PDF: pandoc /tmp/doc_sanitized.md --pdf-engine=xelatex -o out.pdf 2>&1
HTML: pandoc /tmp/doc.md -o out.html 2>&1
4. Verify: ls -lh out.* && file out.*
5. If pandoc fails: Use execute_code_sandbox with fpdf2 or python-docx© HKUDS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files in benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced of HKUDS/OpenSpace.
Open the folder on GitHubat commit 3827781
Document Gen Resilient Workflow next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Document Gen Resilient Workflow this skillHKUDS/OpenSpace | 7.8k | — | ~3.4k | Automated safety check: Pass | MIT | |
| Mathmodel SkillhandsomeZR-netizen/mathmodel-skill | 292 | — | ~2.5k | Automated safety check: Pass | MIT | |
| Literature Surveyai4s-research/ai4s-skills | 237 | 2 repos | ~2k | Automated safety check: Pass | MIT | |
| My Mathmodel Agentchengyike20110519-create/MathModelRun | 128 | — | ~2.3k | Automated safety check: Pass | MIT | |
| MineruNebutra/MinerU-Skill | 122 | — | ~504 | Automated safety check: Pass | MIT | |
| Cumcm Live Workflowhaoxilin/cumcm-live-workflow-skill | 181 | — | ~3.6k | Automated safety check: Pass | MIT |
handsomeZR-netizen/mathmodel-skill
CUMCM 国赛、MCM/ICM 美赛与电工杯数学建模竞赛的端到端协作工作流。Use when a user explicitly works on one of these modeling contests or asks to run/review a modeling-competition paper from problem selection through modeling…
ai4s-research/ai4s-skills
A skill your agent uses when the user wants a comprehensive literature survey on a specific research topic.
chengyike20110519-create/MathModelRun
Evidence-driven mathematical modeling contest workflow for CUMCM, MCM/ICM, HiMCM, Huawei Cup, and similar events.
Nebutra/MinerU-Skill
An AI-Native skill for parsing PDF / Office / image files into Markdown with MinerU — a fast, zero-config document parser for AI agents.
haoxilin/cumcm-live-workflow-skill
CUMCM(全国大学生数学建模竞赛)真题全流程实战手册。用于完整打一场数模竞赛(环境准备→读题自查→建模出图→LaTeX论文→交叉审阅→填表→AI自查表终审→清理打包),内含题意理解红线、数值严谨性守则、去AIGC特征清单、写作规范、LaTeX编号与图表规范、2026…
chengyike20110519-create/MathModelRun
Evidence-driven mathematical modeling contest workflow for Claude Code: decompose a problem, select baseline/primary/fallback model routes, validate PoCs, run reproducible Python/AMPL experiments…
HKUDS/OpenSpace
Walks through producing a master audio track plus stems in Python, from checking a reference file and timing sections by BPM to effects, a zip archive and final verification.
HKUDS/OpenSpace
Handle cascading data retrieval tool failures by falling back to embedded knowledge generation
HKUDS/OpenSpace
Gives an agent a workaround when its code-execution sandbox keeps failing: save the Python script to a file and run it through the shell instead.
HKUDS/OpenSpace
A recovery routine for agents whose sandboxed code runner keeps failing: save the Python script to disk, then run it through the shell and read the output.
HKUDS/OpenSpace
Fallback ladder for failed sandboxed code runs, plus the habit of fixing the working directory first so generated files land in the right place.
HKUDS/OpenSpace
Fallback workflow for executing Python code when executecodesandbox fails repeatedly
Categories
Robust document generation with engine fallback chain, error diagnostics, and Python alternatives. Document Gen Resilient Workflow is an agent skill from HKUDS/OpenSpace.
Document Gen Resilient Workflow fits situations like: documents & Office work in your project.
Run `npx skills add HKUDS/OpenSpace --skill document-gen-resilient-workflow -a claude-code`. Or copy the skill folder (benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced in HKUDS/OpenSpace) into .claude/skills/document-gen-resilient-workflow in your project. Claude Code loads it when a task matches its description.
Run `npx skills add HKUDS/OpenSpace --skill document-gen-resilient-workflow -a codex`. Or copy the skill folder (benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced in HKUDS/OpenSpace) into .agents/skills/document-gen-resilient-workflow in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/OpenSpace --skill document-gen-resilient-workflow -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/document-gen-resilient-workflow, .gemini/skills/document-gen-resilient-workflow, .github/skills/document-gen-resilient-workflow and .opencode/skills/document-gen-resilient-workflow in your project.
Going by SKILL.md and its folder, Document Gen Resilient Workflow needs a shell for the scripts in its folder and the command-line tools its instructions call (pandoc and apt-get). Our summary lists: Python 3; A Bash shell.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Document Gen Resilient Workflow is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.4k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Document Gen Resilient Workflow: Mathmodel Skill (handsomeZR-netizen/mathmodel-skill, 292 stars), Literature Survey (ai4s-research/ai4s-skills, 237 stars), My Mathmodel Agent (chengyike20110519-create/MathModelRun, 128 stars) and Mineru (Nebutra/MinerU-Skill, 122 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
HKUDS (a GitHub organization) maintains it in HKUDS/OpenSpace, which has 7,750 GitHub stars. The repository holds 199 skills in this directory. The repository was last updated on August 12, 2026.
Source: HKUDS/OpenSpace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.