Skip to content

The agent that grows with you

docs(site): docs and generated skill pages stop suggesting /tmp

teknium16c3ff1d7323f
diff --git a/website/docs/developer-guide/egress-internals.md b/website/docs/developer-guide/egress-internals.md
index 4b0e5eaea6e..45ceb8d3ed2 100644
--- a/website/docs/developer-guide/egress-internals.md
+++ b/website/docs/developer-guide/egress-internals.md
@@ -304,8 +304,8 @@ scripts/run_tests.sh tests/agent/test_iron_proxy.py tests/hermes_cli/test_iron_p
HERMES_RUN_E2E=1 scripts/run_tests.sh tests/agent/test_iron_proxy_e2e.py
# Live PTY smoke against `hermes egress`
-HERMES_HOME=/tmp/hermes-egress-test python3 -m hermes_cli.main egress --help
-HERMES_HOME=/tmp/hermes-egress-test python3 -m hermes_cli.main egress setup --help
+HERMES_HOME=$HOME/.hermes/cache/scratch/hermes-egress-test python3 -m hermes_cli.main egress --help
+HERMES_HOME=$HOME/.hermes/cache/scratch/hermes-egress-test python3 -m hermes_cli.main egress setup --help
```
The CLI uses argparse, so `--help` is a good first probe for "did my new flag register correctly".
diff --git a/website/docs/developer-guide/gateway-monitoring.md b/website/docs/developer-guide/gateway-monitoring.md
index dbea45a939c..216aebffb08 100644
--- a/website/docs/developer-guide/gateway-monitoring.md
+++ b/website/docs/developer-guide/gateway-monitoring.md
@@ -189,13 +189,13 @@ spans, logs, and resource attributes remain content-free.
```bash
# terminal 1: capture collector on :4318
python scripts/observability/otel_capture_collector.py \
- --host 127.0.0.1 --port 4318 --log /tmp/hermes_otel_capture.jsonl
+ --host 127.0.0.1 --port 4318 --log ~/.hermes/cache/scratch/hermes_otel_capture.jsonl
# terminal 2: drive the real exporter through lifecycle transitions,
# a fatal platform, and a structured warning event, then flush
python scripts/observability/gateway_health_export_probe.py \
--endpoint http://127.0.0.1:4318/v1/traces \
- --log /tmp/hermes_otel_capture.jsonl --wait 8
+ --log ~/.hermes/cache/scratch/hermes_otel_capture.jsonl --wait 8
# exit 0 prints: {"requests": 6, "paths": ["/v1/logs", "/v1/metrics", "/v1/traces"]}
```
@@ -288,7 +288,7 @@ values with no error:
hermes monitoring status # posture
python scripts/observability/gateway_health_export_probe.py \
--endpoint http://127.0.0.1:4318/v1/traces \
- --log /tmp/cap.jsonl --wait 8 # drive the real exporter
+ --log ~/.hermes/cache/scratch/cap.jsonl --wait 8 # drive the real exporter
```
Decode the captured OTLP payload and assert the new name/attribute is present
diff --git a/website/docs/developer-guide/image-gen-provider-plugin.md b/website/docs/developer-guide/image-gen-provider-plugin.md
index 41ae4fb38b3..82eeaeeb6ba 100644
--- a/website/docs/developer-guide/image-gen-provider-plugin.md
+++ b/website/docs/developer-guide/image-gen-provider-plugin.md
@@ -276,7 +276,7 @@ Drop a user plugin at `~/.hermes/plugins/image_gen/<name>/` with the same `name`
## Testing
```bash
-export HERMES_HOME=/tmp/hermes-imggen-test
+export HERMES_HOME=$HOME/.hermes/cache/scratch/hermes-imggen-test
mkdir -p $HERMES_HOME/plugins/image_gen/my-backend
# …copy __init__.py + plugin.yaml into that dir…
diff --git a/website/docs/developer-guide/middleware.md b/website/docs/developer-guide/middleware.md
index 5469af351cf..bf921314a0e 100644
--- a/website/docs/developer-guide/middleware.md
+++ b/website/docs/developer-guide/middleware.md
@@ -131,7 +131,7 @@ For isolated local testing, use one `HERMES_HOME` for plugin enablement and the
agent run:
```bash
-export HERMES_HOME=/tmp/hermes-middleware-test
+export HERMES_HOME=$HOME/.hermes/cache/scratch/hermes-middleware-test
mkdir -p "$HERMES_HOME"
hermes plugins enable <plugin-name>
hermes chat --query 'Reply exactly ok'
@@ -180,6 +180,9 @@ The effective request is passed to `pre_api_request`, provider execution, and
This plugin constrains `terminal` calls to a known working directory:
```python
+from pathlib import Path
+
+
def register(ctx):
ctx.register_middleware("tool_request", normalize_terminal_workdir)
@@ -188,7 +191,7 @@ def normalize_terminal_workdir(**kwargs):
if kwargs.get("tool_name") != "terminal":
return None
args = dict(kwargs["args"])
- args.setdefault("workdir", "/tmp/hermes-middleware-demo")
+ args.setdefault("workdir", str(Path.home() / ".hermes" / "cache" / "scratch" / "hermes-middleware-demo"))
return {
"args": args,
"source": "middleware-demo",
diff --git a/website/docs/developer-guide/model-provider-plugin.md b/website/docs/developer-guide/model-provider-plugin.md
index fed6b37c548..d61d32c9810 100644
--- a/website/docs/developer-guide/model-provider-plugin.md
+++ b/website/docs/developer-guide/model-provider-plugin.md
@@ -250,7 +250,7 @@ for p in list_providers():
Point `HERMES_HOME` at a temp directory so you don't pollute your real config:
```bash
-export HERMES_HOME=/tmp/hermes-plugin-test
+export HERMES_HOME=$HOME/.hermes/cache/scratch/hermes-plugin-test
mkdir -p $HERMES_HOME/plugins/model-providers/my-provider
cat > $HERMES_HOME/plugins/model-providers/my-provider/__init__.py <<'EOF'
from providers import register_provider
diff --git a/website/docs/developer-guide/session-storage.md b/website/docs/developer-guide/session-storage.md
index d8163dc0b49..fdcb6187f8a 100644
--- a/website/docs/developer-guide/session-storage.md
+++ b/website/docs/developer-guide/session-storage.md
@@ -323,7 +323,7 @@ _CHECKPOINT_EVERY_N_WRITES = 50
from hermes_state import SessionDB
db = SessionDB() # Default: ~/.hermes/state.db
-db = SessionDB(db_path=Path("/tmp/test.db")) # Custom path
+db = SessionDB(db_path=Path("~/.hermes/cache/scratch/test.db").expanduser()) # Custom path
```
### Create and Manage Sessions
diff --git a/website/docs/getting-started/nix-setup.md b/website/docs/getting-started/nix-setup.md
index b49616bd0d4..c93cf0283f8 100644
--- a/website/docs/getting-started/nix-setup.md
+++ b/website/docs/getting-started/nix-setup.md
@@ -1144,7 +1144,7 @@ Same layout, mounted into the container:
| `/nix/store` | `/nix/store` | `ro` | Hermes binary + all Nix deps |
| `/data` | `/var/lib/hermes` | `rw` | All state, config, workspace |
| `/home/hermes` | `${stateDir}/home` | `rw` | Persistent agent home — `pip install --user`, tool caches |
-| `/usr`, `/usr/local`, `/tmp` | (writable layer) | `rw` | `apt`/`pip`/`npm` installs — persists across restarts, lost on recreation |
+| `/usr`, `/usr/local`, `/tmp` | (writable layer) | `rw` | `apt`/`pip`/`npm` installs — persists across restarts, lost on recreation | <!-- no-tmp: ok — documents the container's own writable layer -->
---
diff --git a/website/docs/guides/delegation-patterns.md b/website/docs/guides/delegation-patterns.md
index 91436915a08..1f4865515ea 100644
--- a/website/docs/guides/delegation-patterns.md
+++ b/website/docs/guides/delegation-patterns.md
@@ -172,8 +172,8 @@ urls = [r["url"] for r in results[:5]]
content = web_extract(urls)
# Save for the analysis step
-import json
-with open("/tmp/ai-funding-data.json", "w") as f:
+import json, os
+with open(os.path.expanduser("~/.hermes/cache/scratch/ai-funding-data.json"), "w") as f:
json.dump({"search_results": results, "extracted": content["results"]}, f)
print(f"Collected {len(results)} results, extracted {len(content['results'])} pages")
""")
@@ -181,7 +181,7 @@ print(f"Collected {len(results)} results, extracted {len(content['results'])} pa
# Step 2: Reasoning-heavy analysis (delegation is better here)
delegate_task(
goal="Analyze AI funding data and write a market report",
- context="""Raw data at /tmp/ai-funding-data.json contains search results and
+ context="""Raw data at ~/.hermes/cache/scratch/ai-funding-data.json contains search results and
extracted web pages about AI funding, acquisitions, and IPOs in Q1 2026.
Write a structured market report: key deals, trends, notable players,
and outlook. Focus on deals over $100M."""
diff --git a/website/docs/guides/local-ollama-setup.md b/website/docs/guides/local-ollama-setup.md
index c3a46ed64d1..84dbf8f4682 100644
--- a/website/docs/guides/local-ollama-setup.md
+++ b/website/docs/guides/local-ollama-setup.md
@@ -168,12 +168,12 @@ By default, Ollama uses a 2048-token context. Hermes requires at least 64,000 to
```bash
# Create a Modelfile that extends context
-cat > /tmp/Modelfile << 'EOF'
+cat > ~/.hermes/cache/scratch/Modelfile << 'EOF'
FROM gemma4:31b
PARAMETER num_ctx 64000
EOF
-ollama create gemma4-64k -f /tmp/Modelfile
+ollama create gemma4-64k -f ~/.hermes/cache/scratch/Modelfile
```
Then update your Hermes config to use `gemma4-64k` as the model name.
diff --git a/website/docs/guides/pipe-script-output.md b/website/docs/guides/pipe-script-output.md
index 6df59eeb7d5..008a7d27ba6 100644
--- a/website/docs/guides/pipe-script-output.md
+++ b/website/docs/guides/pipe-script-output.md
@@ -36,7 +36,7 @@ hermes send --to telegram "deploy finished"
echo "RAM 92%" | hermes send --to telegram:-1001234567890
# Send a file
-hermes send --to discord:#ops --file /tmp/report.md
+hermes send --to discord:#ops --file ~/.hermes/cache/scratch/report.md
# Attach a subject/header line
hermes send --to slack:#eng --subject "[CI] build.log" --file build.log
diff --git a/website/docs/reference/cli-commands.md b/website/docs/reference/cli-commands.md
index f861c604d02..42dc34484c7 100644
--- a/website/docs/reference/cli-commands.md
+++ b/website/docs/reference/cli-commands.md
@@ -253,9 +253,9 @@ stdout is non-empty.
`hermes -z "…" --usage-file /path/report.json` writes a machine-readable usage report after the run: `estimated_cost_usd`, `input_tokens` / `output_tokens` / `cache_read_tokens` / `cache_write_tokens` / `reasoning_tokens` / `total_tokens`, `api_calls`, `model`, `provider`, `session_id`, `service_tier`, the `completed` / `failed` / `partial` / `interrupted` flags and `turn_exit_reason` (why `completed` is false, e.g. `max_iterations_reached(3/3)`). Those top-level counters cover the **main agent loop** only. Auxiliary LLM calls made on the same run (title generation, vision, context compression, `web_extract`, background review, …) are reported separately under `auxiliary` — the same totals plus a per-task `by_task` map — and `total_including_auxiliary` (`estimated_cost_usd`, `total_tokens`, `api_calls`) is the grand total to bill on. The report is written **even when the run fails**, so batch pipelines can always account for spend. It has no effect outside `-z`/`--oneshot`, and a broken usage write never masks the run's own outcome.
```bash
-hermes -z "summarize this repo" --usage-file /tmp/usage.json
-jq .total_including_auxiliary.estimated_cost_usd /tmp/usage.json
-jq .auxiliary.by_task /tmp/usage.json # what did title generation / vision cost?
+hermes -z "summarize this repo" --usage-file ~/.hermes/cache/scratch/usage.json
+jq .total_including_auxiliary.estimated_cost_usd ~/.hermes/cache/scratch/usage.json
+jq .auxiliary.by_task ~/.hermes/cache/scratch/usage.json # what did title generation / vision cost?
```
## `hermes model`
@@ -497,15 +497,15 @@ If neither a positional `message` argument nor `--file` is provided, `hermes sen
`--file` is for *text* bodies only. To deliver an image, document, video, or audio file as a native platform attachment, reference it inside the message text with the `MEDIA:<local_path>` directive:
```bash
-hermes send --to telegram "MEDIA:/tmp/screenshot.png"
-hermes send --to telegram "Build chart for today MEDIA:/tmp/chart.png" # with caption
-hermes send --to discord:#ops "MEDIA:/tmp/report.pdf"
+hermes send --to telegram "MEDIA:~/.hermes/cache/scratch/screenshot.png"
+hermes send --to telegram "Build chart for today MEDIA:~/.hermes/cache/scratch/chart.png" # with caption
+hermes send --to discord:#ops "MEDIA:~/.hermes/cache/scratch/report.pdf"
```
By default, image files are sent as photos (platforms like Telegram recompress these). Add `[[as_document]]` to the message to deliver them as uncompressed file attachments instead:
```bash
-hermes send --to telegram "[[as_document]] MEDIA:/tmp/screenshot.png"
+hermes send --to telegram "[[as_document]] MEDIA:~/.hermes/cache/scratch/screenshot.png"
```
Examples:
@@ -513,7 +513,7 @@ Examples:
```bash
hermes send --to telegram "deploy finished"
echo "RAM 92%" | hermes send --to telegram:-1001234567890
-hermes send --to discord:#ops --file /tmp/report.md
+hermes send --to discord:#ops --file ~/.hermes/cache/scratch/report.md
hermes send --to slack:#eng --subject "[CI]" --file build.log
hermes send --list # all platforms
hermes send --list telegram # filter by platform
@@ -1113,7 +1113,7 @@ The backup uses SQLite's `backup()` API for safe copying, so it works correctly
```bash
hermes backup # Full backup to ~/hermes-backup-*.zip
-hermes backup -o /tmp/hermes.zip # Full backup to specific path
+hermes backup -o ~/backups/hermes.zip # Full backup to specific path
hermes backup --quick # Quick state-only snapshot
hermes backup --quick --label "pre-upgrade" # Quick snapshot with label
```
diff --git a/website/docs/reference/faq.md b/website/docs/reference/faq.md
index 05d025c63a6..83c9c1a555a 100644
--- a/website/docs/reference/faq.md
+++ b/website/docs/reference/faq.md
@@ -574,7 +574,7 @@ node --version
npx --version
# Test the server manually
-npx -y @modelcontextprotocol/server-filesystem /tmp
+npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/dir
```
Verify your `~/.hermes/config.yaml` MCP configuration:
diff --git a/website/docs/user-guide/bot-mode.md b/website/docs/user-guide/bot-mode.md
index 814809aa30d..e3511d35804 100644
--- a/website/docs/user-guide/bot-mode.md
+++ b/website/docs/user-guide/bot-mode.md
@@ -226,9 +226,9 @@ Bots on one machine can message Bots on **another machine's gateway** without an
```bash
hermes peer add spark --url http://spark.lan:8377 --key <API_SERVER_KEY>
hermes peer list
-hermes peer dm spark < /tmp/dm.txt # message body from a file (nothing shell-interpreted)
-hermes peer dm spark/researcher < /tmp/dm.txt # named profile on a multiplexed peer
-hermes peer run spark --idempotency-key ticket-123 < /tmp/long-task.txt
+hermes peer dm spark < ~/.hermes/cache/scratch/dm.txt # message body from a file (nothing shell-interpreted)
+hermes peer dm spark/researcher < ~/.hermes/cache/scratch/dm.txt # named profile on a multiplexed peer
+hermes peer run spark --idempotency-key ticket-123 < ~/.hermes/cache/scratch/long-task.txt
hermes peer status spark run_abc123
hermes peer stop spark run_abc123
```
diff --git a/website/docs/user-guide/configuration.md b/website/docs/user-guide/configuration.md
index 37885be6f8f..8a52a2bc367 100644
--- a/website/docs/user-guide/configuration.md
+++ b/website/docs/user-guide/configuration.md
@@ -235,7 +235,7 @@ local backend — background-process logs/pid/exit files, code-execution
sandboxes, and spilled tool results. When it's empty (the default), Hermes
honors an explicit `TMPDIR`/`TMP`/`TEMP` from the environment and otherwise
uses a managed directory on real storage at `~/.hermes/cache/terminal`
-instead of `/tmp` — on many distros (Arch-based setups in particular) `/tmp`
+instead of `/tmp` — on many distros (Arch-based setups in particular) `/tmp` <!-- no-tmp: ok — explains why /tmp is avoided -->
is a small RAM-backed tmpfs that Hermes session artifacts can fill under
load. The managed directory is auto-pruned: artifacts older than 72 hours are
swept hourly by gateway housekeeping and once per process on CLI-only
@@ -417,7 +417,7 @@ Parallel subagents spawned via `delegate_task(tasks=[...])` share this one conta
- `--cap-drop ALL` with only `DAC_OVERRIDE`, `CHOWN`, `FOWNER` added back
- `--security-opt no-new-privileges`
- `--pids-limit 256`
-- Size-limited tmpfs for `/tmp` (512MB), `/var/tmp` (256MB), `/run` (64MB)
+- Size-limited tmpfs for `/tmp` (512MB), `/var/tmp` (256MB), `/run` (64MB) <!-- no-tmp: ok — documents the sandbox's own tmpfs -->
**Credential forwarding:** Env vars listed in `docker_forward_env` are resolved from your shell environment first, then `~/.hermes/.env`. Skills can also declare `required_environment_variables` which are merged automatically.
@@ -738,7 +738,7 @@ hermes config set terminal.persistent_shell false
```
**What persists across commands:**
-- Working directory (`cd /tmp` sticks for the next command)
+- Working directory (`cd ~/project` sticks for the next command)
- Exported environment variables (`export FOO=bar`)
- Shell variables (`MY_VAR=hello`)
diff --git a/website/docs/user-guide/desktop.md b/website/docs/user-guide/desktop.md
index b031ce0a11b..41315179f3c 100644
--- a/website/docs/user-guide/desktop.md
+++ b/website/docs/user-guide/desktop.md
@@ -632,7 +632,7 @@ Point the app at a specific checkout, or sandbox it from your real config:
```bash
HERMES_DESKTOP_HERMES_ROOT=/path/to/clone npm run dev
-HERMES_HOME=/tmp/throwaway npm run dev
+HERMES_HOME=$HOME/.hermes/cache/scratch/throwaway npm run dev
npm run dev:fake-boot # exercise the startup overlay with deterministic delays
```
diff --git a/website/docs/user-guide/docker.md b/website/docs/user-guide/docker.md
index def63ea1f0a..f7c8114964c 100644
--- a/website/docs/user-guide/docker.md
+++ b/website/docs/user-guide/docker.md
@@ -450,6 +450,7 @@ services:
volumes:
- ~/.hermes:/opt/data
- /run/user/${HERMES_UID}/pulse:/run/user/${HERMES_UID}/pulse
+ # no-tmp: ok — path inside the container
- ~/.config/pulse/cookie:/tmp/pulse-cookie:ro
- ./asound.conf:/etc/asound.conf:ro
environment:
@@ -457,6 +458,7 @@ services:
- HERMES_GID=${HERMES_GID}
- XDG_RUNTIME_DIR=/run/user/${HERMES_UID}
- PULSE_SERVER=unix:/run/user/${HERMES_UID}/pulse/native
+ # no-tmp: ok — path inside the container
- PULSE_COOKIE=/tmp/pulse-cookie
```
diff --git a/website/docs/user-guide/features/built-in-plugins.md b/website/docs/user-guide/features/built-in-plugins.md
index b9391ebe45d..1afafcf34ef 100644
--- a/website/docs/user-guide/features/built-in-plugins.md
+++ b/website/docs/user-guide/features/built-in-plugins.md
@@ -77,7 +77,7 @@ Auto-tracks and removes ephemeral files created during sessions — test scripts
| Hook | Behaviour |
|---|---|
-| `post_tool_call` | When `write_file` / `terminal` / `patch` creates a file matching `test_*`, `tmp_*`, or `*.test.*` inside `HERMES_HOME` or `/tmp/hermes-*`, track it silently as `test` / `temp` / `cron-output`. |
+| `post_tool_call` | When `write_file` / `terminal` / `patch` creates a file matching `test_*`, `tmp_*`, or `*.test.*` inside `HERMES_HOME` or `/tmp/hermes-*`, track it silently as `test` / `temp` / `cron-output`. | <!-- no-tmp: ok — documents the plugin's scope guard -->
| `on_session_end` | If any test files were auto-tracked during the turn, run the safe `quick` cleanup and log a one-line summary. Stays silent otherwise. |
**Deletion rules:**
@@ -111,6 +111,7 @@ Auto-tracks and removes ephemeral files created during sessions — test scripts
| `tracked.json.bak` | Atomic-write backup of the above |
| `cleanup.log` | Append-only audit trail of every track / skip / reject / delete |
+<!-- no-tmp: ok — documents the plugin's scope guard -->
**Safety** — cleanup only ever touches paths under `HERMES_HOME` or `/tmp/hermes-*`. Windows mounts (`/mnt/c/...`) are rejected. Well-known top-level state dirs (`logs/`, `memories/`, `sessions/`, `cron/`, `cache/`, `skills/`, `plugins/`, `disk-cleanup/` itself) are never removed even when empty — a fresh install does not get gutted on first session end. User project trees (`workspace/`, `projects/`, `plans/`, `home/`) are never tracked or swept at all: a `test_*.py` or `tmp_*` file inside your project is source code, not scratch. `kanban/` (task attachments and workspaces) is never tracked either, and a tracked *directory* under a protected top level such as `cache/` is never removed — only the files inside it age out.
**Enabling:** `hermes plugins enable disk-cleanup` (or check the box in `hermes plugins`).
diff --git a/website/docs/user-guide/features/codex-app-server-runtime.md b/website/docs/user-guide/features/codex-app-server-runtime.md
index 46c2fbbc241..e7923cc8d6f 100644
--- a/website/docs/user-guide/features/codex-app-server-runtime.md
+++ b/website/docs/user-guide/features/codex-app-server-runtime.md
@@ -257,7 +257,7 @@ Codex requests approval before executing commands or applying patches. These get
- **Allow for this session** → Codex won't re-prompt for similar commands.
- **Deny** → command is rejected; Codex continues in read-only mode.
-For `apply_patch` (file edit) approvals, Hermes shows a summary of what changed (`1 add, 1 update: /tmp/new.py, /tmp/old.py`) when codex provides the data via the corresponding `fileChange` item.
+For `apply_patch` (file edit) approvals, Hermes shows a summary of what changed (`1 add, 1 update: src/new.py, src/old.py`) when codex provides the data via the corresponding `fileChange` item.
## Permission profiles
diff --git a/website/docs/user-guide/features/context-files.md b/website/docs/user-guide/features/context-files.md
index 45329568e0f..eb461c4cfc4 100644
--- a/website/docs/user-guide/features/context-files.md
+++ b/website/docs/user-guide/features/context-files.md
@@ -43,6 +43,7 @@ monorepo/ (git root, cwd = packages/webapp/)
└── AGENTS.md ← Loaded last (most specific, takes precedence)
```
+<!-- no-tmp: ok — explains why /tmp is never trusted -->
Outside a git repository, only the working directory itself is checked — parents are never consulted, so an `AGENTS.md` planted in `/tmp` or `$HOME` can't leak into unrelated sessions.
### Progressive Subdirectory Discovery
diff --git a/website/docs/user-guide/features/cron.md b/website/docs/user-guide/features/cron.md
index 982c289a47d..006d346c16b 100644
--- a/website/docs/user-guide/features/cron.md
+++ b/website/docs/user-guide/features/cron.md
@@ -1260,8 +1260,8 @@ cronjob(action="create", name="process-feed",
```bash
#!/bin/bash
# ~/.hermes/scripts/flag-ready.sh
-if test -f /tmp/new-data-ready; then
- rm -f /tmp/new-data-ready
+if test -f ~/.hermes/cache/scratch/new-data-ready; then
+ rm -f ~/.hermes/cache/scratch/new-data-ready
echo '{"wakeAgent": true}'
else
echo '{"wakeAgent": false}'
diff --git a/website/docs/user-guide/features/deliverable-mode.md b/website/docs/user-guide/features/deliverable-mode.md
index d01847ebb05..ea042049b33 100644
--- a/website/docs/user-guide/features/deliverable-mode.md
+++ b/website/docs/user-guide/features/deliverable-mode.md
@@ -28,7 +28,7 @@ Three pieces fit together:
`text_to_speech` for audio, and so on.
2. **The gateway scans agent responses for file paths.** Any absolute path
- (`/tmp/...`) or home-relative path (`~/...`) ending in a supported
+ (`~/.hermes/cache/scratch/...`) or home-relative path (`~/...`) ending in a supported
extension gets extracted. Paths inside code blocks and inline code are
ignored so code samples are never mutilated.
@@ -71,7 +71,7 @@ persona in `~/.hermes/SOUL.md`, or as a named preset under
via `/personality`).
The mechanic the agent has to use is simple: render the file to an
-absolute path (e.g. `/tmp/q3-revenue.png`) and mention that path as
+absolute path (e.g. `~/.hermes/cache/scratch/q3-revenue.png`) and mention that path as
plain text in the reply. The gateway does the rest. Paths inside
fenced code blocks or backticks are ignored so code samples are never
mutilated.
@@ -85,8 +85,8 @@ deliverable files to their `kanban_complete` call:
kanban_complete(
summary="rendered Q3 revenue chart and report",
artifacts=[
- "/tmp/q3-revenue.png",
- "/tmp/q3-report.pdf",
+ "~/.hermes/cache/scratch/q3-revenue.png",
+ "~/.hermes/cache/scratch/q3-report.pdf",
],
)
```
diff --git a/website/docs/user-guide/features/document-extraction.md b/website/docs/user-guide/features/document-extraction.md
index 3880db62d8b..308c0e894b8 100644
--- a/website/docs/user-guide/features/document-extraction.md
+++ b/website/docs/user-guide/features/document-extraction.md
@@ -53,7 +53,7 @@ The warning lists the exact page ranges and the recovery paths:
1. **A few pages — render + vision.** Convert the pages to images and read them with the vision tool:
```bash
- pdftoppm -jpeg -r 150 -f 92 -l 94 document.pdf /tmp/page
+ pdftoppm -jpeg -r 150 -f 92 -l 94 document.pdf $TMPDIR/page
```
Then inspect each image with `vision_analyze`. Zero extra dependencies (poppler is required for the detection itself).
2. **Many pages — OCR.** The `ocr-and-documents` skill covers bulk OCR with marker-pdf (90+ languages, handles equations and tables; ~3-5 GB install).
diff --git a/website/docs/user-guide/features/goals.md b/website/docs/user-guide/features/goals.md
index 7697da97e89..298dc45aa9d 100644
--- a/website/docs/user-guide/features/goals.md
+++ b/website/docs/user-guide/features/goals.md
@@ -249,31 +249,31 @@ The judge call is small (~200 output tokens) and runs once per turn, so a cheap
## Example walkthrough
```
-You: /goal Create four files /tmp/note_{1..4}.txt, one per turn, each containing its number as text
+You: /goal Create four files ~/.hermes/cache/scratch/note_{1..4}.txt, one per turn, each containing its number as text
- ⊙ Goal set (20-turn budget): Create four files /tmp/note_{1..4}.txt, one per turn, each containing its number as text
+ ⊙ Goal set (20-turn budget): Create four files ~/.hermes/cache/scratch/note_{1..4}.txt, one per turn, each containing its number as text
-Hermes: Creating /tmp/note_1.txt now.
- 💻 echo "1" > /tmp/note_1.txt (0.1s)
- I've created /tmp/note_1.txt with the content "1". I'll continue with the remaining files on the next turn as you specified.
+Hermes: Creating ~/.hermes/cache/scratch/note_1.txt now.
+ 💻 echo "1" > ~/.hermes/cache/scratch/note_1.txt (0.1s)
+ I've created ~/.hermes/cache/scratch/note_1.txt with the content "1". I'll continue with the remaining files on the next turn as you specified.
↻ Continuing toward goal (1/20): Only 1 of 4 files has been created; 3 files remain.
Hermes: [Continuing toward your standing goal]
- 💻 echo "2" > /tmp/note_2.txt (0.1s)
- Created /tmp/note_2.txt. Two more to go.
+ 💻 echo "2" > ~/.hermes/cache/scratch/note_2.txt (0.1s)
+ Created ~/.hermes/cache/scratch/note_2.txt. Two more to go.
↻ Continuing toward goal (2/20): 2 of 4 files created; 2 remain.
Hermes: [Continuing toward your standing goal]
- 💻 echo "3" > /tmp/note_3.txt (0.1s)
- Created /tmp/note_3.txt.
+ 💻 echo "3" > ~/.hermes/cache/scratch/note_3.txt (0.1s)
+ Created ~/.hermes/cache/scratch/note_3.txt.
↻ Continuing toward goal (3/20): 3 of 4 files created; 1 remains.
Hermes: [Continuing toward your standing goal]
- 💻 echo "4" > /tmp/note_4.txt (0.1s)
- All four files have been created: /tmp/note_1.txt through /tmp/note_4.txt, each containing its number.
+ 💻 echo "4" > ~/.hermes/cache/scratch/note_4.txt (0.1s)
+ All four files have been created: ~/.hermes/cache/scratch/note_1.txt through ~/.hermes/cache/scratch/note_4.txt, each containing its number.
✓ Goal achieved: All four files were created with the specified content, completing the goal.
diff --git a/website/docs/user-guide/features/mcp.md b/website/docs/user-guide/features/mcp.md
index fa2a160d71c..3031dd3fd60 100644
--- a/website/docs/user-guide/features/mcp.md
+++ b/website/docs/user-guide/features/mcp.md
@@ -475,7 +475,7 @@ Hermes reads MCP config from `~/.hermes/config.yaml` under `mcp_servers`.
mcp_servers:
filesystem:
command: "npx"
- args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
+ args: ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"]
```
### Recycling memory-heavy stdio servers
diff --git a/website/docs/user-guide/features/skills.md b/website/docs/user-guide/features/skills.md
index 3f6662e530a..0d164d39ecf 100644
--- a/website/docs/user-guide/features/skills.md
+++ b/website/docs/user-guide/features/skills.md
@@ -76,7 +76,7 @@ Parsing stops at the first token that isn't an installed skill, so arguments
that happen to start with `/` (like file paths) are never swallowed:
```bash
-/ocr-and-documents /tmp/scan.pdf extract the tables # loads one skill; /tmp/scan.pdf is the argument
+/ocr-and-documents ~/.hermes/cache/scratch/scan.pdf extract the tables # loads one skill; ~/.hermes/cache/scratch/scan.pdf is the argument
```
For combinations you use repeatedly, prefer a [skill bundle](#skill-bundles) —
diff --git a/website/docs/user-guide/messaging/slack.md b/website/docs/user-guide/messaging/slack.md
index a438e55675f..12fef75ba99 100644
--- a/website/docs/user-guide/messaging/slack.md
+++ b/website/docs/user-guide/messaging/slack.md
@@ -363,7 +363,7 @@ If you maintain your Slack manifest by hand and just want the slash
command list:
```bash
-hermes slack manifest --slashes-only > /tmp/slashes.json
+hermes slack manifest --slashes-only > ~/.hermes/cache/scratch/slashes.json
```
Paste that array into the `features.slash_commands` key of your
diff --git a/website/docs/user-guide/security.md b/website/docs/user-guide/security.md
index 9b1b77b1383..e8ed119e0b1 100644
--- a/website/docs/user-guide/security.md
+++ b/website/docs/user-guide/security.md
@@ -245,7 +245,7 @@ In the interactive CLI, dangerous commands show an inline approval prompt:
```
⚠️ DANGEROUS COMMAND: recursive delete
- rm -rf /tmp/old-project
+ rm -rf ~/old-project
[o]nce | [s]ession | [a]lways | [d]eny
@@ -548,6 +548,7 @@ _BASE_SECURITY_ARGS = [
"--cap-add", "FOWNER", # Package managers need file ownership
"--security-opt", "no-new-privileges", # Block privilege escalation
"--pids-limit", "256", # Limit process count
+ # no-tmp: ok — configures the sandbox's own tmpfs
"--tmpfs", "/tmp:rw,nosuid,size=512m", # Size-limited /tmp
"--tmpfs", "/var/tmp:rw,noexec,nosuid,size=256m", # No-exec /var/tmp
]
diff --git a/website/docs/user-guide/skills/bundled/apple/apple-findmy.md b/website/docs/user-guide/skills/bundled/apple/apple-findmy.md
index 6637f08a9dd..6b030807394 100644
--- a/website/docs/user-guide/skills/bundled/apple/apple-findmy.md
+++ b/website/docs/user-guide/skills/bundled/apple/apple-findmy.md
@@ -61,12 +61,12 @@ osascript -e 'tell application "FindMy" to activate'
sleep 3
# Take a screenshot of the Find My window
-screencapture -w -o /tmp/findmy.png
+screencapture -w -o ~/.hermes/cache/scratch/findmy.png
```
Then use `vision_analyze` to read the screenshot:
```
-vision_analyze(image_url="/tmp/findmy.png", question="What devices/items are shown and what are their locations?")
+vision_analyze(image_url="~/.hermes/cache/scratch/findmy.png", question="What devices/items are shown and what are their locations?")
```
### Switch Between Tabs
@@ -99,18 +99,18 @@ osascript -e 'tell application "FindMy" to activate'
sleep 3
# Capture and annotate the UI
-peekaboo see --app "FindMy" --annotate --path /tmp/findmy-ui.png
+peekaboo see --app "FindMy" --annotate --path ~/.hermes/cache/scratch/findmy-ui.png
# Click on a specific device/item by element ID
peekaboo click --on B3 --app "FindMy"
# Capture the detail view
-peekaboo image --app "FindMy" --path /tmp/findmy-detail.png
+peekaboo image --app "FindMy" --path ~/.hermes/cache/scratch/findmy-detail.png
```
Then analyze with vision:
```
-vision_analyze(image_url="/tmp/findmy-detail.png", question="What is the location shown for this device/item? Include address and coordinates if visible.")
+vision_analyze(image_url="~/.hermes/cache/scratch/findmy-detail.png", question="What is the location shown for this device/item? Include address and coordinates if visible.")
```
## Workflow: Track AirTag Location Over Time
@@ -126,7 +126,7 @@ sleep 3
# 3. Periodically capture location
while true; do
- screencapture -w -o /tmp/findmy-$(date +%H%M%S).png
+ screencapture -w -o ~/.hermes/cache/scratch/findmy-$(date +%H%M%S).png
sleep 300 # Every 5 minutes
done
```
diff --git a/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-claude-code.md b/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-claude-code.md
index 8c11926c86e..76553da34d3 100644
--- a/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-claude-code.md
+++ b/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-claude-code.md
@@ -236,10 +236,10 @@ Parse `structured_output` from the JSON result. Claude validates output against
### Session Continuation
```
# Start a task
-terminal(command="claude -p 'Start refactoring the database layer' --output-format json --max-turns 10 > /tmp/session.json", workdir="/project", timeout=180)
+terminal(command="claude -p 'Start refactoring the database layer' --output-format json --max-turns 10 > ~/.hermes/cache/scratch/session.json", workdir="/project", timeout=180)
# Resume with session ID
-terminal(command="claude -p 'Continue and add connection pooling' --resume $(cat /tmp/session.json | python -c 'import json,sys; print(json.load(sys.stdin)[\"session_id\"])') --max-turns 5", workdir="/project", timeout=120)
+terminal(command="claude -p 'Continue and add connection pooling' --resume $(cat ~/.hermes/cache/scratch/session.json | python -c 'import json,sys; print(json.load(sys.stdin)[\"session_id\"])') --max-turns 5", workdir="/project", timeout=120)
# Or resume the most recent session in the same directory
terminal(command="claude -p 'What did you do last time?' --continue --max-turns 1", workdir="/project", timeout=30)
@@ -626,7 +626,7 @@ Configure in `.claude/settings.json` (project) or `~/.claude/settings.json` (glo
"hooks": [{"type": "command", "command": "if echo \"$CLAUDE_TOOL_INPUT\" | grep -q 'rm -rf'; then echo 'Blocked!' && exit 2; fi"}]
}],
"Stop": [{
- "hooks": [{"type": "command", "command": "echo 'Claude finished a response' >> /tmp/claude-activity.log"}]
+ "hooks": [{"type": "command", "command": "echo 'Claude finished a response' >> ~/.hermes/cache/scratch/claude-activity.log"}]
}]
}
}
diff --git a/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-codex.md b/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-codex.md
index 7103460e40b..d8a02f0930e 100644
--- a/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-codex.md
+++ b/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-codex.md
@@ -126,22 +126,22 @@ terminal(command="REVIEW=$(mktemp -d) && git clone https://github.com/user/repo.
```
# Create worktrees
-terminal(command="git worktree add -b fix/issue-78 /tmp/issue-78 main", workdir="~/project")
-terminal(command="git worktree add -b fix/issue-99 /tmp/issue-99 main", workdir="~/project")
+terminal(command="git worktree add -b fix/issue-78 ~/.hermes/cache/scratch/issue-78 main", workdir="~/project")
+terminal(command="git worktree add -b fix/issue-99 ~/.hermes/cache/scratch/issue-99 main", workdir="~/project")
# Launch Codex in each
-terminal(command="codex --sandbox workspace-write exec 'Fix issue #78: <description>. Commit when done.'", workdir="/tmp/issue-78", background=true, pty=true)
-terminal(command="codex --sandbox workspace-write exec 'Fix issue #99: <description>. Commit when done.'", workdir="/tmp/issue-99", background=true, pty=true)
+terminal(command="codex --sandbox workspace-write exec 'Fix issue #78: <description>. Commit when done.'", workdir="~/.hermes/cache/scratch/issue-78", background=true, pty=true)
+terminal(command="codex --sandbox workspace-write exec 'Fix issue #99: <description>. Commit when done.'", workdir="~/.hermes/cache/scratch/issue-99", background=true, pty=true)
# Monitor
process(action="list")
# After completion, push and create PRs
-terminal(command="cd /tmp/issue-78 && git push -u origin fix/issue-78")
+terminal(command="cd ~/.hermes/cache/scratch/issue-78 && git push -u origin fix/issue-78")
terminal(command="gh pr create --repo user/repo --head fix/issue-78 --title 'fix: ...' --body '...'")
# Cleanup
-terminal(command="git worktree remove /tmp/issue-78", workdir="~/project")
+terminal(command="git worktree remove ~/.hermes/cache/scratch/issue-78", workdir="~/project")
```
## Batch PR Reviews
diff --git a/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-opencode.md b/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-opencode.md
index dc0626684f1..26c52112212 100644
--- a/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-opencode.md
+++ b/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-opencode.md
@@ -184,8 +184,8 @@ terminal(command="REVIEW=$(mktemp -d) && git clone https://github.com/user/repo.
Use separate workdirs/worktrees to avoid collisions:
```
-terminal(command="opencode run 'Fix issue #101 and commit'", workdir="/tmp/issue-101", background=true, pty=true)
-terminal(command="opencode run 'Add parser regression tests and commit'", workdir="/tmp/issue-102", background=true, pty=true)
+terminal(command="opencode run 'Fix issue #101 and commit'", workdir="~/.hermes/cache/scratch/issue-101", background=true, pty=true)
+terminal(command="opencode run 'Add parser regression tests and commit'", workdir="~/.hermes/cache/scratch/issue-102", background=true, pty=true)
process(action="list")
```
diff --git a/website/docs/user-guide/skills/bundled/creative/creative-ascii-art.md b/website/docs/user-guide/skills/bundled/creative/creative-ascii-art.md
index 21cdb1ff573..32feeecd8a0 100644
--- a/website/docs/user-guide/skills/bundled/creative/creative-ascii-art.md
+++ b/website/docs/user-guide/skills/bundled/creative/creative-ascii-art.md
@@ -250,14 +250,14 @@ Large collection of classic ASCII art organized by subject. Art is inside HTML `
**Step 1 — Fetch the page:**
```bash
-curl -s 'https://ascii.co.uk/art/cat' -o /tmp/ascii_art.html
+curl -s 'https://ascii.co.uk/art/cat' -o ~/.hermes/cache/scratch/ascii_art.html
```
**Step 2 — Extract art from pre tags:**
```python
-import re, html
-with open('/tmp/ascii_art.html') as f:
+import os, re, html
+with open(os.path.expanduser('~/.hermes/cache/scratch/ascii_art.html')) as f:
text = f.read()
arts = re.findall(r'<pre[^>]*>(.*?)</pre>', text, re.DOTALL)
for art in arts:
diff --git a/website/docs/user-guide/skills/bundled/creative/creative-pretext.md b/website/docs/user-guide/skills/bundled/creative/creative-pretext.md
index b90b114438a..f94cd035ebc 100644
--- a/website/docs/user-guide/skills/bundled/creative/creative-pretext.md
+++ b/website/docs/user-guide/skills/bundled/creative/creative-pretext.md
@@ -171,7 +171,7 @@ See `templates/donut-orbit.html` and `templates/hello-orb-flow.html` for working
2. **Start from a template**:
- `templates/hello-orb-flow.html` — text reflowing around a moving orb (reflow-around-obstacle pattern)
- `templates/donut-orbit.html` — advanced example: measured ASCII logo obstacles, draggable wire sphere/cube, morphing shape fields, selectable DOM text, and dev-only controls
- - `write_file` to a new `.html` in `/tmp/` or the user's workspace.
+ - `write_file` to a new `.html` in `~/.hermes/cache/scratch/` or the user's workspace.
3. **Swap the corpus** for something intentional to the brief. Real prose, 10-100 sentences, no lorem.
4. **Tune the aesthetic** — font, palette, composition, interaction. This is the work; don't skip it.
5. **Verify locally**:
diff --git a/website/docs/user-guide/skills/bundled/github/github-github-pr-workflow.md b/website/docs/user-guide/skills/bundled/github/github-github-pr-workflow.md
index 9a7e782e374..c1691878535 100644
--- a/website/docs/user-guide/skills/bundled/github/github-github-pr-workflow.md
+++ b/website/docs/user-guide/skills/bundled/github/github-github-pr-workflow.md
@@ -263,8 +263,8 @@ RUN_ID=<run_id>
curl -s -L \
-H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/$OWNER/$REPO/actions/runs/$RUN_ID/logs \
- -o /tmp/ci-logs.zip
-cd /tmp && unzip -o ci-logs.zip -d ci-logs && cat ci-logs/*.txt
+ -o ~/.hermes/cache/scratch/ci-logs.zip
+cd ~/.hermes/cache/scratch && unzip -o ci-logs.zip -d ci-logs && cat ci-logs/*.txt
```
### Step 2: Fix and Push
diff --git a/website/docs/user-guide/skills/bundled/github/github-github-repo-management.md b/website/docs/user-guide/skills/bundled/github/github-github-repo-management.md
index 6116ebefb50..c6230050135 100644
--- a/website/docs/user-guide/skills/bundled/github/github-github-repo-management.md
+++ b/website/docs/user-guide/skills/bundled/github/github-github-repo-management.md
@@ -463,8 +463,8 @@ RUN_ID=<run_id>
curl -s -L \
-H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/$OWNER/$REPO/actions/runs/$RUN_ID/logs \
- -o /tmp/ci-logs.zip
-cd /tmp && unzip -o ci-logs.zip -d ci-logs
+ -o ~/.hermes/cache/scratch/ci-logs.zip
+cd ~/.hermes/cache/scratch && unzip -o ci-logs.zip -d ci-logs
# Re-run a failed workflow
curl -s -X POST \
diff --git a/website/docs/user-guide/skills/bundled/productivity/productivity-ocr-and-documents.md b/website/docs/user-guide/skills/bundled/productivity/productivity-ocr-and-documents.md
index 69c94098219..40e7b1da11f 100644
--- a/website/docs/user-guide/skills/bundled/productivity/productivity-ocr-and-documents.md
+++ b/website/docs/user-guide/skills/bundled/productivity/productivity-ocr-and-documents.md
@@ -36,7 +36,7 @@ For PPTX: see the `powerpoint` skill (full create/read/edit support).
For PDF manipulation (merge, split, forms, watermarks, creation): see the `pdf` skill.
This skill covers **text extraction from PDFs and scanned documents**.
-> **Coming from a `read_file` EXTRACTION COVERAGE WARNING?** `read_file` auto-converts local PDFs but reads the text layer only; the warning footer lists the pages that yielded no text (scanned images). For a handful of pages, render + vision is fastest: `pdftoppm -jpeg -r 150 -f N -l N file.pdf /tmp/page` then `vision_analyze` each image. For bulk OCR of many pages, use marker-pdf below (Step 2).
+> **Coming from a `read_file` EXTRACTION COVERAGE WARNING?** `read_file` auto-converts local PDFs but reads the text layer only; the warning footer lists the pages that yielded no text (scanned images). For a handful of pages, render + vision is fastest: `pdftoppm -jpeg -r 150 -f N -l N file.pdf $TMPDIR/page` then `vision_analyze` each image. For bulk OCR of many pages, use marker-pdf below (Step 2).
## Step 1: Remote URL Available?
diff --git a/website/docs/user-guide/skills/bundled/research/research-blocked-page-recovery.md b/website/docs/user-guide/skills/bundled/research/research-blocked-page-recovery.md
index 9995987a36f..a9e9dc40fc1 100644
--- a/website/docs/user-guide/skills/bundled/research/research-blocked-page-recovery.md
+++ b/website/docs/user-guide/skills/bundled/research/research-blocked-page-recovery.md
@@ -97,7 +97,7 @@ Rate-limits aggressively (429) and rotates domains, so iterate:
```bash
for d in archive.ph archive.md archive.li archive.is; do
- curl -sL --max-time 20 "https://$d/newest/{URL}" -o /tmp/page.html \
+ curl -sL --max-time 20 "https://$d/newest/{URL}" -o ~/.hermes/cache/scratch/page.html \
-w "%{http_code}" && break
done
```
diff --git a/website/docs/user-guide/skills/bundled/smart-home/smart-home-openhue.md b/website/docs/user-guide/skills/bundled/smart-home/smart-home-openhue.md
index 3255b428e14..f692e412b49 100644
--- a/website/docs/user-guide/skills/bundled/smart-home/smart-home-openhue.md
+++ b/website/docs/user-guide/skills/bundled/smart-home/smart-home-openhue.md
@@ -37,8 +37,8 @@ Control Philips Hue lights and scenes via a Hue Bridge from the terminal.
```bash
# Linux (pre-built binary — releases ship tarballs, not bare binaries)
curl -sL "https://github.com/openhue/openhue-cli/releases/latest/download/openhue_Linux_x86_64.tar.gz" \
- | tar -xz -C /tmp openhue \
- && install -m 0755 /tmp/openhue ~/.local/bin/openhue
+ | tar -xz -C ~/.hermes/cache/scratch openhue \
+ && install -m 0755 ~/.hermes/cache/scratch/openhue ~/.local/bin/openhue
# (use openhue_Linux_arm64.tar.gz on ARM64)
# macOS
diff --git a/website/docs/user-guide/skills/bundled/software-development/software-development-hermes-agent-skill-authoring.md b/website/docs/user-guide/skills/bundled/software-development/software-development-hermes-agent-skill-authoring.md
index 7e53288669c..9f12f93010f 100644
--- a/website/docs/user-guide/skills/bundled/software-development/software-development-hermes-agent-skill-authoring.md
+++ b/website/docs/user-guide/skills/bundled/software-development/software-development-hermes-agent-skill-authoring.md
@@ -119,6 +119,7 @@ Bad: `Use when a user asks to monitor named competitors or companies for product
| `osascript`, `defaults`, `pmset` | `[macos]` |
| `apt`/`systemctl`/`/proc` | `[linux]` |
+<!-- no-tmp: ok — names the anti-pattern skill authors must avoid -->
POSIX-only signals to search for in `scripts/`: `fcntl`, `termios`, `pty`, `os.fork`, `os.killpg`, `signal.SIGKILL`, `os.kill(pid, 0)` liveness checks, hardcoded `/tmp` `/proc` `/etc`. Default posture: fix cross-platform first (`tempfile.gettempdir()`, `pathlib.Path`, `psutil.pid_exists`); gate narrower only when the dependency is genuinely platform-bound, and say why in `## Pitfalls`.
## Size Limits
diff --git a/website/docs/user-guide/skills/bundled/software-development/software-development-inspecting-hermes-desktop-dom.md b/website/docs/user-guide/skills/bundled/software-development/software-development-inspecting-hermes-desktop-dom.md
index 3ad00695e2c..402e69f257c 100644
--- a/website/docs/user-guide/skills/bundled/software-development/software-development-inspecting-hermes-desktop-dom.md
+++ b/website/docs/user-guide/skills/bundled/software-development/software-development-inspecting-hermes-desktop-dom.md
@@ -140,10 +140,10 @@ When there is no port, or you must not disturb the user's window:
```bash
cd apps/desktop
-HERMES_HOME=/tmp/cdp-probe-home \
+HERMES_HOME=$HOME/.hermes/cache/scratch/cdp-probe-home \
HERMES_DESKTOP_DEV_SERVER=http://127.0.0.1:5174 \
HERMES_DESKTOP_CDP_PORT=9333 \
- npx electron . --user-data-dir=/tmp/cdp-probe-userdata
+ npx electron . --user-data-dir=$HOME/.hermes/cache/scratch/cdp-probe-userdata
```
The separate `--user-data-dir` dodges Electron's single-instance lock, so it
diff --git a/website/docs/user-guide/skills/bundled/software-development/software-development-node-inspect-debugger.md b/website/docs/user-guide/skills/bundled/software-development/software-development-node-inspect-debugger.md
index 24384cbd660..c57ddea4f54 100644
--- a/website/docs/user-guide/skills/bundled/software-development/software-development-node-inspect-debugger.md
+++ b/website/docs/user-guide/skills/bundled/software-development/software-development-node-inspect-debugger.md
@@ -129,7 +129,7 @@ npm i -g chrome-remote-interface # or project-local
node --inspect-brk=9229 target.js &
```
-Driver script (save as `/tmp/cdp-debug.js`):
+Driver script (save as `~/.hermes/cache/scratch/cdp-debug.js`):
```javascript
const CDP = require('chrome-remote-interface');
@@ -182,14 +182,14 @@ const CDP = require('chrome-remote-interface');
Run it:
```bash
-node /tmp/cdp-debug.js
+node ~/.hermes/cache/scratch/cdp-debug.js
```
Hermes-specific note: `chrome-remote-interface` is NOT in `ui-tui/package.json`. Install it to a throwaway location if you don't want to dirty the project:
```bash
-mkdir -p /tmp/cdp-tools && cd /tmp/cdp-tools && npm i chrome-remote-interface
-NODE_PATH=/tmp/cdp-tools/node_modules node /tmp/cdp-debug.js
+mkdir -p ~/.hermes/cache/scratch/cdp-tools && cd ~/.hermes/cache/scratch/cdp-tools && npm i chrome-remote-interface
+NODE_PATH=~/.hermes/cache/scratch/cdp-tools/node_modules node ~/.hermes/cache/scratch/cdp-debug.js
```
## Debugging Hermes ui-tui
@@ -264,8 +264,8 @@ await client.Profiler.enable();
await client.Profiler.start();
await new Promise(r => setTimeout(r, 5000));
const { profile } = await client.Profiler.stop();
-require('fs').writeFileSync('/tmp/cpu.cpuprofile', JSON.stringify(profile));
-// Open /tmp/cpu.cpuprofile in Chrome DevTools → Performance tab
+require('fs').writeFileSync('~/.hermes/cache/scratch/cpu.cpuprofile', JSON.stringify(profile));
+// Open ~/.hermes/cache/scratch/cpu.cpuprofile in Chrome DevTools → Performance tab
```
```javascript
@@ -274,7 +274,7 @@ await client.HeapProfiler.enable();
const chunks = [];
client.HeapProfiler.addHeapSnapshotChunk(({ chunk }) => chunks.push(chunk));
await client.HeapProfiler.takeHeapSnapshot({ reportProgress: false });
-require('fs').writeFileSync('/tmp/heap.heapsnapshot', chunks.join(''));
+require('fs').writeFileSync('~/.hermes/cache/scratch/heap.heapsnapshot', chunks.join(''));
```
## Common Pitfalls
diff --git a/website/docs/user-guide/skills/bundled/software-development/software-development-python-debugpy.md b/website/docs/user-guide/skills/bundled/software-development/software-development-python-debugpy.md
index d410baeab99..e5b796a9acd 100644
--- a/website/docs/user-guide/skills/bundled/software-development/software-development-python-debugpy.md
+++ b/website/docs/user-guide/skills/bundled/software-development/software-development-python-debugpy.md
@@ -218,7 +218,7 @@ The easiest terminal-side DAP client is VS Code CLI or a small script. From insi
**Option 1: `debugpy`'s own CLI REPL** — not an official feature, but a tiny DAP client script:
```python
-# /tmp/dap_client.py
+# ~/.hermes/cache/scratch/dap_client.py
import socket, json, itertools, time, sys
HOST, PORT = "127.0.0.1", 5678
diff --git a/website/docs/user-guide/skills/bundled/web/web-blocked-page-recovery.md b/website/docs/user-guide/skills/bundled/web/web-blocked-page-recovery.md
index c3d5f9c3608..26e6b3e0393 100644
--- a/website/docs/user-guide/skills/bundled/web/web-blocked-page-recovery.md
+++ b/website/docs/user-guide/skills/bundled/web/web-blocked-page-recovery.md
@@ -97,7 +97,7 @@ Rate-limits aggressively (429) and rotates domains, so iterate:
```bash
for d in archive.ph archive.md archive.li archive.is; do
- curl -sL --max-time 20 "https://$d/newest/{URL}" -o /tmp/page.html \
+ curl -sL --max-time 20 "https://$d/newest/{URL}" -o ~/.hermes/cache/scratch/page.html \
-w "%{http_code}" && break
done
```
diff --git a/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-blackbox.md b/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-blackbox.md
index aa65306b9ea..9f37ce6b6c5 100644
--- a/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-blackbox.md
+++ b/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-blackbox.md
@@ -108,8 +108,8 @@ terminal(command="REVIEW=$(mktemp -d) && git clone https://github.com/user/repo.
Spawn multiple Blackbox instances for independent tasks:
```
-terminal(command="blackbox --prompt 'Fix the login bug'", workdir="/tmp/issue-1", background=true, pty=true)
-terminal(command="blackbox --prompt 'Add unit tests for auth'", workdir="/tmp/issue-2", background=true, pty=true)
+terminal(command="blackbox --prompt 'Fix the login bug'", workdir="~/.hermes/cache/scratch/issue-1", background=true, pty=true)
+terminal(command="blackbox --prompt 'Add unit tests for auth'", workdir="~/.hermes/cache/scratch/issue-2", background=true, pty=true)
# Monitor all
process(action="list")
diff --git a/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-dynamic-workflow.md b/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-dynamic-workflow.md
index 6c7073faf84..221feca5b94 100644
--- a/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-dynamic-workflow.md
+++ b/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-dynamic-workflow.md
@@ -50,9 +50,9 @@ for serial chains. For a refactor or fix campaign on hermes-agent itself, load
the wave (default 10; the runtime rejects a `tasks=[]` larger than that with a
clear error rather than queueing). `delegation.max_spawn_depth >= 2` only if
children must fan out themselves.
-- A writable run directory resolved from the terminal environment's temp dir
- (`$TMPDIR`, else the platform temp dir). Never a literal `/tmp`: Termux has no
- `/tmp`, native Windows breaks on it. Use `<tmp>/wf_<name>_<uuid>/`, unique per
+<!-- no-tmp: ok — explains why a literal /tmp is wrong -->
+- A writable run directory resolved from the terminal environment's temp dir (`$TMPDIR`, else the platform temp dir). Never a literal `/tmp`:
+ Termux has no such directory and native Windows breaks on it. Use `<tmp>/wf_<name>_<uuid>/`, unique per
run, so an interrupted earlier run cannot leave stale outputs to be misread.
- `execute_code` for the deterministic layer (only `web_search`, `web_extract`,
`read_file`, `write_file`, `search_files`, `terminal`, `patch` exist inside it).
diff --git a/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-grok.md b/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-grok.md
index 6072540efe5..e66b445e393 100644
--- a/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-grok.md
+++ b/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-grok.md
@@ -200,7 +200,7 @@ Obsidian or a repo) without mutating anything:
3. Save Grok's stdout straight into the destination note with `write_file()`.
```
-grok --no-auto-update -p "Read /tmp/current.md and /tmp/inventory.md. Produce markdown only, no preamble. Output a clean note titled 'Cleanup Review'." --output-format plain
+grok --no-auto-update -p "Read ~/.hermes/cache/scratch/current.md and ~/.hermes/cache/scratch/inventory.md. Produce markdown only, no preamble. Output a clean note titled 'Cleanup Review'." --output-format plain
```
**Pitfall (same as Claude Code):** for document rewrites, a loose "rewrite this"
@@ -233,22 +233,22 @@ terminal(command="gh pr comment 42 --body '<review text>'", workdir="/path/to/re
```
# Create worktrees
-terminal(command="git worktree add -b fix/issue-78 /tmp/issue-78 main", workdir="~/project")
-terminal(command="git worktree add -b fix/issue-99 /tmp/issue-99 main", workdir="~/project")
+terminal(command="git worktree add -b fix/issue-78 ~/.hermes/cache/scratch/issue-78 main", workdir="~/project")
+terminal(command="git worktree add -b fix/issue-99 ~/.hermes/cache/scratch/issue-99 main", workdir="~/project")
# Launch Grok headless in each (background)
-terminal(command="grok --no-auto-update --always-approve -p 'Fix issue #78: <description>. Commit when done.'", workdir="/tmp/issue-78", background=true, notify_on_complete=true)
-terminal(command="grok --no-auto-update --always-approve -p 'Fix issue #99: <description>. Commit when done.'", workdir="/tmp/issue-99", background=true, notify_on_complete=true)
+terminal(command="grok --no-auto-update --always-approve -p 'Fix issue #78: <description>. Commit when done.'", workdir="~/.hermes/cache/scratch/issue-78", background=true, notify_on_complete=true)
+terminal(command="grok --no-auto-update --always-approve -p 'Fix issue #99: <description>. Commit when done.'", workdir="~/.hermes/cache/scratch/issue-99", background=true, notify_on_complete=true)
# Monitor
process(action="list")
# After completion: push and open PRs
-terminal(command="cd /tmp/issue-78 && git push -u origin fix/issue-78")
+terminal(command="cd ~/.hermes/cache/scratch/issue-78 && git push -u origin fix/issue-78")
terminal(command="gh pr create --repo user/repo --head fix/issue-78 --title 'fix: ...' --body '...'")
# Cleanup
-terminal(command="git worktree remove /tmp/issue-78", workdir="~/project")
+terminal(command="git worktree remove ~/.hermes/cache/scratch/issue-78", workdir="~/project")
```
## Useful Subcommands & TUI Commands
diff --git a/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-openhands.md b/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-openhands.md
index faff6bdc3cd..eec039aec57 100644
--- a/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-openhands.md
+++ b/website/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-openhands.md
@@ -153,7 +153,7 @@ The cli prints all stderr from LiteLLM/Authlib first — see Pitfalls. Parse onl
```
terminal(
command="OPENHANDS_SUPPRESS_BANNER=1 LLM_MODEL=openrouter/openai/gpt-4o-mini LLM_API_KEY=$OPENROUTER_API_KEY LLM_BASE_URL=https://openrouter.ai/api/v1 openhands --headless --json --override-with-envs --exit-without-confirmation -t 'Print the string OPENHANDS_OK to stdout via the terminal tool.'",
- workdir="/tmp",
+ workdir="~/.hermes/cache/scratch",
timeout=120
)
```
diff --git a/website/docs/user-guide/skills/optional/creative/creative-ascii-art.md b/website/docs/user-guide/skills/optional/creative/creative-ascii-art.md
index e4b4d069b64..925eabf81d7 100644
--- a/website/docs/user-guide/skills/optional/creative/creative-ascii-art.md
+++ b/website/docs/user-guide/skills/optional/creative/creative-ascii-art.md
@@ -250,14 +250,14 @@ Large collection of classic ASCII art organized by subject. Art is inside HTML `
**Step 1 — Fetch the page:**
```bash
-curl -s 'https://ascii.co.uk/art/cat' -o /tmp/ascii_art.html
+curl -s 'https://ascii.co.uk/art/cat' -o ~/.hermes/cache/scratch/ascii_art.html
```
**Step 2 — Extract art from pre tags:**
```python
-import re, html
-with open('/tmp/ascii_art.html') as f:
+import os, re, html
+with open(os.path.expanduser('~/.hermes/cache/scratch/ascii_art.html')) as f:
text = f.read()
arts = re.findall(r'<pre[^>]*>(.*?)</pre>', text, re.DOTALL)
for art in arts:
diff --git a/website/docs/user-guide/skills/optional/creative/creative-meme-generation.md b/website/docs/user-guide/skills/optional/creative/creative-meme-generation.md
index 2aeb574a710..4098204a7a9 100644
--- a/website/docs/user-guide/skills/optional/creative/creative-meme-generation.md
+++ b/website/docs/user-guide/skills/optional/creative/creative-meme-generation.md
@@ -78,9 +78,9 @@ python "$SKILL_DIR/scripts/generate_meme.py" --search "disaster"
```
5. Run the generator:
```bash
- python "$SKILL_DIR/scripts/generate_meme.py" <template_id> /tmp/meme.png "caption 1" "caption 2" ...
+ python "$SKILL_DIR/scripts/generate_meme.py" <template_id> ~/.hermes/cache/scratch/meme.png "caption 1" "caption 2" ...
```
-6. Return the image with `MEDIA:/tmp/meme.png`
+6. Return the image with `MEDIA:~/.hermes/cache/scratch/meme.png`
### Mode 2: Custom AI Image (when image_generate is available)
@@ -92,35 +92,35 @@ Use this when no classic template fits, or when the user wants something origina
4. Run the script with `--image` to overlay text, choosing a mode:
- **Overlay** (text directly on image, white with black outline):
```bash
- python "$SKILL_DIR/scripts/generate_meme.py" --image /path/to/scene.png /tmp/meme.png "top text" "bottom text"
+ python "$SKILL_DIR/scripts/generate_meme.py" --image /path/to/scene.png ~/.hermes/cache/scratch/meme.png "top text" "bottom text"
```
- **Bars** (black bars above/below with white text — cleaner, always readable):
```bash
- python "$SKILL_DIR/scripts/generate_meme.py" --image /path/to/scene.png --bars /tmp/meme.png "top text" "bottom text"
+ python "$SKILL_DIR/scripts/generate_meme.py" --image /path/to/scene.png --bars ~/.hermes/cache/scratch/meme.png "top text" "bottom text"
```
Use `--bars` when the image is busy/detailed and text would be hard to read on top of it.
5. **Verify with vision** (if `vision_analyze` is available): Check the result looks good:
```
- vision_analyze(image_url="/tmp/meme.png", question="Is the text legible and well-positioned? Does the meme work visually?")
+ vision_analyze(image_url="~/.hermes/cache/scratch/meme.png", question="Is the text legible and well-positioned? Does the meme work visually?")
```
If the vision model flags issues (text hard to read, bad placement, etc.), try the other mode (switch between overlay and bars) or regenerate the scene.
-6. Return the image with `MEDIA:/tmp/meme.png`
+6. Return the image with `MEDIA:~/.hermes/cache/scratch/meme.png`
## Examples
**"debugging production at 2 AM":**
```bash
-python generate_meme.py this-is-fine /tmp/meme.png "SERVERS ARE ON FIRE" "This is fine"
+python generate_meme.py this-is-fine ~/.hermes/cache/scratch/meme.png "SERVERS ARE ON FIRE" "This is fine"
```
**"choosing between sleep and one more episode":**
```bash
-python generate_meme.py drake /tmp/meme.png "Getting 8 hours of sleep" "One more episode at 3 AM"
+python generate_meme.py drake ~/.hermes/cache/scratch/meme.png "Getting 8 hours of sleep" "One more episode at 3 AM"
```
**"the stages of a Monday morning":**
```bash
-python generate_meme.py expanding-brain /tmp/meme.png "Setting an alarm" "Setting 5 alarms" "Sleeping through all alarms" "Working from bed"
+python generate_meme.py expanding-brain ~/.hermes/cache/scratch/meme.png "Setting an alarm" "Setting 5 alarms" "Sleeping through all alarms" "Working from bed"
```
## Listing Templates
diff --git a/website/docs/user-guide/skills/optional/creative/creative-pixel-art.md b/website/docs/user-guide/skills/optional/creative/creative-pixel-art.md
index 065496394c6..e9e15cc831d 100644
--- a/website/docs/user-guide/skills/optional/creative/creative-pixel-art.md
+++ b/website/docs/user-guide/skills/optional/creative/creative-pixel-art.md
@@ -157,12 +157,13 @@ from pixel_art import pixel_art
from pixel_art_video import pixel_art_video
# 1. Convert to pixel art
-pixel_art("/path/to/photo.jpg", "/tmp/pixel.png", preset="nes")
+out = os.path.expanduser("~/.hermes/cache/scratch")
+pixel_art("/path/to/photo.jpg", f"{out}/pixel.png", preset="nes")
# 2. Animate (optional)
pixel_art_video(
- "/tmp/pixel.png",
- "/tmp/pixel.mp4",
+ f"{out}/pixel.png",
+ f"{out}/pixel.mp4",
scene="night",
duration=6,
fps=15,
diff --git a/website/docs/user-guide/skills/optional/creative/creative-pretext.md b/website/docs/user-guide/skills/optional/creative/creative-pretext.md
index 55ac2a6e89d..36d5f6afd9c 100644
--- a/website/docs/user-guide/skills/optional/creative/creative-pretext.md
+++ b/website/docs/user-guide/skills/optional/creative/creative-pretext.md
@@ -171,7 +171,7 @@ See `templates/donut-orbit.html` and `templates/hello-orb-flow.html` for working
2. **Start from a template**:
- `templates/hello-orb-flow.html` — text reflowing around a moving orb (reflow-around-obstacle pattern)
- `templates/donut-orbit.html` — advanced example: measured ASCII logo obstacles, draggable wire sphere/cube, morphing shape fields, selectable DOM text, and dev-only controls
- - `write_file` to a new `.html` in `/tmp/` or the user's workspace.
+ - `write_file` to a new `.html` in `~/.hermes/cache/scratch/` or the user's workspace.
3. **Swap the corpus** for something intentional to the brief. Real prose, 10-100 sentences, no lorem.
4. **Tune the aesthetic** — font, palette, composition, interaction. This is the work; don't skip it.
5. **Verify locally**:
diff --git a/website/docs/user-guide/skills/optional/data-science/data-science-jupyter-notebook.md b/website/docs/user-guide/skills/optional/data-science/data-science-jupyter-notebook.md
index 3d5f5780ff7..4cd90eef7ff 100644
--- a/website/docs/user-guide/skills/optional/data-science/data-science-jupyter-notebook.md
+++ b/website/docs/user-guide/skills/optional/data-science/data-science-jupyter-notebook.md
@@ -72,7 +72,7 @@ uv run "$SCRIPT" servers
If no servers found, start one:
```
jupyter-lab --no-browser --port=8888 --notebook-dir=$HOME/notebooks \
- --IdentityProvider.token='' --ServerApp.password='' > /tmp/jupyter.log 2>&1 &
+ --IdentityProvider.token='' --ServerApp.password='' > ~/.hermes/cache/scratch/jupyter.log 2>&1 &
sleep 3
```
diff --git a/website/docs/user-guide/skills/optional/devops/devops-pinggy-tunnel.md b/website/docs/user-guide/skills/optional/devops/devops-pinggy-tunnel.md
index de59598e06c..5fee0af6cf1 100644
--- a/website/docs/user-guide/skills/optional/devops/devops-pinggy-tunnel.md
+++ b/website/docs/user-guide/skills/optional/devops/devops-pinggy-tunnel.md
@@ -103,7 +103,7 @@ If nothing is listening yet, start it first (e.g. `python -m http.server 8000 --
Use `terminal(background=True)` and capture output to a logfile (Pinggy prints the URLs on stdout, then keeps the connection open):
```bash
-LOG=/tmp/pinggy-8000.log
+LOG=~/.hermes/cache/scratch/pinggy-8000.log
nohup ssh -p 443 \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
@@ -111,7 +111,7 @@ nohup ssh -p 443 \
-o ServerAliveCountMax=3 \
-R0:localhost:8000 [email protected] \
> "$LOG" 2>&1 &
-echo $! > /tmp/pinggy-8000.pid
+echo $! > ~/.hermes/cache/scratch/pinggy-8000.pid
```
`StrictHostKeyChecking=no` + `UserKnownHostsFile=/dev/null` skips the first-run host-key prompt. `ServerAliveInterval=30` keeps the SSH session from getting torn down by an idle NAT.
@@ -120,7 +120,7 @@ echo $! > /tmp/pinggy-8000.pid
```bash
sleep 4
-grep -oE 'https://[a-z0-9-]+\.[a-z]+\.pinggy\.link' /tmp/pinggy-8000.log | head -1
+grep -oE 'https://[a-z0-9-]+\.[a-z]+\.pinggy\.link' ~/.hermes/cache/scratch/pinggy-8000.log | head -1
```
Expected output looks like:
@@ -146,7 +146,7 @@ If you get `502 Bad Gateway`, the SSH session is up but the local origin isn't l
### 5. Teardown
```bash
-kill "$(cat /tmp/pinggy-8000.pid)"
+kill "$(cat ~/.hermes/cache/scratch/pinggy-8000.pid)"
# or, if the pid file got lost:
pkill -f 'ssh -p 443 .* free@a\.pinggy\.io'
```
@@ -202,10 +202,10 @@ Composite patterns combining a local origin with a Pinggy tunnel. Each recipe is
Use this when an external service (Stripe, GitHub, Discord, AgentMail, etc.) needs to POST to a publicly reachable URL during a local task.
```bash
-# 1. Tiny capturing server: every request gets appended to /tmp/webhook-hits.log
-cat >/tmp/webhook-server.py <<'PY'
+# 1. Tiny capturing server: every request gets appended to ~/.hermes/cache/scratch/webhook-hits.log
+cat >~/.hermes/cache/scratch/webhook-server.py <<'PY'
import http.server, json, datetime, pathlib
-LOG = pathlib.Path("/tmp/webhook-hits.log")
+LOG = pathlib.Path("~/.hermes/cache/scratch/webhook-hits.log").expanduser()
class H(http.server.BaseHTTPRequestHandler):
def _capture(self):
n = int(self.headers.get("content-length") or 0)
@@ -220,24 +220,24 @@ class H(http.server.BaseHTTPRequestHandler):
def log_message(self,*a,**k): pass
http.server.HTTPServer(("127.0.0.1", 18080), H).serve_forever()
PY
-nohup python /tmp/webhook-server.py >/tmp/webhook-server.log 2>&1 &
-echo $! >/tmp/webhook-server.pid
+nohup python ~/.hermes/cache/scratch/webhook-server.py >~/.hermes/cache/scratch/webhook-server.log 2>&1 &
+echo $! >~/.hermes/cache/scratch/webhook-server.pid
# 2. Tunnel — bearer-token-gate so randos can't pollute the capture log
nohup ssh -p 443 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
-o ServerAliveInterval=30 \
-R0:localhost:18080 "k:$(openssl rand -hex 12)[email protected]" \
- >/tmp/webhook-pinggy.log 2>&1 &
-echo $! >/tmp/webhook-pinggy.pid
+ >~/.hermes/cache/scratch/webhook-pinggy.log 2>&1 &
+echo $! >~/.hermes/cache/scratch/webhook-pinggy.pid
sleep 5
-URL=$(grep -oE 'https://[a-z0-9-]+\.[a-z]+\.pinggy\.link' /tmp/webhook-pinggy.log | head -1)
+URL=$(grep -oE 'https://[a-z0-9-]+\.[a-z]+\.pinggy\.link' ~/.hermes/cache/scratch/webhook-pinggy.log | head -1)
echo "Webhook URL: $URL"
# 3. While the agent works, watch hits land
-tail -f /tmp/webhook-hits.log
+tail -f ~/.hermes/cache/scratch/webhook-hits.log
```
-Hand `$URL` to the service that needs to call you. Teardown: `kill $(cat /tmp/webhook-server.pid) $(cat /tmp/webhook-pinggy.pid)`.
+Hand `$URL` to the service that needs to call you. Teardown: `kill $(cat ~/.hermes/cache/scratch/webhook-server.pid) $(cat ~/.hermes/cache/scratch/webhook-pinggy.pid)`.
### Recipe 2 — Expose an MCP server over HTTP/SSE
@@ -246,18 +246,18 @@ Use when a remote MCP client (Claude Desktop on another machine, a teammate's ed
```bash
# 1. Start the MCP server in HTTP mode (example: a FastMCP server on port 8765)
nohup python my_mcp_server.py --transport http --port 8765 \
- >/tmp/mcp-server.log 2>&1 &
-echo $! >/tmp/mcp-server.pid
+ >~/.hermes/cache/scratch/mcp-server.log 2>&1 &
+echo $! >~/.hermes/cache/scratch/mcp-server.pid
# 2. Tunnel with a bearer token — MCP traffic should not be open to the internet
TOKEN=$(openssl rand -hex 16)
nohup ssh -p 443 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
-o ServerAliveInterval=30 \
-R0:localhost:8765 "k:[email protected]" \
- >/tmp/mcp-pinggy.log 2>&1 &
-echo $! >/tmp/mcp-pinggy.pid
+ >~/.hermes/cache/scratch/mcp-pinggy.log 2>&1 &
+echo $! >~/.hermes/cache/scratch/mcp-pinggy.pid
sleep 5
-URL=$(grep -oE 'https://[a-z0-9-]+\.[a-z]+\.pinggy\.link' /tmp/mcp-pinggy.log | head -1)
+URL=$(grep -oE 'https://[a-z0-9-]+\.[a-z]+\.pinggy\.link' ~/.hermes/cache/scratch/mcp-pinggy.log | head -1)
echo "MCP URL: $URL"
echo "Bearer token: $TOKEN"
```
@@ -274,10 +274,10 @@ TOKEN=$(openssl rand -hex 16)
nohup ssh -p 443 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
-o ServerAliveInterval=30 \
-R0:localhost:11434 "k:[email protected]" \
- >/tmp/llm-pinggy.log 2>&1 &
-echo $! >/tmp/llm-pinggy.pid
+ >~/.hermes/cache/scratch/llm-pinggy.log 2>&1 &
+echo $! >~/.hermes/cache/scratch/llm-pinggy.pid
sleep 5
-URL=$(grep -oE 'https://[a-z0-9-]+\.[a-z]+\.pinggy\.link' /tmp/llm-pinggy.log | head -1)
+URL=$(grep -oE 'https://[a-z0-9-]+\.[a-z]+\.pinggy\.link' ~/.hermes/cache/scratch/llm-pinggy.log | head -1)
echo "Endpoint: $URL"
echo "Token: $TOKEN"
@@ -306,17 +306,17 @@ ssh -p 443 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
```bash
# End-to-end: spin up a trivial origin, tunnel it, hit it, tear down
-python -m http.server 18000 --bind 127.0.0.1 >/tmp/origin.log 2>&1 &
+python -m http.server 18000 --bind 127.0.0.1 >~/.hermes/cache/scratch/origin.log 2>&1 &
ORIGIN_PID=$!
nohup ssh -p 443 \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
- -R0:localhost:18000 [email protected] >/tmp/pinggy-verify.log 2>&1 &
+ -R0:localhost:18000 [email protected] >~/.hermes/cache/scratch/pinggy-verify.log 2>&1 &
SSH_PID=$!
sleep 5
-URL=$(grep -oE 'https://[a-z0-9-]+\.[a-z]+\.pinggy\.link' /tmp/pinggy-verify.log | head -1)
+URL=$(grep -oE 'https://[a-z0-9-]+\.[a-z]+\.pinggy\.link' ~/.hermes/cache/scratch/pinggy-verify.log | head -1)
echo "URL: $URL"
curl -sI "$URL/" | head -1
diff --git a/website/docs/user-guide/skills/optional/gaming/gaming-pokemon-player.md b/website/docs/user-guide/skills/optional/gaming/gaming-pokemon-player.md
index c7cde4080a2..451061c193f 100644
--- a/website/docs/user-guide/skills/optional/gaming/gaming-pokemon-player.md
+++ b/website/docs/user-guide/skills/optional/gaming/gaming-pokemon-player.md
@@ -94,7 +94,7 @@ This is faster than loading via the API after startup.
### Step 1: OBSERVE — check state AND take a screenshot
GET /state for position, HP, battle, dialog.
-GET /screenshot and save to /tmp/pokemon.png, then use vision_analyze.
+GET /screenshot and save to ~/.hermes/cache/scratch/pokemon.png, then use vision_analyze.
Always do BOTH — RAM state gives numbers, vision gives spatial awareness.
### Step 2: ORIENT
diff --git a/website/docs/user-guide/skills/optional/mcp/mcp-mcp-oauth-remote-gateway.md b/website/docs/user-guide/skills/optional/mcp/mcp-mcp-oauth-remote-gateway.md
index 710c13365f6..79f7375062b 100644
--- a/website/docs/user-guide/skills/optional/mcp/mcp-mcp-oauth-remote-gateway.md
+++ b/website/docs/user-guide/skills/optional/mcp/mcp-mcp-oauth-remote-gateway.md
@@ -229,7 +229,7 @@ non-empty array AND/OR the resource metadata declares specific scopes. If
default set on its own. Fabricating scope strings against an empty
`scopes_supported` can cause `invalid_scope` errors on some ASes.
-**Stash `code_verifier` and `state` to disk** (e.g. `/tmp/.mcp-oauth-work/<server>.json`,
+**Stash `code_verifier` and `state` to disk** (e.g. `~/.hermes/cache/scratch/.mcp-oauth-work/<server>.json`,
0600 perms). You need them for step 7, possibly across multiple chat turns.
### 6. Give the user the authorize URL
@@ -362,7 +362,7 @@ tools. Refresh happens automatically before `expires_in` elapses.
12. **Never hand-type the redirect URL for the user to open.** Generate the authorize URL programmatically with `urllib.parse.urlencode()`. Spaces in scopes and special chars in `state` break string-concatenated URLs.
-13. **Security: the stash file contains the `code_verifier`.** Delete `/tmp/.mcp-oauth-work/<server>.json` immediately after successful token exchange. There's no reason to keep a proof-of-identity secret around once it's consumed.
+13. **Security: the stash file contains the `code_verifier`.** Delete `~/.hermes/cache/scratch/.mcp-oauth-work/<server>.json` immediately after successful token exchange. There's no reason to keep a proof-of-identity secret around once it's consumed.
14. **Write what the token endpoint actually returned.** The AS may grant a narrower (or wider) scope than requested. Write the `scope` from the token-exchange response to `<server>.json`, not what you asked for in step 5. When `scopes_supported: []`, the explicit scope list you send IS authoritative both ways: some servers grant exactly what you list (pass narrow scopes for least-privilege, or enumerate the full set if the user needs everything), and some won't echo the granted scope back at registration time — only the token-exchange response is authoritative.
diff --git a/website/docs/user-guide/skills/optional/payments/payments-stripe-link-cli.md b/website/docs/user-guide/skills/optional/payments/payments-stripe-link-cli.md
index 7e0c5b25819..30f69ae8dac 100644
--- a/website/docs/user-guide/skills/optional/payments/payments-stripe-link-cli.md
+++ b/website/docs/user-guide/skills/optional/payments/payments-stripe-link-cli.md
@@ -148,7 +148,7 @@ For MPP merchants add `--credential-type shared_payment_token`.
```
link-cli spend-request retrieve <lsrq_id> \
--include card \
- --output-file /tmp/link-card.json \
+ --output-file ~/.hermes/cache/scratch/link-card.json \
--format json
```
@@ -171,7 +171,7 @@ The file is written with `0600` perms; stdout shows only redacted fields (brand,
Delete the card file as soon as the purchase is done:
```
-rm -f /tmp/link-card.json
+rm -f ~/.hermes/cache/scratch/link-card.json
```
## Optional: run as an MCP server instead
diff --git a/website/docs/user-guide/skills/optional/research/research-bioinformatics.md b/website/docs/user-guide/skills/optional/research/research-bioinformatics.md
index dae339a0490..34427b55f1a 100644
--- a/website/docs/user-guide/skills/optional/research/research-bioinformatics.md
+++ b/website/docs/user-guide/skills/optional/research/research-bioinformatics.md
@@ -50,18 +50,18 @@ This skill is a gateway to two open-source bioinformatics skill libraries. Inste
2. Clone the relevant repo (shallow clone to save time):
```bash
# bioSkills (reference material)
- git clone --depth 1 https://github.com/GPTomics/bioSkills.git /tmp/bioSkills
+ git clone --depth 1 https://github.com/GPTomics/bioSkills.git ~/.hermes/cache/scratch/bioSkills
# ClawBio (runnable pipelines)
- git clone --depth 1 https://github.com/ClawBio/ClawBio.git /tmp/ClawBio
+ git clone --depth 1 https://github.com/ClawBio/ClawBio.git ~/.hermes/cache/scratch/ClawBio
```
3. Read the specific skill:
```bash
# bioSkills — each skill is at: <category>/<skill-name>/SKILL.md
- cat /tmp/bioSkills/variant-calling/gatk-variant-calling/SKILL.md
+ cat ~/.hermes/cache/scratch/bioSkills/variant-calling/gatk-variant-calling/SKILL.md
# ClawBio — each skill is at: skills/<skill-name>/
- cat /tmp/ClawBio/skills/pharmgx-reporter/README.md
+ cat ~/.hermes/cache/scratch/ClawBio/skills/pharmgx-reporter/README.md
```
4. Follow the fetched skill as reference material. These are NOT Hermes-format skills — treat them as expert domain guides. They contain correct parameters, proper tool flags, and validated pipelines.
diff --git a/website/docs/user-guide/skills/optional/research/research-darwinian-evolver.md b/website/docs/user-guide/skills/optional/research/research-darwinian-evolver.md
index 78107b81032..defc9c34bd1 100644
--- a/website/docs/user-guide/skills/optional/research/research-darwinian-evolver.md
+++ b/website/docs/user-guide/skills/optional/research/research-darwinian-evolver.md
@@ -95,12 +95,12 @@ uv run darwinian_evolver parrot \
--num_iterations 2 \
--num_parents_per_iteration 2 \
--mutator_concurrency 2 --evaluator_concurrency 2 \
- --output_dir /tmp/parrot_demo
+ --output_dir ~/.hermes/cache/scratch/parrot_demo
```
Outputs:
-- `/tmp/parrot_demo/snapshots/iteration_N.pkl` — pickled population per iteration
-- `/tmp/parrot_demo/<jsonl>` — per-iteration JSON log (path printed at end)
+- `~/.hermes/cache/scratch/parrot_demo/snapshots/iteration_N.pkl` — pickled population per iteration
+- `~/.hermes/cache/scratch/parrot_demo/<jsonl>` — per-iteration JSON log (path printed at end)
Open `~/.hermes/cache/darwinian-evolver/darwinian_evolver/darwinian_evolver/lineage_visualizer.html`
in a browser and load the JSON log to see the evolutionary tree.
@@ -119,14 +119,14 @@ cd "$DE_DIR" && \
EVOLVER_MODEL='openai/gpt-4o-mini' \
uv run --with openai python "$SKILL_DIR/scripts/parrot_openrouter.py" \
--num_iterations 3 --num_parents_per_iteration 2 \
- --output_dir /tmp/parrot_or
+ --output_dir ~/.hermes/cache/scratch/parrot_or
```
Inspect the result with `scripts/show_snapshot.py`:
```bash
uv run --with openai python "$SKILL_DIR/scripts/show_snapshot.py" \
- /tmp/parrot_or/snapshots/iteration_3.pkl
+ ~/.hermes/cache/scratch/parrot_or/snapshots/iteration_3.pkl
```
Expected output: 7 evolved prompt templates ranked by score, with the best
diff --git a/website/docs/user-guide/skills/optional/research/research-parallel-cli.md b/website/docs/user-guide/skills/optional/research/research-parallel-cli.md
index c09419c5229..682498e36ed 100644
--- a/website/docs/user-guide/skills/optional/research/research-parallel-cli.md
+++ b/website/docs/user-guide/skills/optional/research/research-parallel-cli.md
@@ -187,7 +187,7 @@ Useful constraints:
If you expect follow-up questions, save output:
```bash
-parallel-cli search "latest React 19 changes" --json -o /tmp/react-19-search.json
+parallel-cli search "latest React 19 changes" --json -o ~/.hermes/cache/scratch/react-19-search.json
```
When summarizing results:
@@ -406,6 +406,6 @@ parallel-cli config auto-update-check off
- Do not cite sources not present in the CLI output.
- `login` may require PTY/browser interaction.
- Prefer foreground execution for short tasks; do not overuse background processes.
-- For large result sets, save JSON to `/tmp/*.json` instead of stuffing everything into context.
+- For large result sets, save JSON to `~/.hermes/cache/scratch/*.json` (the Hermes scratch dir) instead of stuffing everything into context.
- Do not silently choose Parallel when Hermes native tools are already sufficient.
- Remember this is a vendor workflow that usually requires account auth and paid usage beyond the free tier.
diff --git a/website/docs/user-guide/skills/optional/research/research-qmd.md b/website/docs/user-guide/skills/optional/research/research-qmd.md
index ddc21fc0760..225bd919b5c 100644
--- a/website/docs/user-guide/skills/optional/research/research-qmd.md
+++ b/website/docs/user-guide/skills/optional/research/research-qmd.md
@@ -309,9 +309,9 @@ cat > ~/Library/LaunchAgents/com.qmd.daemon.plist << 'EOF'
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
- <string>/tmp/qmd-daemon.log</string>
+ <string>/Users/YOU/.hermes/cache/scratch/qmd-daemon.log</string>
<key>StandardErrorPath</key>
- <string>/tmp/qmd-daemon.log</string>
+ <string>/Users/YOU/.hermes/cache/scratch/qmd-daemon.log</string>
</dict>
</plist>
EOF
diff --git a/website/docs/user-guide/skills/optional/smart-home/smart-home-openhue.md b/website/docs/user-guide/skills/optional/smart-home/smart-home-openhue.md
index ba4826f2ae2..16d08519ee9 100644
--- a/website/docs/user-guide/skills/optional/smart-home/smart-home-openhue.md
+++ b/website/docs/user-guide/skills/optional/smart-home/smart-home-openhue.md
@@ -37,8 +37,8 @@ Control Philips Hue lights and scenes via a Hue Bridge from the terminal.
```bash
# Linux (pre-built binary — releases ship tarballs, not bare binaries)
curl -sL "https://github.com/openhue/openhue-cli/releases/latest/download/openhue_Linux_x86_64.tar.gz" \
- | tar -xz -C /tmp openhue \
- && install -m 0755 /tmp/openhue ~/.local/bin/openhue
+ | tar -xz -C ~/.hermes/cache/scratch openhue \
+ && install -m 0755 ~/.hermes/cache/scratch/openhue ~/.local/bin/openhue
# (use openhue_Linux_arm64.tar.gz on ARM64)
# macOS
diff --git a/website/docs/user-guide/skills/optional/software-development/software-development-pr-lens.md b/website/docs/user-guide/skills/optional/software-development/software-development-pr-lens.md
index a1dffef3bc1..9568497d55d 100644
--- a/website/docs/user-guide/skills/optional/software-development/software-development-pr-lens.md
+++ b/website/docs/user-guide/skills/optional/software-development/software-development-pr-lens.md
@@ -146,7 +146,7 @@ Validator failure codes:
Smoke test (live-verified 2026-09-12 with `@coldtea/pr-lens-cli` via npx, node on Linux):
```bash
-cp references/example.graph.json /tmp/prlens-smoke/ && cd /tmp/prlens-smoke
+cp references/example.graph.json ~/.hermes/cache/scratch/prlens-smoke/ && cd ~/.hermes/cache/scratch/prlens-smoke
npx -y @coldtea/pr-lens-cli@latest validate example.graph.json
# ✓ example.graph.json — graph document · 3 lanes, 10 nodes, 13 edges, 1 flow · 6 walkthrough steps
npx -y @coldtea/pr-lens-cli@latest render example.graph.json --theme light
diff --git a/website/docs/user-guide/skills/optional/web-development/web-development-har-derived-api-client.md b/website/docs/user-guide/skills/optional/web-development/web-development-har-derived-api-client.md
index 01024b762ec..f784ae802b1 100644
--- a/website/docs/user-guide/skills/optional/web-development/web-development-har-derived-api-client.md
+++ b/website/docs/user-guide/skills/optional/web-development/web-development-har-derived-api-client.md
@@ -170,9 +170,9 @@ for p in r.json()["pages"]:
End-to-end proof against a live site with no API key:
```bash
-python3 scripts/har_capture.py "https://en.wikipedia.org/wiki/Main_Page" /tmp/wiki.har \
+python3 scripts/har_capture.py "https://en.wikipedia.org/wiki/Main_Page" ~/.hermes/cache/scratch/wiki.har \
--action "fill:input[name=search]:dune messiah" --action "sleep:3" --wait 2
-python3 scripts/har_to_client.py /tmp/wiki.har --host wikipedia.org --max-body 200
+python3 scripts/har_to_client.py ~/.hermes/cache/scratch/wiki.har --host wikipedia.org --max-body 200
```
Expect the derivation to print `GET https://en.wikipedia.org/w/rest.php/v1/search/title`
diff --git a/website/docs/user-guide/skills/optional/yuanbao/yuanbao-yuanbao.md b/website/docs/user-guide/skills/optional/yuanbao/yuanbao-yuanbao.md
index 2457757f8cd..d9f18746c28 100644
--- a/website/docs/user-guide/skills/optional/yuanbao/yuanbao-yuanbao.md
+++ b/website/docs/user-guide/skills/optional/yuanbao/yuanbao-yuanbao.md
@@ -95,7 +95,7 @@ yb_send_dm({
"group_code": "535168412",
"name": "用户aea3",
"message": "Here is the image",
- "media_files": [{"path": "/tmp/photo.jpg"}]
+ "media_files": [{"path": "/path/to/photo.jpg"}]
})
```
diff --git a/website/docs/user-guide/windows-wsl-quickstart.md b/website/docs/user-guide/windows-wsl-quickstart.md
index 9cf804af52c..76f7f1cca15 100644
--- a/website/docs/user-guide/windows-wsl-quickstart.md
+++ b/website/docs/user-guide/windows-wsl-quickstart.md
@@ -30,6 +30,7 @@ A Chinese-language walkthrough of the minimum install path is maintained on this
The native Windows install runs in Windows directly: your Windows terminal (PowerShell, Windows Terminal, etc.), Windows filesystem paths (`C:\Users\…`), and Windows processes. Hermes uses Git Bash to run shell commands, which is how Claude Code and other agents handle Windows today — it sidesteps the POSIX-vs-Windows gap without a full rewrite.
+<!-- no-tmp: ok — lists /tmp as a POSIX feature WSL provides -->
WSL2 runs a real Linux kernel in a lightweight VM, so Hermes inside it is essentially identical to running on Ubuntu. That's valuable when you want a real POSIX environment: `fork`, `/tmp`, UNIX sockets, signal semantics, PTY-backed terminals, shells like `bash`/`zsh`, and tools like `rg`, `git`, `ffmpeg` that behave the way they do on Linux.
Practical consequences of WSL2: