document-direct-python

document-direct-python is a skill for Claude Code, Codex from HKUDS/OpenSpace. It costs 20 tokens per session (2,551 once invoked), scanned A, original, MIT.

A workflow for using Python to create documents such as spreadsheets, PDFs, and structured reports.

In plain words
What is it for?
It helps read and write Excel workbooks, generate PDFs and reports, and handle document errors directly.
Why use it?
It provides more reliable control for multi-step document tasks involving formatting, formulas, data transformations, or complex files.

Skill for Claude CodeCodex

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

Good fit It helps read and write Excel workbooks, generate PDFs and reports, and handle document errors directly.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hkuds/openspace/spreadsheet-direct-python-merged
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,771 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 spreadsheet-direct-python-merged
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 document-direct-python

README.md
[![agentmods](https://agentmods.dev/badge/skills/hkuds/openspace/spreadsheet-direct-python-merged/github.svg)](https://agentmods.dev/skills/hkuds/openspace/spreadsheet-direct-python-merged)
Your own site
<a href="https://agentmods.dev/skills/hkuds/openspace/spreadsheet-direct-python-merged"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/spreadsheet-direct-python-merged/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 document-direct-python

Your own site · 80×15
<a href="https://agentmods.dev/skills/hkuds/openspace/spreadsheet-direct-python-merged"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/spreadsheet-direct-python-merged.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,551 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 pass 7 Sept 2026
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.00020 $0.02551
Opus 5.5 $0.00008 $0.01020
Sonnet 5.5 $0.00004 $0.00510
Haiku 4.5 $0.00002 $0.00255

Measured 1mo ago against content hash 611395b147cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

document-direct-python 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 1mo 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/spreadsheet-direct-python-merged/SKILL.md · 331 lines

How it starts

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

Direct Python Execution for Document Generation Tasks

When to Use This Skill

Use direct run_shell with Python scripts for document operations when:

  • Reading or writing complex Excel files with multiple sheets
  • Generating PDF documents, checklists, or reports
  • Applying formulas, formatting, or data transformations
  • Working with openpyxl, pandas, reportlab, FPDF, or similar libraries
  • The operation involves multiple steps that could exceed agent step limits
  • You need precise control over error handling and debugging
  • Complex scripts benefit from file-based execution for better reliability

Why Direct Execution?

The shell_agent tool can:

  • Hit maximum step limits on complex multi-step operations
  • Produce unexplained errors on formatting operations
  • Fail on intricate document reads/writes due to iterative parsing
  • Fail to parse heredoc syntax correctly, causing 'unknown error' failures

Direct run_shell with Python is more reliable because it:

  • Executes in a single step with no iteration limits
  • Provides clearer, immediate error messages
  • Handles complex operations without step constraints
  • Gives full control over library imports and execution flow
  • Writing scripts to .py files first avoids shell_agent parsing issues with heredocs

How to Use

Handling Web Research Failures

When web research tools (search_web, read_webpage) fail or return 'unknown error':

  1. Assess what you need: Determine if the information is from well-documented regulatory frameworks, standards, or common knowledge that you can provide from internal knowledge.
  2. Proceed with available knowledge: For pharmacy compliance, OSHA standards, GDPR requirements, and similar well-established frameworks, generate documents using your training knowledge rather than waiting for web access.
  3. Document assumptions: Clearly note that materials were generated based on standard practices when source verification was unavailable.
  4. Use direct Python execution: Continue with the recommended run_shell pattern to generate documents even without web-sourced content.

Read the full file on GitHub · 331 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. 1mo ago First seen · 331 lines · 20 tokens per session scan A 611395b147cd

Subscribe to this mod's changes

document-direct-python is a skill published in the GitHub repository HKUDS/OpenSpace (7,771 stars, last pushed 2mo ago), licensed MIT. It adds 20 tokens to every session and 2,551 once invoked, about $0.0001 per session on Opus 5.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

doc-reader

Read any common document/data file — PDF, Word (.docx), Excel (.xlsx/.xls), PowerPoint (.pptx), images (OCR), CSV/TSV, plain text, JSON/YAML/TOML, HTML/XML, and most source-code files. Use the readdocument tool.

HKUDS/Vibe-Trading · 65 tokens

surfsense-documents

Make or change a Word document (.docx), a PDF, a PowerPoint deck (.pptx) or an Excel workbook (.xlsx) by writing a Python script that surfsenserenderdocument runs, optionally starting from a source's own Word or PowerPoint file. Load it whenever the user asks for one of these, or for a change to one you made.

MODSetter/SurfSense · 80 tokens

xberg-extracting-tables

Use when extracting tabular data from PDFs, spreadsheets, or images. Covers layout-aware table detection, table model selection, output formats (markdown / JSON cells), and known limits.

xberg-io/xberg · 36 tokens

skill-doc-delivery

Convert markdown to DOCX, PPTX, XLSX, PDF office documents — use when you need exportable deliverables.

nyldn/claude-octopus · 29 tokens

report-generator

A report-generation tool for producing SEO and GEO analysis reports in formats such as Markdown, HTML, PDF, JSON, and Excel. It also supports charts, templates, data processing, and interactive report elements.

foryourhealth111-pixel/Vibe-Skills · 24 tokens

kordoc

A command-line and server tool for reading and creating Korean official documents, including HWP, HWPX, PDF, DOCX, and spreadsheet files. It can convert documents to Markdown and create or update HWPX files.

chrisryugj/kordoc · 253 tokens