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

Skill by HKUDS

Document Python Direct Exec guides an AI assistant to run Python scripts directly for spreadsheet and PDF or Word document tasks. It is aimed at complex, multi-step file work that the shell_agent tool may handle poorly.

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

Install document-python-direct-exec

Built from the published package, never by AI.

git clone --depth 1 https://github.com/HKUDS/AgentPilot /tmp/AgentPilot && mkdir -p ~/.claude/skills && cp -r /tmp/AgentPilot/openspace/benchmarks/gdpval/skills/spreadsheet-direct-python-merged-343937 ~/.claude/skills/document-python-direct-exec

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

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

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

About

This agent skill tells an AI assistant to use direct run_shell calls with Python scripts for structured document work. It covers Excel spreadsheets with multiple sheets, formulas and formatting, PDF checklists, reports, invoices and forms, and Word or HTML output. The source says this approach avoids shell_agent step limits, unclear formatting errors, and heredoc parsing failures.

The skill recommends writing a complex script to a .py file first, then running it with python3. It includes examples using pandas, openpyxl, reportlab and fpdf, plus error handling, a library reference table and troubleshooting notes. It is intended for users and assistants handling multi-step spreadsheet or document generation tasks in Python.

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

What it can do

  • Spreadsheet processingReads and writes multi-sheet Excel files, applies formulas, formatting and data transformations.
  • PDF generationCreates PDF checklists, reports, invoices and forms with precise layout control using reportlab or fpdf.
  • Word and HTML outputCreates Word documents with python-docx and HTML reports, and converts HTML to PDF with weasyprint.
  • Script-file executionWrites complex Python scripts to a .py file and runs them with python3 to avoid heredoc issues.
  • Troubleshooting guidanceGives fixes for FileNotFoundError, PermissionError, ModuleNotFoundError, MemoryError and PDF layout problems.

What you need

  • Python 3 with python3 available in the shell
  • Shell execution through run_shell
  • pip install reportlab openpyxl pandas
  • Other libraries as needed, such as fpdf, python-docx or weasyprint

Try asking

  • Read the Revenue sheet from input.xlsx and add a Net_Revenue column.
  • Generate a PDF safety checklist from these five items.
  • Create a formatted Excel report with a styled header row.

Good to know

  • Not intended for simple single-cell reads or writes.
  • Not suited to operations that need interactive user input.
  • Not suited to tasks where the agent must iteratively refine its approach.
  • Suggests pandoc instead when a simpler CLI tool exists for the format.

Security check

A

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

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

Inside the skill

  • .skill_id53 B
  • SKILL.md11 KB

Alternatives to document-python-direct-exec

All alternatives →

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

document-python-direct-exec: common questions

Why use direct Python execution instead of shell_agent?

The source says shell_agent can hit step limits, give unexplained formatting errors, and fail to parse heredoc syntax. Direct run_shell with Python runs in a single step with clearer error messages.

Which Python libraries does this skill cover?

The source lists openpyxl, pandas, xlrd, xlsxwriter, reportlab, fpdf, python-docx and weasyprint, with a note on which to use for each task.

What should I do if a heredoc gives an unknown error?

The source recommends writing the Python script to a .py file first, then running it with python3 script.py. It says this is more reliable when shell_agent is the executor.

How do I install document-python-direct-exec?

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

Is document-python-direct-exec free?

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

Is document-python-direct-exec safe to use?

It scores 88 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-exec?

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

document-python-direct-exec Install

Add to stack

Loading.