Agent skill

Reliable Excel Workbook Creation

by HKUDS in HKUDS/OpenSpace

Use runshell with cd and heredoc syntax for complex Excel operations when readfile fails on XLSX or executecodesandbox fails on multi-step workbook creation

MITAuto-check passedDocuments & Office

Install Reliable Excel Workbook Creation

skills CLI
$ npx skills add HKUDS/OpenSpace --skill reliable-excel-workbook-creation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HKUDS/OpenSpace reliable-excel-workbook-creation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HKUDS/OpenSpace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/benchmarks/gdpval/skills/reliable-excel-workbook-creation .claude/skills/reliable-excel-workbook-creation && rm -rf skills-src

Use ~/.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/

Facts

Skill name
reliable-excel-workbook-creation
GitHub stars
7.8k
Token cost
~987 tokens
SKILL.md length
260 words
Files
2
Skills in repo
199
Repo updated
First seen
Licence
MIT

At a glance

Use runshell with cd and heredoc syntax for complex Excel operations when readfile fails on XLSX or executecodesandbox fails on multi-step workbook creation

  • Works in 4 steps: Change to Workspace Directory → Use Heredoc with Single-Quoted EOF → Write Complete Python Script → …
  • Tasks that involve Excel spreadsheets
  • SKILL.md covers When to Use This Pattern, Core Pattern, Step-by-Step Instructions and Complete Example, plus 4 more sections
  • Calls python3

What it does

Reliable Excel Workbook Creation is an agent skill from HKUDS/OpenSpace. Use runshell with cd and heredoc syntax for complex Excel operations when readfile fails on XLSX or executecodesandbox fails on multi-step workbook creation

Its SKILL.md is about 990 tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.

It sits in Documents & Office, covering Excel spreadsheets. It works with Microsoft Excel. The repository describes itself as: "OpenSpace: The Skill Management Layer for AI Agents" -- https://open-space.cloud/. The licence is MIT.

When your agent uses it

  • Tasks that involve Excel spreadsheets

Example prompts

  • “/reliable-excel-workbook-creation”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Change to Workspace Directory
  2. Use Heredoc with Single-Quoted EOF
  3. Write Complete Python Script
  4. Use Absolute Paths for Save Operations

What it can do on your machine

Read from SKILL.md and the folder at commit 3827781. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Reliable Excel Workbook Creation loads about 987 tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 260 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~48
When it runs · the whole SKILL.md, loaded when a task matches
~987

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from HKUDS/OpenSpace at commit 3827781, republished under its MIT licence (© HKUDS). 260 words, ~987 tokens.

Download SKILL.mdSave it as .claude/skills/reliable-excel-workbook-creation/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
reliable-excel-workbook-creation
description
Use run_shell with cd and heredoc syntax for complex Excel operations when read_file fails on XLSX or execute_code_sandbox fails on multi-step workbook creation

Reliable Excel Workbook Creation via Shell

When to Use This Pattern

Use this technique when you need to:

  • Create complex Excel workbooks with multiple sheets
  • Perform multi-step workbook operations (create, populate, format, save)
  • Work with XLSX files that read_file cannot handle properly
  • Avoid failures from execute_code_sandbox on persistent file operations

Avoid: read_file for XLSX files, execute_code_sandbox for multi-step workbook creation

Core Pattern

bash
cd /workspace && python3 << 'EOF'
from openpyxl import Workbook
# Your Excel operations here
wb = Workbook()
# ... create sheets, add data, save
wb.save('/workspace/filename.xlsx')
EOF

Step-by-Step Instructions

Step 1: Change to Workspace Directory

Always start with cd /workspace && to ensure file paths resolve correctly.

Step 2: Use Heredoc with Single-Quoted EOF

Use << 'EOF' (single quotes) to prevent shell variable expansion within the Python code.

Step 3: Write Complete Python Script

Include all imports, workbook creation, data population, and save operations in one script.

Step 4: Use Absolute Paths for Save Operations

Always save with full path: /workspace/your_filename.xlsx

Complete Example

bash
cd /workspace && python3 << 'EOF'
from openpyxl import Workbook
from openpyxl.styles import Font, Alignment, PatternFill

# Create workbook
wb = Workbook()

# Create multiple sheets
sheets = ['Summary', 'Data', 'Analysis', 'Settings']
for sheet_name in sheets:
    wb.create_sheet(title=sheet_name)

# Remove default sheet if needed
if 'Sheet' in wb.sheetnames:
    del wb['Sheet']

# Populate data
ws = wb['Data']
ws['A1'] = 'Item'
ws['B1'] = 'Value'
ws['A2'] = 'Revenue'
ws['B2'] = 100000

# Apply formatting
header_font = Font(bold=True)
for cell in ws['1:1']:
    cell.font = header_font

# Save workbook
wb.save('/workspace/report.xlsx')
print('Workbook created successfully: /workspace/report.xlsx')
EOF

Why This Works

ApproachProblemSolution
read_fileCannot parse XLSX binary formatDon't use for Excel files
execute_code_sandboxFile persistence issues, multi-step failuresUse run_shell instead
run_shell with heredoc✓ Reliable, full control, persistent filesUse this pattern

Common Operations

Create Multi-Sheet Workbook
bash
cd /workspace && python3 << 'EOF'
from openpyxl import Workbook
wb = Workbook()
sheet_names = ['Sheet1', 'Sheet2', 'Sheet3']
for name in sheet_names:
    wb.create_sheet(title=name)
wb.save('/workspace/multi_sheet.xlsx')
EOF
Read and Modify Existing Workbook
bash
cd /workspace && python3 << 'EOF'
from openpyxl import load_workbook
wb = load_workbook('/workspace/existing.xlsx')
ws = wb.active
ws['A1'] = 'Updated Value'
wb.save('/workspace/existing.xlsx')
EOF
Add Formulas
bash
cd /workspace && python3 << 'EOF'
from openpyxl import Workbook
wb = Workbook()
ws = wb.active
ws['A1'] = 100
ws['A2'] = 200
ws['A3'] = '=SUM(A1:A2)'
wb.save('/workspace/with_formulas.xlsx')
EOF

Troubleshooting

  • File not found: Ensure you use /workspace/ prefix in all paths
  • Permission errors: Verify workspace directory is writable
  • Module not found: openpyxl is pre-installed in the environment
  • Heredoc issues: Use single-quoted 'EOF' to prevent shell interpretation

Best Practices

  1. Always use absolute paths (/workspace/filename.xlsx)
  2. Single-quoted heredoc (<< 'EOF') prevents variable expansion
  3. Complete script in one heredoc - avoid splitting operations
  4. Print confirmation after save to verify success
  5. Handle exceptions for production scripts

© HKUDS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in benchmarks/gdpval/skills/reliable-excel-workbook-creation of HKUDS/OpenSpace.

  • SKILL.md
  • .skill_id

Open the folder on GitHubat commit 3827781

Compare with similar skills

Reliable Excel Workbook Creation 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.

Reliable Excel Workbook Creation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Reliable Excel Workbook Creation this skillHKUDS/OpenSpace7.8k—~987Automated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Data Table Managern8n-io/n8n207k—~2.3kAutomated safety check: PassCustom licence
Docx4jplutext/docx4j2.4k—~2.5kAutomated safety check: PassNone
Instrument Data To Allotropeaws-samples/amazon-bedrock-agents-healthcare-lifesciences2742 repos~2.7kAutomated safety check: PassApache-2.0
Cyber Pptcrazyykhllc-bit/CyberPPT1.8k—~10kAutomated safety check: PassMIT

Similar skills

  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Official

    Load before calling data-tables or parse-file. An agent skill from n8n-io/n8n.

    207k GitHub stars~2.3k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Docx4j

    plutext/docx4j

    A skill your agent uses when writing Java code that creates, reads or edits Word (.docx), PowerPoint (.pptx) or Excel (.xlsx) files with docx4j — including generating documents, editing existing…

    2.4k GitHub stars~2.5k tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Instrument Data To Allotrope

    aws-samples/amazon-bedrock-agents-healthcare-lifesciences

    Official

    Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV.

    274 GitHub starsUsed in 2 repos~2.7k tokens
    Documents & OfficeAuto-check passed
  • Cyber Ppt

    crazyykhllc-bit/CyberPPT

    当用户需要把 DOCX、PDF、TXT、XLSX、研究报告、业务材料或原始数据转成高密度、可编辑、咨询风格 PPTX 时使用;也适用于需要 SCR 论证、视觉风格探索、详细图表和渲染质检的 PPT。

    1.8k GitHub stars~10k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check passed
  • Jev SEO

    AgriciDaniel/jev-seo

    Full live SEO audit of any website from its homepage URL, powered by Jev (TypeSafe's System One model).

    543 GitHub stars~2.5k tokensUpdated 18 days ago
    Documents & OfficeAuto-check: notes

More from HKUDS/OpenSpace

All 199 skills in this repo
  • 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.

    7.8k GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Handle cascading data retrieval tool failures by falling back to embedded knowledge generation

    7.8k GitHub stars~765 tokensUpdated 1 mo ago
    Auto-check passed
  • 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.

    7.8k GitHub stars~588 tokensUpdated 1 mo ago
    Auto-check passed
  • 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.

    7.8k GitHub stars~652 tokensUpdated 1 mo ago
    Auto-check passed
  • Fallback ladder for failed sandboxed code runs, plus the habit of fixing the working directory first so generated files land in the right place.

    7.8k GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Fallback workflow for executing Python code when executecodesandbox fails repeatedly

    7.8k GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Reliable Excel Workbook Creation

What does Reliable Excel Workbook Creation do?

Use runshell with cd and heredoc syntax for complex Excel operations when readfile fails on XLSX or executecodesandbox fails on multi-step workbook creation. Reliable Excel Workbook Creation is an agent skill from HKUDS/OpenSpace.

When should I use Reliable Excel Workbook Creation?

Reliable Excel Workbook Creation fits situations like: tasks that involve Excel spreadsheets.

How do I install Reliable Excel Workbook Creation in Claude Code?

Run `npx skills add HKUDS/OpenSpace --skill reliable-excel-workbook-creation -a claude-code`. Or copy the skill folder (benchmarks/gdpval/skills/reliable-excel-workbook-creation in HKUDS/OpenSpace) into .claude/skills/reliable-excel-workbook-creation in your project. Claude Code loads it when a task matches its description.

How do I install Reliable Excel Workbook Creation in Codex?

Run `npx skills add HKUDS/OpenSpace --skill reliable-excel-workbook-creation -a codex`. Or copy the skill folder (benchmarks/gdpval/skills/reliable-excel-workbook-creation in HKUDS/OpenSpace) into .agents/skills/reliable-excel-workbook-creation in your project. Codex loads it when a task matches its description.

Can I use Reliable Excel Workbook Creation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/OpenSpace --skill reliable-excel-workbook-creation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/reliable-excel-workbook-creation, .gemini/skills/reliable-excel-workbook-creation, .github/skills/reliable-excel-workbook-creation and .opencode/skills/reliable-excel-workbook-creation in your project.

What does Reliable Excel Workbook Creation need to run?

Going by SKILL.md and its folder, Reliable Excel Workbook Creation needs the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Reliable Excel Workbook Creation access the network?

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.

Is Reliable Excel Workbook Creation safe to install?

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.

What licence does Reliable Excel Workbook Creation use?

Reliable Excel Workbook Creation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Reliable Excel Workbook Creation use?

About 987 tokens (SKILL.md is roughly 3.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Reliable Excel Workbook Creation?

Skills that share tags, products or a category with Reliable Excel Workbook Creation: Markitdown (ImCa0/just-laws, 781 stars), Data Table Manager (n8n-io/n8n, 207k stars), Docx4j (plutext/docx4j, 2.4k stars) and Instrument Data To Allotrope (aws-samples/amazon-bedrock-agents-healthcare-lifesciences, 274 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Reliable Excel Workbook Creation?

HKUDS (a GitHub organization) maintains it in HKUDS/OpenSpace, which has 7,754 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.