excel-heredoc-fallback
Skill by HKUDS
Excel Heredoc Fallback is a skill that creates Excel files with openpyxl. When the code sandbox fails, it runs the same Python through a shell heredoc instead. It suits assistants that need formatted spreadsheets.
Install excel-heredoc-fallback
Built from the published package, never by AI.
git clone --depth 1 https://github.com/HKUDS/OpenSpace /tmp/OpenSpace && mkdir -p ~/.claude/skills && cp -r /tmp/OpenSpace/benchmarks/gdpval/skills/excel-heredoc-fallback ~/.claude/skills/excel-heredoc-fallbackRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/HKUDS/OpenSpace /tmp/OpenSpace && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/OpenSpace/benchmarks/gdpval/skills/excel-heredoc-fallback ~/.gemini/antigravity-cli/skills/excel-heredoc-fallbackAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install excel-heredoc-fallback in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
Excel Heredoc Fallback is an agent skill for creating Excel files with openpyxl. It tells the assistant to try execute_code_sandbox first, then switch to run_shell when the sandbox fails with import errors, permission problems, file write failures, repeated retries, or timeouts. The fallback runs a Python script through a shell heredoc, which the source says supports full openpyxl features such as styling, formulas, and formatting.
The skill also gives guidance on reliable runs. It recommends a single-quoted heredoc delimiter, try/except error handling, print confirmations, and explicit file paths. It ends with an ls check that the file exists and is larger than about 1KB. It is aimed at assistants that must produce spreadsheets when the sandbox cannot run openpyxl code.
Written from the project's SKILL.md and checked against it.
What it can do
- Sandbox first workflowTries execute_code_sandbox first for creating openpyxl workbooks.
- Failure detectionRecognises sandbox failures such as ImportError, permission errors and timeouts.
- Shell heredoc fallbackRuns openpyxl Python code through run_shell using a heredoc when the sandbox fails.
- Cell stylingApplies fonts, fills, alignment and borders to cells.
- Formulas and layoutWrites formulas, sets column widths and row heights, and merges cells.
- Multiple sheetsCreates additional worksheets in a workbook.
- File verificationChecks the created file with ls -lh to confirm it is not empty.
What you need
- Python 3
- openpyxl package (pip install openpyxl)
- execute_code_sandbox tool
- run_shell tool
Try asking
- Create an Excel file with a styled header row and a SUM formula
- Make a spreadsheet with merged title cells and two sheets
- Build an xlsx report, and fall back to the shell if the sandbox fails
Good to know
- Sandbox execution is preferred and the shell method is a fallback.
- Large files may time out, so the run_shell timeout may need increasing.
- Heredoc scripts should stay concise; complex logic is better in a separate .py file.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: benchmarks/gdpval/skills/excel-heredoc-fallback/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to excel-heredoc-fallback
All alternatives →Creates importable JSON templates for the Obsidian Web Clipper. It is for users who want to clip a site, understand the available variables, or format clipped content.
Harness Creator builds, audits, and improves the instruction and state files that help AI coding agents stay reliable across sessions. It is for developers whose agents forget context, drift out of scope, or claim work is done too early.
Guides an assistant through extracting text from scanned PDFs, photographed pages, and images with OCR. Covers backends, language packs, force-OCR, and performance tuning.
Edits a named local file in place to remove AI-writing patterns, using minimal targeted changes and post-edit verification. Built for users who explicitly ask to clean, rewrite, or humanize that specific file.
Polishes, translates, or tightens existing academic manuscript prose while preserving facts, terminology, and evidence boundaries. Made for researchers revising drafts, including Chinese-to-English translation and LaTeX layout fixes.
Adds PDF form analysis and filling, table extraction, OCR, validation and batch processing to an AI assistant. Aimed at developers who run complex or high-volume PDF workflows.
Compare with obsidian-clipper-template-creator, harness-creator or xberg-extracting-with-ocr
excel-heredoc-fallback: common questions
When does this skill switch from the sandbox to the shell?
It switches when execute_code_sandbox fails with import, permission, file write, timeout or resource errors, or after repeated retries without success.
Does it still use Python for the shell method?
Yes. The shell method runs Python 3 from the system through a heredoc, so openpyxl must be available there.
Can it add formatting and formulas to the Excel file?
The source says the shell heredoc approach supports full openpyxl features, including styling, formulas, merged cells and column widths.
How do I install excel-heredoc-fallback?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is excel-heredoc-fallback free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is excel-heredoc-fallback safe to use?
It scores 86 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to excel-heredoc-fallback?
Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.
