host-run

host-run is a skill for Claude Code, Codex from chipi/agentic-ai-homelab. It costs 104 tokens per session (744 once invoked), scanned A, original, MIT.

A way to run a multi-line script on a remote computer by copying it there and executing it, rather than placing the commands directly inside an SSH command.

In plain words
What is it for?
It helps run Bash or Python scripts on named homelab, GPU, or production hosts, stream their output, pass arguments safely, and remove the temporary copy afterward.
Why use it?
Inline remote commands can be damaged by shell quoting, JSON, environment differences, or the wrong shell. Using a script preserves the command and returns the remote result.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

Good fit It helps run Bash or Python scripts on named homelab, GPU, or production hosts, stream their output, pass arguments safely, and remove the temporary copy afterward.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chipi/agentic-ai-homelab/host-run
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 chipi/agentic-ai-homelab --skill host-run
Clone the repo
git clone --depth 1 https://github.com/chipi/agentic-ai-homelab

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 host-run

README.md
[![agentmods](https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/host-run/github.svg)](https://agentmods.dev/skills/chipi/agentic-ai-homelab/host-run)
Your own site
<a href="https://agentmods.dev/skills/chipi/agentic-ai-homelab/host-run"><img src="https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/host-run/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 host-run

Your own site · 80×15
<a href="https://agentmods.dev/skills/chipi/agentic-ai-homelab/host-run"><img src="https://agentmods.dev/badge/skills/chipi/agentic-ai-homelab/host-run.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 744 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.00104 $0.00744
Opus 5.5 $0.00042 $0.00298
Sonnet 5.5 $0.00021 $0.00149
Haiku 4.5 $0.00010 $0.00074

Measured 17d ago against content hash cfccd17e682e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

host-run 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 17d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/run.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

workstation/claude/skills/host-run/SKILL.md · 61 lines

How it starts

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

host-run

Inline commands over ssh break in ways that look like real failures:

  • zsh on the laptop expands =word (echo ===== → zsh: ==== not found);
  • nested quotes corrupt JSON bodies silently (Invalid JSON);
  • inline Python f-strings can't contain backslashes;
  • non-interactive shells on the mini lack /usr/local/bin, so docker isn't found.

All of these hit this repo's sessions repeatedly (2026-10-16/17). A script file has none of them.

Run

# write the commands to a file in your scratchpad, then:
~/.claude/skills/host-run/scripts/run.sh <host> <file.sh|file.py> [args...]
Host Reaches
homelab (or mini) the Mac mini, operator account (ssh -i ~/.ssh/homelab_mini -o IdentitiesOnly=yes markodragoljevic@homelab)
homelab-claude the mini's claude account (ssh homelab-claude)
dgx dgx-llm-1
prod deploy@prod-podcast
  • .py files run with python3, anything else with bash.
  • /usr/local/bin and /opt/homebrew/bin are put on PATH, so docker works on the mini.
  • Arguments are passed literally (each one %q-quoted).
  • The exit status is the remote script's: 2 means bad usage, 3 means the host is unreachable.
  • The remote copy lives in /tmp/host-run.XXXXXX (mode 700) and is removed on exit.

Rules

  • Secrets never go in the file or the arguments. The script loads them on the host (set -a; . ~/…/.env; set +a), the way the handbook's recipes do.
  • Read-only by default. A script that writes (deletes, restarts, mints) needs the same approval as running those commands by hand.
  • Keep the file in your scratchpad, not in a repo.

Verified

2026-10-17 on homelab and dgx:

  • arguments "arg one" '$HOME' '=x' arrived literally;
  • JSON with spaces round-tripped;
  • echo ===== printed;
  • an f-string with a backslash ran;
  • docker resolved;
  • exit 7 came back as 7, and an unknown host exited 2;
  • no /tmp/host-run.* files were left on either host.

Not covered

Read the full file on GitHub · 61 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 17d ago First seen · 61 lines · 104 tokens per session scan A cfccd17e682e

Subscribe to this mod's changes

host-run is a skill published in the GitHub repository chipi/agentic-ai-homelab (3 stars, last pushed today), licensed MIT. It adds 104 tokens to every session and 744 once invoked, about $0.0004 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-10-18.