Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 86
  • 8.1k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-fallback

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install excel-heredoc-fallback in Claude Code

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

A

No 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 →

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.

excel-heredoc-fallback Install

Add to stack

Loading.