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 $0.00028 $0.00807
Sonnet 5 $0.00011 $0.00323
Haiku 4.5 $0.00006 $0.00161

Measured 9d ago against content hash 582a5ab40e3d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 9d 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. 9d 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 (15 stars, last pushed 28d ago), licensed MIT. It adds 55 tokens to every session and 1,614 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident…

mukul975/Anthropic-Cybersecurity-Skills · 92 tokens

analyzing-linux-kernel-rootkits

Detect kernel-level rootkits in Linux memory dumps using Volatility3 linux plugins (checksyscall, lsmod, hiddenmodules), rkhunter system scanning, and /proc vs /sys discrepancy analysis to identify hooked syscalls, hidden kernel modules, and tampered system structures.

mukul975/Anthropic-Cybersecurity-Skills · 65 tokens

implementing-cloud-trail-log-analysis

Implementing AWS CloudTrail log analysis for security monitoring, threat detection, and forensic investigation using Athena, CloudWatch Logs Insights, and SIEM integration to identify unauthorized access, privilege escalation, and suspicious API activity.

xalgorix/xalgorix · 50 tokens

performing-cloud-log-forensics-with-athena

Uses AWS Athena to query CloudTrail, VPC Flow Logs, S3 access logs, and ALB logs for forensic investigation. Covers CREATE TABLE DDL with partition projection, forensic SQL queries for detecting unauthorized access, data exfiltration, lateral movement, and privilege escalation. Use when investigating AWS security…

xalgorix/xalgorix · 80 tokens

subdomain-enumeration

Map subdomains via crt.sh and subfinder at recon kickoff.

uphiago/recon-skills · 19 tokens

hunt-django

Hunt Django-specific vulnerabilities: DRF permission gaps, ORM injection, and admin exploitation.

uphiago/recon-skills · 22 tokens