The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(skills): document-skill setup works in the Docker sandbox; wait for the prompt before driving Hermes
Teknium30a8c50a6ff1
diff --git a/optional-skills/finance/excel-author/SKILL.md b/optional-skills/finance/excel-author/SKILL.mdindex e715a4c1848..380e338c17d 100644--- a/optional-skills/finance/excel-author/SKILL.md+++ b/optional-skills/finance/excel-author/SKILL.md@@ -26,13 +26,22 @@ Adapted from Anthropic's `xlsx-author` and `audit-xls` skills in the [anthropics## SetupUse `python` when it already imports `openpyxl` (the Hermes Docker image ships-it). Otherwise let Hermes build its shared, pinned documents environment-under the Hermes home (the same command as the docx/xlsx/powerpoint/pdf-skills; safe to run from several agents at once), and never `pip install`-into the interpreter that runs Hermes:+it). Otherwise, when `hermes` is on PATH, let Hermes build its shared, pinned+documents environment under the Hermes home (safe to run from several agents+at once); in a Docker sandbox without Hermes the block builds a venv in the+sandbox home with the same pinned versions. It is the same block as the+docx/xlsx/powerpoint/pdf skills. Never `pip install` into the interpreter that+runs Hermes:```bash-python -c "import openpyxl" 2>/dev/null && PY=python || PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+python -c "import openpyxl" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then+ PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+else+ PY="$HOME/.cache/hermes-docs-venv/bin/python"+ [ -x "$PY" ] || python3 -m venv "$HOME/.cache/hermes-docs-venv"+ "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null ||+ "$PY" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0+fiexport PY```diff --git a/optional-skills/finance/pptx-author/SKILL.md b/optional-skills/finance/pptx-author/SKILL.mdindex 7aaff49a53a..b0f6d8a6c9c 100644--- a/optional-skills/finance/pptx-author/SKILL.md+++ b/optional-skills/finance/pptx-author/SKILL.md@@ -27,13 +27,22 @@ For the broader, already-shipped PowerPoint authoring skill (slides, speaker not## SetupUse `python` when it already imports `pptx` (the Hermes Docker image ships-it). Otherwise let Hermes build its shared, pinned documents environment-under the Hermes home (the same command as the docx/xlsx/powerpoint/pdf-skills; safe to run from several agents at once), and never `pip install`-into the interpreter that runs Hermes:+it). Otherwise, when `hermes` is on PATH, let Hermes build its shared, pinned+documents environment under the Hermes home (safe to run from several agents+at once); in a Docker sandbox without Hermes the block builds a venv in the+sandbox home with the same pinned versions. It is the same block as the+docx/xlsx/powerpoint/pdf skills. Never `pip install` into the interpreter that+runs Hermes:```bash-python -c "import pptx" 2>/dev/null && PY=python || PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+python -c "import pptx" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then+ PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+else+ PY="$HOME/.cache/hermes-docs-venv/bin/python"+ [ -x "$PY" ] || python3 -m venv "$HOME/.cache/hermes-docs-venv"+ "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null ||+ "$PY" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0+fiexport PY```diff --git a/skills/autonomous-ai-agents/hermes-agent/SKILL.md b/skills/autonomous-ai-agents/hermes-agent/SKILL.mdindex cdd44360824..e38d53b85c9 100644--- a/skills/autonomous-ai-agents/hermes-agent/SKILL.md+++ b/skills/autonomous-ai-agents/hermes-agent/SKILL.md@@ -141,14 +141,14 @@ terminal(command="hermes chat -q 'Set up CI/CD for ~/myapp'", background=true)### Interactive PTY Mode (via tmux)-Hermes uses prompt_toolkit, which requires a real terminal. Use tmux for interactive spawning. Send the text and `Enter` as two `send-keys` calls: text and Enter in one call reach Hermes as one burst, and the Enter lands as a newline inside the message instead of submitting it.+Hermes uses prompt_toolkit, which requires a real terminal. Use tmux for interactive spawning. Send the text and `Enter` as two `send-keys` calls: text and Enter in one call reach Hermes as one burst, and the Enter lands as a newline inside the message instead of submitting it. Both recipes wait for the `❯` input prompt (the default skin's symbol; use your skin's prompt symbol if you changed it) instead of a fixed sleep: a first start can take far longer than a few seconds, and input sent before the prompt is lost.```# Startterminal(command="tmux new-session -d -s agent1 -x 120 -y 40 'hermes'", timeout=10)-# Wait for startup, then send a message-terminal(command="sleep 8 && tmux send-keys -t agent1 'Build a FastAPI auth service' && sleep 0.5 && tmux send-keys -t agent1 Enter", timeout=15)+# Wait for the input prompt (❯), then send a message+terminal(command="timeout 90 sh -c 'until tmux capture-pane -t agent1 -p | grep -q "❯"; do sleep 1; done' && tmux send-keys -t agent1 'Build a FastAPI auth service' && sleep 0.5 && tmux send-keys -t agent1 Enter", timeout=100)# Read outputterminal(command="sleep 20 && tmux capture-pane -t agent1 -p", timeout=5)@@ -160,10 +160,11 @@ terminal(command="tmux send-keys -t agent1 'Add rate limiting middleware' && sleterminal(command="tmux send-keys -t agent1 '/exit' && sleep 0.5 && tmux send-keys -t agent1 Enter && sleep 2 && tmux kill-session -t agent1", timeout=10)```-**No tmux** (`command -v tmux` prints nothing, e.g. an older Hermes Docker image): run Hermes as a PTY background process and drive it with `process_manage`. Stdin only exists with `pty=true`. Send the text, pause, then send the Enter key (`"\r"`) as its own `write`, for the same reason as with tmux: an Enter that arrives right after the text is read as part of a paste and becomes a newline. Use `write`, not `submit`, for the Enter.+**No tmux** (`command -v tmux` prints nothing, e.g. an older Hermes Docker image): run Hermes as a PTY background process and drive it with `process_manage`. Stdin only exists with `pty=true`. Send the text, pause, then send the Enter key (`"\r"`) as its own `write`, for the same reason as with tmux: an Enter that arrives right after the text is read as part of a paste and becomes a newline. Use `write`, not `submit`, for the Enter. Wait for the input prompt before the first write: during startup Hermes queries the terminal's colours and then flushes its input, so text written before the prompt appears is silently dropped.```terminal(command="hermes", background=true, pty=true) # returns session_id+process_manage(action="log", session_id="<id>", limit=20) # repeat, with terminal(command="sleep 1") between, until the ❯ prompt line showsprocess_manage(action="write", session_id="<id>", data="Build a FastAPI auth service")terminal(command="sleep 0.5")process_manage(action="write", session_id="<id>", data="\r")@@ -178,11 +179,11 @@ process_manage(action="write", session_id="<id>", data="\r")```# Agent A: backendterminal(command="tmux new-session -d -s backend -x 120 -y 40 'hermes -w'", timeout=10)-terminal(command="sleep 8 && tmux send-keys -t backend 'Build REST API for user management' && sleep 0.5 && tmux send-keys -t backend Enter", timeout=15)+terminal(command="timeout 90 sh -c 'until tmux capture-pane -t backend -p | grep -q "❯"; do sleep 1; done' && tmux send-keys -t backend 'Build REST API for user management' && sleep 0.5 && tmux send-keys -t backend Enter", timeout=100)# Agent B: frontendterminal(command="tmux new-session -d -s frontend -x 120 -y 40 'hermes -w'", timeout=10)-terminal(command="sleep 8 && tmux send-keys -t frontend 'Build React dashboard for user management' && sleep 0.5 && tmux send-keys -t frontend Enter", timeout=15)+terminal(command="timeout 90 sh -c 'until tmux capture-pane -t frontend -p | grep -q "❯"; do sleep 1; done' && tmux send-keys -t frontend 'Build React dashboard for user management' && sleep 0.5 && tmux send-keys -t frontend Enter", timeout=100)# Check progress, relay context between themterminal(command="tmux capture-pane -t backend -p | tail -30", timeout=5)diff --git a/skills/productivity/docx/SKILL.md b/skills/productivity/docx/SKILL.mdindex f746017252a..84543a25337 100644--- a/skills/productivity/docx/SKILL.md+++ b/skills/productivity/docx/SKILL.md@@ -38,22 +38,32 @@ fields, and package health checks. It does not render documents itself- Python 3.10+ with `python-docx` (import name `docx`; lxml comes with it).- Pick the interpreter with `terminal`. Use `python` when it already imports- the libraries (the Hermes Docker image ships them); otherwise let Hermes- build its shared, pinned documents environment under the Hermes home. It- survives container restarts, never touches the Hermes install itself, and is- safe to run from several agents at once. Use this exact command in every- document skill so they all share one environment:+ the libraries (the Hermes Docker image ships them). Otherwise, when `hermes`+ is on PATH, let Hermes build its shared, pinned documents environment under+ the Hermes home: it survives container restarts, never touches the Hermes+ install itself, and is safe to run from several agents at once. When it is+ not (the terminal runs in a Docker sandbox, which has no Hermes), the block+ builds a venv in the sandbox home with the same pinned versions. Use this+ exact block in every document skill so they all share one environment:```bash- python -c "import docx" 2>/dev/null && PY=python || PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ python -c "import docx" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then+ PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ else+ PY="$HOME/.cache/hermes-docs-venv/bin/python"+ [ -x "$PY" ] || python3 -m venv "$HOME/.cache/hermes-docs-venv"+ "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null ||+ "$PY" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0+ fiexport PY"$PY" scripts/docx_create.py --help```- Run every helper below with `"$PY"`. In PowerShell:+ Run every helper below with `"$PY"`. In PowerShell (Hermes runs on that+ host, so it is on PATH):`$env:PY = hermes pm environment documents --extra documents --extra documents-pdf`.- Never `pip install` into the interpreter that runs Hermes or into this- environment; `hermes pm environment` owns it.+ Never `pip install` into the interpreter that runs Hermes or into the+ `hermes pm environment` one; Hermes owns both.- Comments `add` uses the native API on python-docx >= 1.2 and an XMLfallback on older versions — both are automatic.- For image blocks: the image files must exist locally (PNG/JPEG).diff --git a/skills/productivity/pdf/SKILL.md b/skills/productivity/pdf/SKILL.mdindex c8aac0dd4a7..42beb409a0b 100644--- a/skills/productivity/pdf/SKILL.md+++ b/skills/productivity/pdf/SKILL.md@@ -33,22 +33,32 @@ Create PDFs from structured specs, build and fill AcroForm forms (with layout li- Python 3.10+ with `pypdf`, `reportlab`, `pdfplumber`.- Pick the interpreter with `terminal`. Use `python` when it already imports- the libraries (the Hermes Docker image ships them); otherwise let Hermes- build its shared, pinned documents environment under the Hermes home. It- survives container restarts, never touches the Hermes install itself, and is- safe to run from several agents at once. Use this exact command in every- document skill so they all share one environment:+ the libraries (the Hermes Docker image ships them). Otherwise, when `hermes`+ is on PATH, let Hermes build its shared, pinned documents environment under+ the Hermes home: it survives container restarts, never touches the Hermes+ install itself, and is safe to run from several agents at once. When it is+ not (the terminal runs in a Docker sandbox, which has no Hermes), the block+ builds a venv in the sandbox home with the same pinned versions. Use this+ exact block in every document skill so they all share one environment:```bash- python -c "import pypdf, reportlab, pdfplumber" 2>/dev/null && PY=python || PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ python -c "import pypdf, reportlab, pdfplumber" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then+ PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ else+ PY="$HOME/.cache/hermes-docs-venv/bin/python"+ [ -x "$PY" ] || python3 -m venv "$HOME/.cache/hermes-docs-venv"+ "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null ||+ "$PY" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0+ fiexport PY"$PY" scripts/pdf_create.py --help```- Run every helper below with `"$PY"`. In PowerShell:+ Run every helper below with `"$PY"`. In PowerShell (Hermes runs on that+ host, so it is on PATH):`$env:PY = hermes pm environment documents --extra documents --extra documents-pdf`.- Never `pip install` into the interpreter that runs Hermes or into this- environment; `hermes pm environment` owns it.+ Never `pip install` into the interpreter that runs Hermes or into the+ `hermes pm environment` one; Hermes owns both.- Page rasterization (`pdf_page_image.py`, overlay rendering) uses `pypdfium2`, which the documents environment already has (if your `python` lacks it, switch `PY` to that environment with the command above), or poppler's `pdftoppm` on PATH. Scripts fall back pypdfium2 → pdftoppm and report `{"rendered": false, "missing": [...]}` (exit 0) when neither exists.- Each helper script checks imports lazily and prints an install hint if a dependency is missing.diff --git a/skills/productivity/pdf/references/ocr-extraction.md b/skills/productivity/pdf/references/ocr-extraction.mdindex f2ea3e5315b..d2a07b24005 100644--- a/skills/productivity/pdf/references/ocr-extraction.md+++ b/skills/productivity/pdf/references/ocr-extraction.md@@ -51,27 +51,35 @@ If the user needs marker capabilities but the system lacks ~5GB free disk:## pymupdf (lightweight)-Let Hermes build a separate side environment for it (~110 MB with-its deps; never `pip install` into Hermes's own interpreter), then run the-helper and the inline snippet below with `"$PY"` instead of `python`:+Give it a separate side environment (~110 MB with its deps; never+`pip install` into Hermes's own interpreter): Hermes builds it when `hermes`+is on PATH, otherwise (a Docker sandbox without Hermes) a venv in the sandbox+home takes the same requirements. Then run the helper and the inline snippet+below with `"$PY"` instead of `python`:```bash-PY="$(hermes pm environment pdf-pymupdf --requirement 'pymupdf>=1.26,<3' --requirement 'pymupdf4llm>=0.2,<3')"+if command -v hermes >/dev/null 2>&1; then+ PY="$(hermes pm environment pdf-pymupdf --requirement 'pymupdf>=1.26,<3' --requirement 'pymupdf4llm>=0.2,<3')"+else+ PY="$HOME/.cache/hermes-pdf-pymupdf-venv/bin/python"+ [ -x "$PY" ] || python3 -m venv "$HOME/.cache/hermes-pdf-pymupdf-venv"+ "$PY" -c "import pymupdf, pymupdf4llm" 2>/dev/null || "$PY" -m pip install -q --disable-pip-version-check 'pymupdf>=1.26,<3' 'pymupdf4llm>=0.2,<3'+fi```**Via helper script**:```bash-python scripts/extract_pymupdf.py document.pdf # Plain text-python scripts/extract_pymupdf.py document.pdf --markdown # Markdown-python scripts/extract_pymupdf.py document.pdf --tables # Tables-python scripts/extract_pymupdf.py document.pdf --images out/ # Extract images-python scripts/extract_pymupdf.py document.pdf --metadata # Title, author, pages-python scripts/extract_pymupdf.py document.pdf --pages 0-4 # Specific pages+"$PY" scripts/extract_pymupdf.py document.pdf # Plain text+"$PY" scripts/extract_pymupdf.py document.pdf --markdown # Markdown+"$PY" scripts/extract_pymupdf.py document.pdf --tables # Tables+"$PY" scripts/extract_pymupdf.py document.pdf --images out/ # Extract images+"$PY" scripts/extract_pymupdf.py document.pdf --metadata # Title, author, pages+"$PY" scripts/extract_pymupdf.py document.pdf --pages 0-4 # Specific pages```**Inline**:```bash-python -c "+"$PY" -c "import pymupdfdoc = pymupdf.open('document.pdf')for page in doc:@@ -88,22 +96,28 @@ for page in doc:python scripts/extract_marker.py --check# its own side environment (PyTorch + models); run the helper with "$PY"-PY="$(hermes pm environment pdf-marker --requirement 'marker-pdf>=1.8,<3')"+if command -v hermes >/dev/null 2>&1; then+ PY="$(hermes pm environment pdf-marker --requirement 'marker-pdf>=1.8,<3')"+else+ PY="$HOME/.cache/hermes-pdf-marker-venv/bin/python"+ [ -x "$PY" ] || python3 -m venv "$HOME/.cache/hermes-pdf-marker-venv"+ "$PY" -c "import marker" 2>/dev/null || "$PY" -m pip install -q --disable-pip-version-check 'marker-pdf>=1.8,<3'+fi```**Via helper script**:```bash-python scripts/extract_marker.py document.pdf # Markdown-python scripts/extract_marker.py document.pdf --json # JSON with metadata-python scripts/extract_marker.py document.pdf --output_dir out/ # Save images-python scripts/extract_marker.py scanned.pdf # Scanned PDF (OCR)-python scripts/extract_marker.py document.pdf --use_llm # LLM-boosted accuracy+"$PY" scripts/extract_marker.py document.pdf # Markdown+"$PY" scripts/extract_marker.py document.pdf --json # JSON with metadata+"$PY" scripts/extract_marker.py document.pdf --output_dir out/ # Save images+"$PY" scripts/extract_marker.py scanned.pdf # Scanned PDF (OCR)+"$PY" scripts/extract_marker.py document.pdf --use_llm # LLM-boosted accuracy```-**CLI** (installed with marker-pdf):+**CLI** (installed with marker-pdf next to `"$PY"`, not on PATH):```bash-marker_single document.pdf --output_dir ./output-marker /path/to/folder --workers 4 # Batch+"$(dirname "$PY")/marker_single" document.pdf --output_dir ./output+"$(dirname "$PY")/marker" /path/to/folder --workers 4 # Batch```---@@ -166,5 +180,5 @@ No extra dependencies needed — pymupdf covers split, merge, search, and text e- marker-pdf is for OCR, scanned docs, equations, complex layouts — install only when needed- Both helper scripts accept `--help` for full usage- marker-pdf downloads ~2.5GB of models to `~/.cache/huggingface/` on first use-- For Word docs: `pip install python-docx` (better than OCR — parses actual structure)+- For Word docs: python-docx via the docx skill's `"$PY"` setup block (better than OCR — parses actual structure)- For PowerPoint: see the `powerpoint` skill (uses python-pptx)diff --git a/skills/productivity/pdf/scripts/_raster.py b/skills/productivity/pdf/scripts/_raster.pyindex 71efd627ee9..01765c7f7ad 100644--- a/skills/productivity/pdf/scripts/_raster.py+++ b/skills/productivity/pdf/scripts/_raster.py@@ -26,7 +26,7 @@ def available_backends() -> list[str]:def missing_hints() -> list[str]:"""Install hints for when no backend is available."""return [- "pypdfium2: hermes pm environment documents --extra documents --extra documents-pdf",+ "pypdfium2: rerun with the documents interpreter $PY from the pdf skill's Prerequisites setup block","poppler-utils (provides pdftoppm), e.g. apt-get install poppler-utils",]diff --git a/skills/productivity/pdf/scripts/pdf_create.py b/skills/productivity/pdf/scripts/pdf_create.pyindex 8b5f756ba0c..ce0095ffe4c 100644--- a/skills/productivity/pdf/scripts/pdf_create.py+++ b/skills/productivity/pdf/scripts/pdf_create.py@@ -47,7 +47,7 @@ def build_pdf(spec: dict, out_path: str) -> int:TableStyle,)except ImportError:- print("Missing dependency: 'reportlab' is not importable here; rerun with the documents environment's interpreter: hermes pm environment documents --extra documents --extra documents-pdf", file=sys.stderr)+ print("Missing dependency: 'reportlab' is not importable here; rerun with the documents interpreter $PY from the pdf skill's Prerequisites setup block", file=sys.stderr)return 2page_size = letter if str(spec.get("page_size", "A4")).lower() == "letter" else A4diff --git a/skills/productivity/pdf/scripts/pdf_fill_form.py b/skills/productivity/pdf/scripts/pdf_fill_form.pyindex 112499a9688..a2f7dffa413 100644--- a/skills/productivity/pdf/scripts/pdf_fill_form.py+++ b/skills/productivity/pdf/scripts/pdf_fill_form.py@@ -35,7 +35,7 @@ def main() -> int:from pypdf import PdfReader, PdfWriterfrom pypdf.generic import BooleanObject, NameObjectexcept ImportError:- print("Missing dependency: 'pypdf' is not importable here; rerun with the documents environment's interpreter: hermes pm environment documents --extra documents --extra documents-pdf", file=sys.stderr)+ print("Missing dependency: 'pypdf' is not importable here; rerun with the documents interpreter $PY from the pdf skill's Prerequisites setup block", file=sys.stderr)return 2with open(args.fields_json, encoding="utf-8") as fh:diff --git a/skills/productivity/pdf/scripts/pdf_make_form.py b/skills/productivity/pdf/scripts/pdf_make_form.pyindex 1f2fe58e2d0..fb859c8a0f3 100644--- a/skills/productivity/pdf/scripts/pdf_make_form.py+++ b/skills/productivity/pdf/scripts/pdf_make_form.py@@ -54,7 +54,7 @@ def build_form(spec: dict, out_path: str) -> int:from reportlab.lib import colorsfrom reportlab.pdfgen import canvasexcept ImportError:- print("Missing dependency: 'reportlab' is not importable here; rerun with the documents environment's interpreter: hermes pm environment documents --extra documents --extra documents-pdf", file=sys.stderr)+ print("Missing dependency: 'reportlab' is not importable here; rerun with the documents interpreter $PY from the pdf skill's Prerequisites setup block", file=sys.stderr)return 2width, height = _page_size(spec)diff --git a/skills/productivity/pdf/scripts/pdf_merge.py b/skills/productivity/pdf/scripts/pdf_merge.pyindex 3ea583960c2..0863e67e886 100644--- a/skills/productivity/pdf/scripts/pdf_merge.py+++ b/skills/productivity/pdf/scripts/pdf_merge.py@@ -24,7 +24,7 @@ def main() -> int:try:from pypdf import PdfReader, PdfWriterexcept ImportError:- print("Missing dependency: 'pypdf' is not importable here; rerun with the documents environment's interpreter: hermes pm environment documents --extra documents --extra documents-pdf", file=sys.stderr)+ print("Missing dependency: 'pypdf' is not importable here; rerun with the documents interpreter $PY from the pdf skill's Prerequisites setup block", file=sys.stderr)return 2writer = PdfWriter()diff --git a/skills/productivity/pdf/scripts/pdf_meta.py b/skills/productivity/pdf/scripts/pdf_meta.pyindex a016f2c8594..68f3d41a539 100644--- a/skills/productivity/pdf/scripts/pdf_meta.py+++ b/skills/productivity/pdf/scripts/pdf_meta.py@@ -46,7 +46,7 @@ def main() -> int:try:from pypdf import PdfReader, PdfWriterexcept ImportError:- print("Missing dependency: 'pypdf' is not importable here; rerun with the documents environment's interpreter: hermes pm environment documents --extra documents --extra documents-pdf", file=sys.stderr)+ print("Missing dependency: 'pypdf' is not importable here; rerun with the documents interpreter $PY from the pdf skill's Prerequisites setup block", file=sys.stderr)return 2reader = PdfReader(args.pdf)diff --git a/skills/productivity/pdf/scripts/pdf_page_image.py b/skills/productivity/pdf/scripts/pdf_page_image.pyindex d813b33483b..4a5034ad6c4 100644--- a/skills/productivity/pdf/scripts/pdf_page_image.py+++ b/skills/productivity/pdf/scripts/pdf_page_image.py@@ -62,7 +62,7 @@ def main() -> int:try:from pypdf import PdfReaderexcept ImportError:- print("Missing dependency: 'pypdf' is not importable here; rerun with the documents environment's interpreter: hermes pm environment documents --extra documents --extra documents-pdf", file=sys.stderr)+ print("Missing dependency: 'pypdf' is not importable here; rerun with the documents interpreter $PY from the pdf skill's Prerequisites setup block", file=sys.stderr)return 2reader = PdfReader(args.pdf)if reader.is_encrypted:diff --git a/skills/productivity/pdf/scripts/pdf_read.py b/skills/productivity/pdf/scripts/pdf_read.pyindex 6dd51c2d6a2..879271ad709 100644--- a/skills/productivity/pdf/scripts/pdf_read.py+++ b/skills/productivity/pdf/scripts/pdf_read.py@@ -21,7 +21,7 @@ def _need(module: str, package: str):try:return __import__(module)except ImportError:- print(f"Missing dependency: '{package}' is not importable here; rerun with the documents environment's interpreter: hermes pm environment documents --extra documents --extra documents-pdf", file=sys.stderr)+ print(f"Missing dependency: '{package}' is not importable here; rerun with the documents interpreter $PY from the pdf skill's Prerequisites setup block", file=sys.stderr)raise SystemExit(2)diff --git a/skills/productivity/pdf/scripts/pdf_secure.py b/skills/productivity/pdf/scripts/pdf_secure.pyindex 283183f2348..0e0df3178aa 100644--- a/skills/productivity/pdf/scripts/pdf_secure.py+++ b/skills/productivity/pdf/scripts/pdf_secure.py@@ -31,7 +31,7 @@ def main() -> int:try:from pypdf import PdfReader, PdfWriterexcept ImportError:- print("Missing dependency: 'pypdf' is not importable here; rerun with the documents environment's interpreter: hermes pm environment documents --extra documents --extra documents-pdf", file=sys.stderr)+ print("Missing dependency: 'pypdf' is not importable here; rerun with the documents interpreter $PY from the pdf skill's Prerequisites setup block", file=sys.stderr)return 2reader = PdfReader(args.pdf)diff --git a/skills/productivity/pdf/scripts/pdf_split.py b/skills/productivity/pdf/scripts/pdf_split.pyindex c6be074687f..92457d10dba 100644--- a/skills/productivity/pdf/scripts/pdf_split.py+++ b/skills/productivity/pdf/scripts/pdf_split.py@@ -51,7 +51,7 @@ def main() -> int:try:from pypdf import PdfReader, PdfWriterexcept ImportError:- print("Missing dependency: 'pypdf' is not importable here; rerun with the documents environment's interpreter: hermes pm environment documents --extra documents --extra documents-pdf", file=sys.stderr)+ print("Missing dependency: 'pypdf' is not importable here; rerun with the documents interpreter $PY from the pdf skill's Prerequisites setup block", file=sys.stderr)return 2reader = PdfReader(args.pdf)diff --git a/skills/productivity/pdf/scripts/pdf_stamp.py b/skills/productivity/pdf/scripts/pdf_stamp.pyindex 9494ff9a409..48df3670224 100644--- a/skills/productivity/pdf/scripts/pdf_stamp.py+++ b/skills/productivity/pdf/scripts/pdf_stamp.py@@ -103,7 +103,7 @@ def main() -> int:try:from pypdf import PdfReader, PdfWriterexcept ImportError:- print("Missing dependency: 'pypdf reportlab' is not importable here; rerun with the documents environment's interpreter: hermes pm environment documents --extra documents --extra documents-pdf",+ print("Missing dependency: 'pypdf reportlab' is not importable here; rerun with the documents interpreter $PY from the pdf skill's Prerequisites setup block",file=sys.stderr)return 2diff --git a/skills/productivity/pdf/scripts/pdf_watermark.py b/skills/productivity/pdf/scripts/pdf_watermark.pyindex 372cce2b6c1..b915a662aed 100644--- a/skills/productivity/pdf/scripts/pdf_watermark.py+++ b/skills/productivity/pdf/scripts/pdf_watermark.py@@ -26,7 +26,7 @@ def main() -> int:try:from pypdf import PdfReader, PdfWriterexcept ImportError:- print("Missing dependency: 'pypdf' is not importable here; rerun with the documents environment's interpreter: hermes pm environment documents --extra documents --extra documents-pdf", file=sys.stderr)+ print("Missing dependency: 'pypdf' is not importable here; rerun with the documents interpreter $PY from the pdf skill's Prerequisites setup block", file=sys.stderr)return 2reader = PdfReader(args.pdf)diff --git a/skills/productivity/powerpoint/SKILL.md b/skills/productivity/powerpoint/SKILL.mdindex bfaa67751b0..7e2c2ef916b 100644--- a/skills/productivity/powerpoint/SKILL.md+++ b/skills/productivity/powerpoint/SKILL.md@@ -35,22 +35,32 @@ and slide rendering — all offline, no PowerPoint installation required.- Python 3.10+ with `python-pptx` (import name `pptx`).- Pick the interpreter with `terminal`. Use `python` when it already imports- the libraries (the Hermes Docker image ships them); otherwise let Hermes- build its shared, pinned documents environment under the Hermes home. It- survives container restarts, never touches the Hermes install itself, and is- safe to run from several agents at once. Use this exact command in every- document skill so they all share one environment:+ the libraries (the Hermes Docker image ships them). Otherwise, when `hermes`+ is on PATH, let Hermes build its shared, pinned documents environment under+ the Hermes home: it survives container restarts, never touches the Hermes+ install itself, and is safe to run from several agents at once. When it is+ not (the terminal runs in a Docker sandbox, which has no Hermes), the block+ builds a venv in the sandbox home with the same pinned versions. Use this+ exact block in every document skill so they all share one environment:```bash- python -c "import pptx" 2>/dev/null && PY=python || PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ python -c "import pptx" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then+ PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ else+ PY="$HOME/.cache/hermes-docs-venv/bin/python"+ [ -x "$PY" ] || python3 -m venv "$HOME/.cache/hermes-docs-venv"+ "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null ||+ "$PY" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0+ fiexport PY"$PY" scripts/pptx_create.py --help```- Run every helper below with `"$PY"`. In PowerShell:+ Run every helper below with `"$PY"`. In PowerShell (Hermes runs on that+ host, so it is on PATH):`$env:PY = hermes pm environment documents --extra documents --extra documents-pdf`.- Never `pip install` into the interpreter that runs Hermes or into this- environment; `hermes pm environment` owns it.+ Never `pip install` into the interpreter that runs Hermes or into the+ `hermes pm environment` one; Hermes owns both.- Optional: LibreOffice (`soffice`) plus poppler (`pdftoppm` or`pdftocairo`) for rendering slides to PNGs and for PDF export.`pptx_render.py` detects both with `shutil.which` and degradesdiff --git a/skills/productivity/xlsx/SKILL.md b/skills/productivity/xlsx/SKILL.mdindex b93878adc60..9c6480e1415 100644--- a/skills/productivity/xlsx/SKILL.md+++ b/skills/productivity/xlsx/SKILL.md@@ -41,22 +41,32 @@ scripts are argparse CLIs that print JSON and use explicit UTF-8 I/O.- Python 3.10+ with `openpyxl`. No other third-party packages areneeded; everything else is stdlib.- Pick the interpreter with `terminal`. Use `python` when it already imports- the libraries (the Hermes Docker image ships them); otherwise let Hermes- build its shared, pinned documents environment under the Hermes home. It- survives container restarts, never touches the Hermes install itself, and is- safe to run from several agents at once. Use this exact command in every- document skill so they all share one environment:+ the libraries (the Hermes Docker image ships them). Otherwise, when `hermes`+ is on PATH, let Hermes build its shared, pinned documents environment under+ the Hermes home: it survives container restarts, never touches the Hermes+ install itself, and is safe to run from several agents at once. When it is+ not (the terminal runs in a Docker sandbox, which has no Hermes), the block+ builds a venv in the sandbox home with the same pinned versions. Use this+ exact block in every document skill so they all share one environment:```bash- python -c "import openpyxl" 2>/dev/null && PY=python || PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ python -c "import openpyxl" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then+ PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ else+ PY="$HOME/.cache/hermes-docs-venv/bin/python"+ [ -x "$PY" ] || python3 -m venv "$HOME/.cache/hermes-docs-venv"+ "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null ||+ "$PY" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0+ fiexport PY"$PY" scripts/xlsx_create.py --help```- Run every helper below with `"$PY"`. In PowerShell:+ Run every helper below with `"$PY"`. In PowerShell (Hermes runs on that+ host, so it is on PATH):`$env:PY = hermes pm environment documents --extra documents --extra documents-pdf`.- Never `pip install` into the interpreter that runs Hermes or into this- environment; `hermes pm environment` owns it.+ Never `pip install` into the interpreter that runs Hermes or into the+ `hermes pm environment` one; Hermes owns both.- Optional: LibreOffice (`soffice`) for headless recalculation orformat conversion.diff --git a/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.md b/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.mdindex ab682a36a79..ceefab8ef47 100644--- a/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.md+++ b/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.md@@ -158,14 +158,14 @@ terminal(command="hermes chat -q 'Set up CI/CD for ~/myapp'", background=true)### Interactive PTY Mode (via tmux)-Hermes uses prompt_toolkit, which requires a real terminal. Use tmux for interactive spawning. Send the text and `Enter` as two `send-keys` calls: text and Enter in one call reach Hermes as one burst, and the Enter lands as a newline inside the message instead of submitting it.+Hermes uses prompt_toolkit, which requires a real terminal. Use tmux for interactive spawning. Send the text and `Enter` as two `send-keys` calls: text and Enter in one call reach Hermes as one burst, and the Enter lands as a newline inside the message instead of submitting it. Both recipes wait for the `❯` input prompt (the default skin's symbol; use your skin's prompt symbol if you changed it) instead of a fixed sleep: a first start can take far longer than a few seconds, and input sent before the prompt is lost.```# Startterminal(command="tmux new-session -d -s agent1 -x 120 -y 40 'hermes'", timeout=10)-# Wait for startup, then send a message-terminal(command="sleep 8 && tmux send-keys -t agent1 'Build a FastAPI auth service' && sleep 0.5 && tmux send-keys -t agent1 Enter", timeout=15)+# Wait for the input prompt (❯), then send a message+terminal(command="timeout 90 sh -c 'until tmux capture-pane -t agent1 -p | grep -q "❯"; do sleep 1; done' && tmux send-keys -t agent1 'Build a FastAPI auth service' && sleep 0.5 && tmux send-keys -t agent1 Enter", timeout=100)# Read outputterminal(command="sleep 20 && tmux capture-pane -t agent1 -p", timeout=5)@@ -177,10 +177,11 @@ terminal(command="tmux send-keys -t agent1 'Add rate limiting middleware' && sleterminal(command="tmux send-keys -t agent1 '/exit' && sleep 0.5 && tmux send-keys -t agent1 Enter && sleep 2 && tmux kill-session -t agent1", timeout=10)```-**No tmux** (`command -v tmux` prints nothing, e.g. an older Hermes Docker image): run Hermes as a PTY background process and drive it with `process_manage`. Stdin only exists with `pty=true`. Send the text, pause, then send the Enter key (`"\r"`) as its own `write`, for the same reason as with tmux: an Enter that arrives right after the text is read as part of a paste and becomes a newline. Use `write`, not `submit`, for the Enter.+**No tmux** (`command -v tmux` prints nothing, e.g. an older Hermes Docker image): run Hermes as a PTY background process and drive it with `process_manage`. Stdin only exists with `pty=true`. Send the text, pause, then send the Enter key (`"\r"`) as its own `write`, for the same reason as with tmux: an Enter that arrives right after the text is read as part of a paste and becomes a newline. Use `write`, not `submit`, for the Enter. Wait for the input prompt before the first write: during startup Hermes queries the terminal's colours and then flushes its input, so text written before the prompt appears is silently dropped.```terminal(command="hermes", background=true, pty=true) # returns session_id+process_manage(action="log", session_id="<id>", limit=20) # repeat, with terminal(command="sleep 1") between, until the ❯ prompt line showsprocess_manage(action="write", session_id="<id>", data="Build a FastAPI auth service")terminal(command="sleep 0.5")process_manage(action="write", session_id="<id>", data="\r")@@ -195,11 +196,11 @@ process_manage(action="write", session_id="<id>", data="\r")```# Agent A: backendterminal(command="tmux new-session -d -s backend -x 120 -y 40 'hermes -w'", timeout=10)-terminal(command="sleep 8 && tmux send-keys -t backend 'Build REST API for user management' && sleep 0.5 && tmux send-keys -t backend Enter", timeout=15)+terminal(command="timeout 90 sh -c 'until tmux capture-pane -t backend -p | grep -q "❯"; do sleep 1; done' && tmux send-keys -t backend 'Build REST API for user management' && sleep 0.5 && tmux send-keys -t backend Enter", timeout=100)# Agent B: frontendterminal(command="tmux new-session -d -s frontend -x 120 -y 40 'hermes -w'", timeout=10)-terminal(command="sleep 8 && tmux send-keys -t frontend 'Build React dashboard for user management' && sleep 0.5 && tmux send-keys -t frontend Enter", timeout=15)+terminal(command="timeout 90 sh -c 'until tmux capture-pane -t frontend -p | grep -q "❯"; do sleep 1; done' && tmux send-keys -t frontend 'Build React dashboard for user management' && sleep 0.5 && tmux send-keys -t frontend Enter", timeout=100)# Check progress, relay context between themterminal(command="tmux capture-pane -t backend -p | tail -30", timeout=5)diff --git a/website/docs/user-guide/skills/bundled/productivity/productivity-docx.md b/website/docs/user-guide/skills/bundled/productivity/productivity-docx.mdindex d73e1466b0e..7a807c1d62e 100644--- a/website/docs/user-guide/skills/bundled/productivity/productivity-docx.md+++ b/website/docs/user-guide/skills/bundled/productivity/productivity-docx.md@@ -55,22 +55,32 @@ fields, and package health checks. It does not render documents itself- Python 3.10+ with `python-docx` (import name `docx`; lxml comes with it).- Pick the interpreter with `terminal`. Use `python` when it already imports- the libraries (the Hermes Docker image ships them); otherwise let Hermes- build its shared, pinned documents environment under the Hermes home. It- survives container restarts, never touches the Hermes install itself, and is- safe to run from several agents at once. Use this exact command in every- document skill so they all share one environment:+ the libraries (the Hermes Docker image ships them). Otherwise, when `hermes`+ is on PATH, let Hermes build its shared, pinned documents environment under+ the Hermes home: it survives container restarts, never touches the Hermes+ install itself, and is safe to run from several agents at once. When it is+ not (the terminal runs in a Docker sandbox, which has no Hermes), the block+ builds a venv in the sandbox home with the same pinned versions. Use this+ exact block in every document skill so they all share one environment:```bash- python -c "import docx" 2>/dev/null && PY=python || PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ python -c "import docx" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then+ PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ else+ PY="$HOME/.cache/hermes-docs-venv/bin/python"+ [ -x "$PY" ] || python3 -m venv "$HOME/.cache/hermes-docs-venv"+ "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null ||+ "$PY" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0+ fiexport PY"$PY" scripts/docx_create.py --help```- Run every helper below with `"$PY"`. In PowerShell:+ Run every helper below with `"$PY"`. In PowerShell (Hermes runs on that+ host, so it is on PATH):`$env:PY = hermes pm environment documents --extra documents --extra documents-pdf`.- Never `pip install` into the interpreter that runs Hermes or into this- environment; `hermes pm environment` owns it.+ Never `pip install` into the interpreter that runs Hermes or into the+ `hermes pm environment` one; Hermes owns both.- Comments `add` uses the native API on python-docx >= 1.2 and an XMLfallback on older versions — both are automatic.- For image blocks: the image files must exist locally (PNG/JPEG).diff --git a/website/docs/user-guide/skills/bundled/productivity/productivity-pdf.md b/website/docs/user-guide/skills/bundled/productivity/productivity-pdf.mdindex 79cec54a82c..8cf273276a8 100644--- a/website/docs/user-guide/skills/bundled/productivity/productivity-pdf.md+++ b/website/docs/user-guide/skills/bundled/productivity/productivity-pdf.md@@ -50,22 +50,32 @@ Create PDFs from structured specs, build and fill AcroForm forms (with layout li- Python 3.10+ with `pypdf`, `reportlab`, `pdfplumber`.- Pick the interpreter with `terminal`. Use `python` when it already imports- the libraries (the Hermes Docker image ships them); otherwise let Hermes- build its shared, pinned documents environment under the Hermes home. It- survives container restarts, never touches the Hermes install itself, and is- safe to run from several agents at once. Use this exact command in every- document skill so they all share one environment:+ the libraries (the Hermes Docker image ships them). Otherwise, when `hermes`+ is on PATH, let Hermes build its shared, pinned documents environment under+ the Hermes home: it survives container restarts, never touches the Hermes+ install itself, and is safe to run from several agents at once. When it is+ not (the terminal runs in a Docker sandbox, which has no Hermes), the block+ builds a venv in the sandbox home with the same pinned versions. Use this+ exact block in every document skill so they all share one environment:```bash- python -c "import pypdf, reportlab, pdfplumber" 2>/dev/null && PY=python || PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ python -c "import pypdf, reportlab, pdfplumber" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then+ PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ else+ PY="$HOME/.cache/hermes-docs-venv/bin/python"+ [ -x "$PY" ] || python3 -m venv "$HOME/.cache/hermes-docs-venv"+ "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null ||+ "$PY" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0+ fiexport PY"$PY" scripts/pdf_create.py --help```- Run every helper below with `"$PY"`. In PowerShell:+ Run every helper below with `"$PY"`. In PowerShell (Hermes runs on that+ host, so it is on PATH):`$env:PY = hermes pm environment documents --extra documents --extra documents-pdf`.- Never `pip install` into the interpreter that runs Hermes or into this- environment; `hermes pm environment` owns it.+ Never `pip install` into the interpreter that runs Hermes or into the+ `hermes pm environment` one; Hermes owns both.- Page rasterization (`pdf_page_image.py`, overlay rendering) uses `pypdfium2`, which the documents environment already has (if your `python` lacks it, switch `PY` to that environment with the command above), or poppler's `pdftoppm` on PATH. Scripts fall back pypdfium2 → pdftoppm and report `{"rendered": false, "missing": [...]}` (exit 0) when neither exists.- Each helper script checks imports lazily and prints an install hint if a dependency is missing.diff --git a/website/docs/user-guide/skills/bundled/productivity/productivity-powerpoint.md b/website/docs/user-guide/skills/bundled/productivity/productivity-powerpoint.mdindex 8db3ed935c4..9fff4c775af 100644--- a/website/docs/user-guide/skills/bundled/productivity/productivity-powerpoint.md+++ b/website/docs/user-guide/skills/bundled/productivity/productivity-powerpoint.md@@ -52,22 +52,32 @@ and slide rendering — all offline, no PowerPoint installation required.- Python 3.10+ with `python-pptx` (import name `pptx`).- Pick the interpreter with `terminal`. Use `python` when it already imports- the libraries (the Hermes Docker image ships them); otherwise let Hermes- build its shared, pinned documents environment under the Hermes home. It- survives container restarts, never touches the Hermes install itself, and is- safe to run from several agents at once. Use this exact command in every- document skill so they all share one environment:+ the libraries (the Hermes Docker image ships them). Otherwise, when `hermes`+ is on PATH, let Hermes build its shared, pinned documents environment under+ the Hermes home: it survives container restarts, never touches the Hermes+ install itself, and is safe to run from several agents at once. When it is+ not (the terminal runs in a Docker sandbox, which has no Hermes), the block+ builds a venv in the sandbox home with the same pinned versions. Use this+ exact block in every document skill so they all share one environment:```bash- python -c "import pptx" 2>/dev/null && PY=python || PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ python -c "import pptx" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then+ PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ else+ PY="$HOME/.cache/hermes-docs-venv/bin/python"+ [ -x "$PY" ] || python3 -m venv "$HOME/.cache/hermes-docs-venv"+ "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null ||+ "$PY" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0+ fiexport PY"$PY" scripts/pptx_create.py --help```- Run every helper below with `"$PY"`. In PowerShell:+ Run every helper below with `"$PY"`. In PowerShell (Hermes runs on that+ host, so it is on PATH):`$env:PY = hermes pm environment documents --extra documents --extra documents-pdf`.- Never `pip install` into the interpreter that runs Hermes or into this- environment; `hermes pm environment` owns it.+ Never `pip install` into the interpreter that runs Hermes or into the+ `hermes pm environment` one; Hermes owns both.- Optional: LibreOffice (`soffice`) plus poppler (`pdftoppm` or`pdftocairo`) for rendering slides to PNGs and for PDF export.`pptx_render.py` detects both with `shutil.which` and degradesdiff --git a/website/docs/user-guide/skills/bundled/productivity/productivity-xlsx.md b/website/docs/user-guide/skills/bundled/productivity/productivity-xlsx.mdindex ff98a23d105..c233d422a64 100644--- a/website/docs/user-guide/skills/bundled/productivity/productivity-xlsx.md+++ b/website/docs/user-guide/skills/bundled/productivity/productivity-xlsx.md@@ -58,22 +58,32 @@ scripts are argparse CLIs that print JSON and use explicit UTF-8 I/O.- Python 3.10+ with `openpyxl`. No other third-party packages areneeded; everything else is stdlib.- Pick the interpreter with `terminal`. Use `python` when it already imports- the libraries (the Hermes Docker image ships them); otherwise let Hermes- build its shared, pinned documents environment under the Hermes home. It- survives container restarts, never touches the Hermes install itself, and is- safe to run from several agents at once. Use this exact command in every- document skill so they all share one environment:+ the libraries (the Hermes Docker image ships them). Otherwise, when `hermes`+ is on PATH, let Hermes build its shared, pinned documents environment under+ the Hermes home: it survives container restarts, never touches the Hermes+ install itself, and is safe to run from several agents at once. When it is+ not (the terminal runs in a Docker sandbox, which has no Hermes), the block+ builds a venv in the sandbox home with the same pinned versions. Use this+ exact block in every document skill so they all share one environment:```bash- python -c "import openpyxl" 2>/dev/null && PY=python || PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ python -c "import openpyxl" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then+ PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+ else+ PY="$HOME/.cache/hermes-docs-venv/bin/python"+ [ -x "$PY" ] || python3 -m venv "$HOME/.cache/hermes-docs-venv"+ "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null ||+ "$PY" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0+ fiexport PY"$PY" scripts/xlsx_create.py --help```- Run every helper below with `"$PY"`. In PowerShell:+ Run every helper below with `"$PY"`. In PowerShell (Hermes runs on that+ host, so it is on PATH):`$env:PY = hermes pm environment documents --extra documents --extra documents-pdf`.- Never `pip install` into the interpreter that runs Hermes or into this- environment; `hermes pm environment` owns it.+ Never `pip install` into the interpreter that runs Hermes or into the+ `hermes pm environment` one; Hermes owns both.- Optional: LibreOffice (`soffice`) for headless recalculation orformat conversion.diff --git a/website/docs/user-guide/skills/optional/finance/finance-excel-author.md b/website/docs/user-guide/skills/optional/finance/finance-excel-author.mdindex c525b934b0c..29b813bc74e 100644--- a/website/docs/user-guide/skills/optional/finance/finance-excel-author.md+++ b/website/docs/user-guide/skills/optional/finance/finance-excel-author.md@@ -44,13 +44,22 @@ Adapted from Anthropic's `xlsx-author` and `audit-xls` skills in the [anthropics## SetupUse `python` when it already imports `openpyxl` (the Hermes Docker image ships-it). Otherwise let Hermes build its shared, pinned documents environment-under the Hermes home (the same command as the docx/xlsx/powerpoint/pdf-skills; safe to run from several agents at once), and never `pip install`-into the interpreter that runs Hermes:+it). Otherwise, when `hermes` is on PATH, let Hermes build its shared, pinned+documents environment under the Hermes home (safe to run from several agents+at once); in a Docker sandbox without Hermes the block builds a venv in the+sandbox home with the same pinned versions. It is the same block as the+docx/xlsx/powerpoint/pdf skills. Never `pip install` into the interpreter that+runs Hermes:```bash-python -c "import openpyxl" 2>/dev/null && PY=python || PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+python -c "import openpyxl" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then+ PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+else+ PY="$HOME/.cache/hermes-docs-venv/bin/python"+ [ -x "$PY" ] || python3 -m venv "$HOME/.cache/hermes-docs-venv"+ "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null ||+ "$PY" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0+fiexport PY```diff --git a/website/docs/user-guide/skills/optional/finance/finance-pptx-author.md b/website/docs/user-guide/skills/optional/finance/finance-pptx-author.mdindex 58298847f27..9f346c2f9ae 100644--- a/website/docs/user-guide/skills/optional/finance/finance-pptx-author.md+++ b/website/docs/user-guide/skills/optional/finance/finance-pptx-author.md@@ -45,13 +45,22 @@ For the broader, already-shipped PowerPoint authoring skill (slides, speaker not## SetupUse `python` when it already imports `pptx` (the Hermes Docker image ships-it). Otherwise let Hermes build its shared, pinned documents environment-under the Hermes home (the same command as the docx/xlsx/powerpoint/pdf-skills; safe to run from several agents at once), and never `pip install`-into the interpreter that runs Hermes:+it). Otherwise, when `hermes` is on PATH, let Hermes build its shared, pinned+documents environment under the Hermes home (safe to run from several agents+at once); in a Docker sandbox without Hermes the block builds a venv in the+sandbox home with the same pinned versions. It is the same block as the+docx/xlsx/powerpoint/pdf skills. Never `pip install` into the interpreter that+runs Hermes:```bash-python -c "import pptx" 2>/dev/null && PY=python || PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+python -c "import pptx" 2>/dev/null && PY=python || if command -v hermes >/dev/null 2>&1; then+ PY="$(hermes pm environment documents --extra documents --extra documents-pdf)"+else+ PY="$HOME/.cache/hermes-docs-venv/bin/python"+ [ -x "$PY" ] || python3 -m venv "$HOME/.cache/hermes-docs-venv"+ "$PY" -c "import docx, openpyxl, pptx, reportlab, pypdf, pdfplumber, pypdfium2" 2>/dev/null ||+ "$PY" -m pip install -q --disable-pip-version-check python-docx==1.2.0 openpyxl==3.1.5 python-pptx==1.0.2 reportlab==5.1.0 pypdf==6.21.2 pdfplumber==0.11.10 pypdfium2==5.14.0+fiexport PY```