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

document-python-direct

Skill by HKUDS

Runs Python scripts directly for spreadsheet and PDF work, such as Excel edits and PDF report generation. Written for AI assistants that need a more reliable path than shell_agent for complex document tasks.

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

Install document-python-direct

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-merged-f07ee1 ~/.claude/skills/document-python-direct

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

Step-by-step: install document-python-direct in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

Direct Python Execution for Document and Spreadsheet Tasks is an agent skill that tells an AI assistant to run Python scripts with run_shell for spreadsheet and PDF work. It covers reading and writing Excel files, applying formulas and formatting, and generating PDF reports, checklists, or forms. The skill names openpyxl, pandas, reportlab, fpdf2, xlrd, xlsxwriter and python-docx as common libraries.

The guide says a script should be written to a .py file first and then executed, because the shell_agent tool can hit step limits and fail on heredoc syntax. It includes examples for Excel transforms, multi-sheet work, formatting, reportlab and fpdf2 PDFs, and an error handling pattern. It is aimed at developers and agents who need reliable control over complex document operations.

Written from the project's SKILL.md and checked against it.

What it can do

  • Excel reading and writingReads and writes complex Excel files with multiple sheets using openpyxl or pandas.
  • Spreadsheet formattingApplies formulas, cell formatting and data transformations to spreadsheets.
  • PDF reportsGenerates PDF reports with reportlab for complex layouts.
  • PDF checklistsCreates simple PDF checklists and basic documents with fpdf2.
  • Spreadsheet to PDF workflowProcesses spreadsheet data and writes a summary PDF in one script.
  • Word documentsLists python-docx for creating and editing Word documents.
  • Error handlingWraps scripts in try and except blocks with clear error messages.

What you need

  • Python 3 with the python3 command
  • Access to the run_shell tool
  • pip to install openpyxl, pandas, reportlab or fpdf2

Try asking

  • Process data.xlsx and save a formatted copy with a blue header row.
  • Create a PDF safety checklist with four items using fpdf2.
  • Read the Revenue sheet in input.xlsx and add a Net_Revenue column.

Good to know

  • Not intended for simple single-cell reads or writes.
  • Not for operations that need interactive user input.
  • PDF text needs Unicode-compatible fonts to avoid encoding errors.
  • Very large files may need chunked processing with pandas.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: benchmarks/gdpval/skills/spreadsheet-direct-python-merged-f07ee1/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to document-python-direct

All alternatives →

Compare with obsidian-clipper-template-creator, harness-creator or xberg-extracting-with-ocr

document-python-direct: common questions

When should I use this skill instead of shell_agent?

The source recommends it for complex multi-step spreadsheet or PDF work that may exceed agent step limits, or when heredoc parsing fails.

Which Python libraries does it cover?

It names openpyxl, pandas, xlrd, xlsxwriter, reportlab, fpdf2 and python-docx.

What should I do if a heredoc script fails with an unknown error?

The source says to write the script to a .py file and run it with python3 script.py, which it describes as more reliable.

How do I install document-python-direct?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is document-python-direct free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is document-python-direct 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 document-python-direct?

Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.

document-python-direct Install

Add to stack

Loading.