testing-preview

An end-to-end test guide for a preview proxy that exposes a web server running inside a small virtual machine through a public URL. It covers both path-based and subdomain-based preview addresses, networking, and authentication.

In plain words
What is it for?
Use it to set up a networked test virtual machine, run an HTTP server inside it, test preview routes, and check authentication behavior.
Why use it?
It provides a repeatable way to verify preview URLs, access control, and guest networking instead of testing only isolated pieces.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/boringcomputers/nehemiah/testing-preview
Any agent
npx skills add boringcomputers/nehemiah --skill testing-preview
Clone the repo
git clone --depth 1 https://github.com/boringcomputers/nehemiah

Made for: Claude Code, Codex.

Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 913 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
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 $0.00032 $0.00913
Opus 5 $0.00016 $0.00456
Sonnet 5 $0.00006 $0.00183
Haiku 4.5 $0.00003 $0.00091

Measured 2d ago against content hash 5c6dcac1a722, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

testing-preview scanned grade B with 2 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 2d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo NEHEMIAH_NET=1 NEHEMIAH_JAILER=0 NEHEMIAH_TOKEN=test-token /tmp/nehemiahd &

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s http://localhost:8080/v1/machines -X POST \
.agents/skills/testing-preview/SKILL.md · 72 lines

How it starts

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

Testing the Preview Feature

What It Does

The preview proxy exposes a port running inside a guest Firecracker VM at a public URL. Two implementations exist:

  1. Path-based (/v1/machines/{id}/web/{port}/{path...}) — works over SSH tunnel and without wildcard DNS
  2. Subdomain-based (<id>--<port>.<PreviewBase>) — requires Caddy on-demand TLS + wildcard DNS

Prerequisites

  • nehemiahd must be running with NEHEMIAH_NET=1 (enables guest networking via tap/bridge/DHCP)
  • A test VM must be created with net: true (ensures DHCP lease is assigned)
  • An HTTP server must be running inside the guest on a known port

How to Set Up a Test VM

# Build and run nehemiahd (with auth to test the auth bypass)
cd nehemiahd && go build -o /tmp/nehemiahd .
sudo NEHEMIAH_NET=1 NEHEMIAH_JAILER=0 NEHEMIAH_TOKEN=test-token /tmp/nehemiahd &

# Create a VM with networking
curl -s http://localhost:8080/v1/machines -X POST \
  -H "Authorization: Bearer test-token" \
  -d '{"template":"python","ttl_seconds":900,"net":true}'

# Start an HTTP server inside the guest (via WebSocket TTY)
python3 -c "
import websocket, time
ws = websocket.create_connection('ws://localhost:8080/v1/machines/MACHINE_ID/tty',
    header=['Authorization: Bearer test-token'])
time.sleep(0.5)
ws.send(b'cd / && python3 -m http.server 8000 --bind 0.0.0.0 &\n')
time.sleep(2)
ws.close()
"

Key Test Cases

The server above is started from / (cd /), so http.server serves the guest's root filesystem — that makes the sub-path test below resolve.

  1. Preview without auth: curl http://localhost:8080/v1/machines/{id}/web/8000/ should return content (the / directory listing; no auth header needed)
  2. Other routes still require auth: curl http://localhost:8080/v1/machines/{id} should return 401
  3. Sub-path routing: curl http://localhost:8080/v1/machines/{id}/web/8000/etc/ should show the guest's /etc directory listing (proves sub-paths are proxied through)
  4. Via Vite proxy: curl http://localhost:5173/boring/v1/machines/{id}/web/8000/ should work

Read the full file on GitHub · 72 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. 2d ago First seen · 72 lines · 32 tokens per session scan B 5c6dcac1a722

Subscribe to this mod's changes

testing-preview is a skill published in the GitHub repository boringcomputers/nehemiah (311 stars, last pushed 21d ago), licensed Apache-2.0. It adds 32 tokens to every session and 913 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories