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 python-shell-fallbackgit 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/python-shell-fallback)<a href="https://agentmods.dev/skills/hkuds/openspace/python-shell-fallback"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/python-shell-fallback.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.00017 | $0.00697 |
| Opus 5 | $0.00009 | $0.00349 |
| Sonnet 5 | $0.00003 | $0.00139 |
| Haiku 4.5 | $0.00002 | $0.00070 |
Grade A, and why
python-shell-fallback 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 5d 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 — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Shell Fallback
When execute_code_sandbox fails for Python code that depends on external libraries, use run_shell with a heredoc Python script as a reliable fallback. The shell environment typically has better access to installed packages and system configuration than the sandbox.
When to Use This Pattern
Apply this skill when:
execute_code_sandboxreturns errors related to missing libraries (e.g.,ModuleNotFoundError)- The code requires packages that may not be installed in the sandbox environment
- You need PDF generation, data visualization, or other library-heavy operations
- Previous sandbox execution attempts have failed with import errors
How to Implement
Step 1: Identify the Failure
Check if the sandbox error indicates a library/dependency issue:
ModuleNotFoundError: No module named 'xxx'ImportError: cannot import name 'xxx'- Similar package-related errors
Step 2: Convert to Shell Execution
Rewrite the code execution using run_shell with a heredoc:
python3 << 'EOF'
# Your Python code here
import library_name
# ... rest of code
EOF
Step 3: Execute via run_shell
Call run_shell with the heredoc Python script:
command: python3 << 'EOF'
import reportlab
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas
# Your library-dependent code here
c = canvas.Canvas("output.pdf", pagesize=letter)
c.drawString(100, 750, "Hello World")
c.save()
EOF
Example: PDF Generation Fallback
Sandbox attempt (fails):
# execute_code_sandbox call fails with:
# ModuleNotFoundError: No module named 'reportlab'
Shell fallback (works):
python3 << 'EOF'
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas
c = canvas.Canvas("legal_memo.pdf", pagesize=letter)
c.setTitle("Legal Memorandum")
c.drawString(100, 750, "CONFIDENTIAL LEGAL MEMORANDUM")
c.save()
print("PDF created successfully")
EOF
Best Practices
- Use quoted heredoc (
<< 'EOF') - Prevents variable expansion, keeping Python code intact - Verify output - Check stdout/stderr from
run_shellto confirm success - Handle file paths - Ensure output files are written to accessible directories
- Test incrementally - For complex scripts, test in smaller chunks first
- Include error handling - Add try/except blocks to capture issues gracefully
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.
- 5d ago First seen · 100 lines · 17 tokens per session scan A 5c42b4f5b474
python-shell-fallback is a skill published in the GitHub repository HKUDS/OpenSpace (7,544 stars, last pushed 26d ago), licensed MIT. It adds 17 tokens to every session and 697 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
sk-create-diff
Local, Git-free before/after review of an edited document (text, Markdown, HTML, DOCX, text PDF) as a self-contained HTML report.
latex-rescue
Diagnose and fix LaTeX compilation errors. Handles undefined control sequences, missing brackets, math mode violations, package conflicts, undefined references, and environment mismatches.
overleaf-compile
Recompile an Overleaf project and extract its build logs, errors and warnings in a standardized format. Use when asked to compile/recompile an Overleaf paper, debug why a PDF build fails, see what's broken after pushing changes, or pull LaTeX/biber errors and warnings out of an Overleaf project. Drives an…
tikz
Audit and fix TikZ visual collisions in any .tex file. Use when labels overlap arrows, text sits on boxes, or arrows cross each other. Applies mathematical gap calculations and Bézier depth formulas — no eyeballing.
latex-compilation-fix
Auto-diagnose and fix common LaTeX compilation errors for the PKU thesis template including missing packages, font issues, citation undefined, overfull hboxes, and float placement. Use when xelatex fails or produces warnings.
foundry-hosted-agent-validation
Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.