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.
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.
npx skills add HKUDS/OpenSpace --skill shell-python-heredocgit clone --depth 1 https://github.com/HKUDS/OpenSpaceWrote 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.
[](https://agentmods.dev/skills/hkuds/openspace/shell-python-heredoc)<a href="https://agentmods.dev/skills/hkuds/openspace/shell-python-heredoc"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/shell-python-heredoc.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00021 | $0.00693 |
| Opus 5 | $0.00010 | $0.00347 |
| Sonnet 5 | $0.00004 | $0.00139 |
| Haiku 4.5 | $0.00002 | $0.00069 |
Grade A, and why
shell-python-heredoc 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Shell Python Heredoc (Fallback Pattern)
Overview
When execute_code_sandbox fails repeatedly (e.g., with "unknown error"), use run_shell with a Python heredoc as a reliable fallback for executing multi-line Python scripts with imports.
When to Use
execute_code_sandboxhas failed 2+ times with unexplained errors- You need to run Python code with multiple imports (e.g., ReportLab, pandas)
- The script is too complex for a one-liner but doesn't require persistence between calls
- You need better error visibility from raw stdout/stderr
How to Use
Basic Pattern
run_shell(
command="""python3 << 'EOF'
import sys
# Your Python code here
print("Hello from heredoc")
EOF""",
timeout=300
)
Key Syntax Rules
- Use
<< 'EOF'(with single quotes) to prevent shell variable expansion - Indent Python code relative to the heredoc delimiter
- End with
EOFon its own line (no leading whitespace) - Capture output from stdout/stderr for debugging
Example: Generating a PDF with ReportLab
run_shell(
command="""python3 << 'EOF'
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas
c = canvas.Canvas("output.pdf", pagesize=letter)
c.drawString(100, 750, "Hello PDF")
c.save()
print("PDF created successfully")
EOF""",
timeout=300
)
Example: Multi-file Data Processing
run_shell(
command="""python3 << 'EOF'
import pandas as pd
import json
# Load and process data
df = pd.read_csv("data.csv")
summary = df.describe()
# Output results
print(summary.to_string())
with open("summary.json", "w") as f:
json.dump(summary.to_dict(), f)
print("Processing complete")
EOF""",
timeout=300
)
Advantages Over execute_code_sandbox
- More reliable for complex imports (no sandbox isolation issues)
- Full stdout/stderr access for debugging
- Longer timeout flexibility (60s default vs 30s)
- Direct filesystem access without ARTIFACT_PATH indirection
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.
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.
- 4d ago First seen · 106 lines · 21 tokens per session scan A 2027979d571a
shell-python-heredoc is a skill published in the GitHub repository HKUDS/OpenSpace (7,534 stars, last pushed 26d ago), licensed MIT. It adds 21 tokens to every session and 693 once invoked, about $0.0001 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.
Other skills, from other repositories
nutrient-python-sdk
Nutrient Python SDK — the nutrient-sdk PyPI package for in-process server-side PDF and document processing in Python. Brand-new (launched Q1 2026); the older third-party pspdfkit PyPI package is unrelated to Nutrient and unmaintained. No external server, no DWS dependency — runs natively inside the Python process.…
reportlab
PDF generation toolkit. Create invoices, reports, certificates, forms, charts, tables, barcodes, QR codes, Canvas/Platypus APIs, for professional document automation.
xberg
Extract text, tables, metadata, and images from 107 document formats (PDF, Office, images, HTML, email, archives, academic) using Xberg. Use when writing code that calls Xberg APIs in Python, Node.js/TypeScript, Rust, or CLI. Covers installation, extraction (sync/async), configuration (OCR, chunking, output format)…
azure-ai-formrecognizer-java
Build document analysis applications with Azure Document Intelligence (Form Recognizer) SDK for Java. Use when extracting text, tables, key-value pairs from documents, receipts, invoices, or buildi...
azure-ai-document-intelligence-ts
Extract text, tables, and structured data from documents using Azure Document Intelligence (@azure-rest/ai-document-intelligence). Use when processing invoices, receipts, IDs, forms, or building cu...
neo4j-knowledge-graph
Use when designing, importing, querying, or modernizing Neo4j knowledge graphs from CSV, Excel, pandas, Cypher, py2neo, the official neo4j Python driver, vector indexes, or GraphRAG workflows.