spreadsheet-direct-python
Skill by HKUDS
Guides AI assistants to run spreadsheet tasks as direct Python scripts through run_shell instead of shell_agent. It covers multi-sheet Excel reads and writes, formulas, formatting and pandas transformations. It is aimed at complex spreadsheet work that may exceed agent step limits.
Install spreadsheet-direct-python
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/spreadsheet-direct-python ~/.claude/skills/spreadsheet-direct-pythonRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install spreadsheet-direct-python in Claude Code
git clone --depth 1 https://github.com/HKUDS/OpenSpace /tmp/OpenSpace && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/OpenSpace/benchmarks/gdpval/skills/spreadsheet-direct-python ~/.gemini/antigravity-cli/skills/spreadsheet-direct-pythonAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install spreadsheet-direct-python in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is a guide for AI assistants. It tells them to run spreadsheet operations as direct Python scripts through run_shell rather than through shell_agent. It covers reading and writing Excel files with multiple sheets, applying formulas, formatting and data transformations, using libraries such as openpyxl, pandas, xlrd and xlsxwriter.
The source says shell_agent can hit maximum step limits, produce unexplained errors on formatting, and fail on intricate reads and writes. A single run_shell Python script runs in one step. The skill includes a basic heredoc pattern, four examples, best practices and troubleshooting for errors such as FileNotFoundError and PermissionError. It is intended for developers and agents handling complex spreadsheet tasks, not simple single-cell edits.
Written from the project's SKILL.md and checked against it.
What it can do
- Multi-sheet Excel processingLoops through the sheets of a workbook with openpyxl and applies calculations or formatting.
- Pandas data transformationLoads a named sheet, adds calculated columns and saves results with pandas.
- Cell formattingApplies header fills, bold fonts and center alignment using openpyxl styles.
- Error handling patternWraps spreadsheet code in try and except and writes errors to stderr with a non-zero exit.
- Chunked processing guidanceSuggests the pandas chunksize parameter for memory errors on large files.
What you need
- Python
- openpyxl
- pandas
- A run_shell tool for executing scripts
Try asking
- Apply a bold white header on blue to the first row of report.xlsx
- Add a Net_Revenue column to the Revenue sheet in input.xlsx
- Loop through every sheet in tour_data.xlsx and save a processed copy
Good to know
- Not intended for simple single-cell reads or writes.
- Not suited to tasks that need interactive user input.
- Not suited to tasks where the agent must iteratively refine its approach.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: benchmarks/gdpval/skills/spreadsheet-direct-python/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to spreadsheet-direct-python
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
spreadsheet-direct-python: common questions
Why use direct Python instead of shell_agent for spreadsheets?
The source says shell_agent can hit step limits and produce unexplained errors on formatting. It says a direct run_shell Python script runs in a single step with clearer error messages.
Which Python libraries does this skill cover?
The source lists openpyxl for xlsx reading, writing and formatting, pandas for data work, xlrd for reading older .xls files, and xlsxwriter for creating new files with advanced formatting.
When should I skip this skill?
The source says to skip it for simple single-cell reads or writes, which can use shell_agent or basic commands. It also says to skip it for tasks that need interactive user input.
How do I install spreadsheet-direct-python?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is spreadsheet-direct-python free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is spreadsheet-direct-python safe to use?
It scores 85 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 spreadsheet-direct-python?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
