openpyxl-sandbox-workaround

openpyxl-sandbox-workaround is a skill for Claude Code, Codex from HKUDS/OpenSpace. It costs 31 tokens per session (786 once invoked), scanned A, original, MIT.

A fallback procedure for running inline Python with openpyxl, a Python library for editing spreadsheet files, when a code sandbox cannot perform the operation.

In plain words
What is it for?
Use it to create, load, edit, or save Excel workbooks through a shell-based Python script.
Why use it?
It gives spreadsheet tasks another execution path when the sandbox fails because of library or environment problems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create, load, edit, or save Excel workbooks through a shell-based Python script.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hkuds/openspace/openpyxl-sandbox-workaround
About the project

OpenSpace is a skill-management layer for AI agents that stores, retrieves, evaluates, shares, and improves reusable workflows. It is intended for people using multiple coding agents who want skills to be reused and refined based on task outcomes. The catalogue provides 200 skills for use with OpenSpace and the agents it supports.

HKUDS/OpenSpace · 7,552 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HKUDS/OpenSpace --skill openpyxl-sandbox-workaround
Clone the repo
git clone --depth 1 https://github.com/HKUDS/OpenSpace

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openpyxl-sandbox-workaround

README.md
[![agentmods](https://agentmods.dev/badge/skills/hkuds/openspace/openpyxl-sandbox-workaround/github.svg)](https://agentmods.dev/skills/hkuds/openspace/openpyxl-sandbox-workaround)
Your own site
<a href="https://agentmods.dev/skills/hkuds/openspace/openpyxl-sandbox-workaround"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/openpyxl-sandbox-workaround/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for openpyxl-sandbox-workaround

Your own site · 80×15
<a href="https://agentmods.dev/skills/hkuds/openspace/openpyxl-sandbox-workaround"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/openpyxl-sandbox-workaround.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 786 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Output Handling · line 68
    Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.
    Fix: Set explicit limits on output length, generation count, and rate. Use max_tokens and truncation to prevent unbounded output.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.00786
Opus 5 $0.00015 $0.00393
Sonnet 5 $0.00006 $0.00157
Haiku 4.5 $0.00003 $0.00079

Measured 6d ago against content hash a2bf520fc155, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

openpyxl-sandbox-workaround scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

benchmarks/gdpval/skills/openpyxl-sandbox-workaround/SKILL.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Openpyxl Sandbox Workaround

When to Use

Use this pattern when execute_code_sandbox repeatedly fails for openpyxl or spreadsheet manipulation tasks. The sandbox environment may have compatibility issues with certain openpyxl operations, but running Python directly via run_shell often succeeds.

Common Failure Indicators

  • execute_code_sandbox returns errors related to openpyxl imports or operations
  • Multiple retry attempts fail with similar errors
  • Errors mention workbook creation, cell writing, or file saving issues

The Workaround Pattern

Instead of using execute_code_sandbox, use run_shell with an inline Python script:

python3 << 'EOF'
from openpyxl import Workbook
from openpyxl.utils import get_column_letter

# Your openpyxl code here
wb = Workbook()
ws = wb.active
ws.title = "Sheet1"

# Add data
ws['A1'] = 'Header'
ws['B1'] = 'Value'

# Save file
wb.save('output.xlsx')
print('File created successfully')
EOF

Multi-Step Spreadsheet Tasks

For complex operations involving multiple files or data processing:

python3 << 'EOF'
from openpyxl import Workbook, load_workbook
import os

# Load existing workbook if needed
if os.path.exists('input.xlsx'):
    wb = load_workbook('input.xlsx')
    ws = wb.active
    # Process data...
    
# Create new workbook
wb = Workbook()
ws = wb.active

# Add data with proper formatting
for row_idx, row_data in enumerate(data, start=1):
    for col_idx, value in enumerate(row_data, start=1):
        ws.cell(row=row_idx, column=col_idx, value=value)

# Auto-adjust column widths
for column in ws.columns:
    max_length = 0
    column_letter = get_column_letter(column[0].column)
    for cell in column:
        try:
            if len(str(cell.value)) > max_length:
                max_length = len(str(cell.value))
        except:
            pass
    adjusted_width = min(max_length + 2, 50)
    ws.column_dimensions[column_letter].width = adjusted_width

wb.save('output.xlsx')
EOF

Best Practices

Read the full file on GitHub · 121 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 121 lines · 31 tokens per session scan A a2bf520fc155

Subscribe to this mod's changes

openpyxl-sandbox-workaround is a skill published in the GitHub repository HKUDS/OpenSpace (7,552 stars, last pushed 28d ago), licensed MIT. It adds 31 tokens to every session and 786 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

spreadsheet-workbook-forensics

Edit, repair, or generate spreadsheet workbooks with structure-preserving Python. Use for Excel or spreadsheet tasks involving .xlsx/.xlsm files, formulas, lookup tables, summaries, formatting preservation, target ranges, workbook QA, or any task where cells must be computed, written, and verified rather than guessed…

markoblogo/abvx-agent-skills · 71 tokens

excel-addin-debugging

Debug and automate Excel add-ins running in WebView2 with Office.js awareness — active range inspection, Office context detection, dialog API handling, and requirement-set probing. Use when the user mentions Office.js, Excel.run, taskpane, ribbon command, named ranges, or an add-in dialog.

dsbissett/excel-webview2-mcp · 65 tokens

bug-report-writer

Converts rough notes, casual descriptions, console errors, or quick observations into professional, complete bug reports — exported as a formatted Excel (.xlsx) file ready for Excel, Google Sheets, Jira, or Azure DevOps. Use this skill whenever the user mentions: "write a bug report", "log a bug", "report this issue"…

ShreyasBh02/AI-Skills-Collection · 186 tokens

troubleshooting

Uses Excel WebView2 MCP and documentation to troubleshoot connection and target issues. Trigger this skill when listpages, newpage, or navigatepage fail, or when the server initialization fails.

dsbissett/excel-webview2-mcp · 41 tokens

dcf-model

Build discounted cash flow valuation workbooks in Excel.

NousResearch/hermes-agent · 14 tokens

audit-xls

Audit a spreadsheet for formula accuracy, errors, and common mistakes. Scopes to a selected range, a single sheet, or the entire model (including financial-model integrity checks like BS balance, cash tie-out, and logic sanity). Triggers on "audit this sheet", "check my formulas", "find formula errors", "QA this…

anthropics/financial-services · 104 tokens