env-safe-execution

env-safe-execution is a skill for Claude Code, Codex from MilkyWay008/Hermes-OTG. It costs 55 tokens per session (1,614 once invoked), scanned A, original, MIT.

A checklist for checking environment variables before running installers, updaters, package tools, or other programs that use them to find files and settings.

In plain words
What is it for?
It is for safely running updates, installers, SDK command-line tools, cloning scripts, and other environment-sensitive executables.
Why use it?
It helps prevent a command from silently targeting the wrong installation, especially when a normal computer and a portable copy share the same machine.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for hermes-agent. Also seen: built for hermes-agent.

Good fit It is for safely running updates, installers, SDK command-line tools, cloning scripts, and other environment-sensitive executables.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/milkyway008/hermes-otg/env-safe-execution
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add MilkyWay008/Hermes-OTG --skill env-safe-execution
Clone the repo
git clone --depth 1 https://github.com/MilkyWay008/Hermes-OTG

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for env-safe-execution

README.md
[![agentmods](https://agentmods.dev/badge/skills/milkyway008/hermes-otg/env-safe-execution/github.svg)](https://agentmods.dev/skills/milkyway008/hermes-otg/env-safe-execution)
Your own site
<a href="https://agentmods.dev/skills/milkyway008/hermes-otg/env-safe-execution"><img src="https://agentmods.dev/badge/skills/milkyway008/hermes-otg/env-safe-execution/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for env-safe-execution

Your own site · 80×15
<a href="https://agentmods.dev/skills/milkyway008/hermes-otg/env-safe-execution"><img src="https://agentmods.dev/badge/skills/milkyway008/hermes-otg/env-safe-execution.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,614 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00055 $0.01614
Opus 5.5 $0.00022 $0.00646
Sonnet 5.5 $0.00011 $0.00323
Haiku 4.5 $0.00006 $0.00161

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

Security

Grade A, and why

env-safe-execution scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

data/skills/it/env-safe-execution/SKILL.md · 127 lines

How it starts

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

Env-Safe Execution — Check the Env Before You Execute

TRIGGER: about to run ANY executable that reads environment variables to resolve paths or config — Hermes updaters/installers (hermes-setup.exe --update, install.ps1, hermes update), package installers, SDK CLIs, clone/reclone scripts — ESPECIALLY when a host install and a portable/OTG instance coexist on the same machine, or when working from inside the OTG on host-machine tasks.

The Core Lesson

An agent running an executable from inside a portable/isolated environment is NOT the same as the user running it. The user's shell is a clean host env; the agent's shell is a contaminated portable env. Every env var the wrapper exported (HERMES_HOME, *_API_KEY, install paths, ...) is inherited by EVERY subprocess the agent spawns — and any env-sensitive app (updaters, installers, CLIs, SDKs) can be silently redirected to the wrong target.

User's shell Agent's shell (from inside OTG/portable)
Env clean host env portable env: HERMES_HOME=E:\..., *_API_KEY, install paths
hermes-setup.exe --update targets the host install CAN target the OTG install

The 5 Rules

Rule 1 — CHECK THE ENV BEFORE EXECUTING

Before running ANY command that touches another install/app, inspect what the subprocess would inherit:

cmd /c set HERMES_HOME
env | grep -i hermes
# or the target app's key vars: env | grep -iE 'API_KEY|INSTALL|HOME'

Know the leak before triggering it. If the command's target app reads env vars for paths/config, you MUST know what those vars are and what the subprocess will see.

Rule 2 — CLEAN-ENV OR EXPLICIT-TARGET

Scrub the portable env vars, or set them EXPLICITLY to the intended target, before running:

# scrub the portable vars (git-bash):
env -u HERMES_HOME -u HERMES_OTG -u TERMINAL_CWD <command>
# explicit target (cmd):
set "HERMES_HOME=%LOCALAPPDATA%\hermes" && <command>

NEVER rely on inherited values when the target is a different install.

Read the full file on GitHub · 127 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 127 lines · 55 tokens per session scan A 582a5ab40e3d

Subscribe to this mod's changes

env-safe-execution is a skill published in the GitHub repository MilkyWay008/Hermes-OTG (25 stars, last pushed 3mo ago), licensed MIT. It adds 55 tokens to every session and 1,614 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

env-safe-execution compared with skills from other repositories

env-safe-execution next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
env-safe-executionMilkyWay008/Hermes-OTGSkill253mo agoMITA55Claude Code, Codex
hr-onboardingnexu-io/open-designSkill110ktodayApache-2.0A62Claude Code, Codex
webgl-halftone-driftnexu-io/open-designSkill110ktodayApache-2.0A44Claude Code, Codex
html-ppt-taste-brutalistnexu-io/open-designSkill110ktodayApache-2.0A78Claude Code, Codex
frame-light-leak-cinemanexu-io/open-designSkill110ktodayApache-2.0A31Claude Code, Codex
card-xiaohongshunexu-io/open-designSkill110ktodayApache-2.0A25Claude Code, Codex
performing-cloud-log-forensics-with-athenaxalgorix/xalgorixSkill1.5kyesterdayApache-2.0A80Claude Code, Codex