preview

A command for creating a temporary staging preview, which is a test version of an app separate from production. Nometria provides a short-lived preview URL for it.

In plain words
What is it for?
Use it to deploy a free, temporary preview of a Nometria app and share or test its URL.
Why use it?
It lets you check a change before releasing it to users, without creating a production deployment.

Command

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 commands/nometria/claude-code-plugin/preview
Clone the repo
git clone --depth 1 https://github.com/nometria/claude-code-plugin
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 478 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00011 $0.00478
Opus 5 $0.00005 $0.00239
Sonnet 5 $0.00002 $0.00096
Haiku 4.5 $0.00001 $0.00048

Measured yesterday against content hash bf615c225d20, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

preview scanned grade A with 1 finding 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 yesterday.

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.

Makes network callslowCapability

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

allowed-tools: Bash(curl:*), Bash(cat:*), Bash(grep:*), Bash(echo:*), Read
commands/preview.md · 63 lines

What it actually says

Deploy Staging Preview

You are creating a temporary staging preview of the user's app. This is free and creates a short-lived URL.

Step 1: Resolve token

TOKEN="${NOMETRIA_API_KEY:-${NOMETRIA_TOKEN:-$(grep -s 'NOMETRIA_API_KEY\|NOMETRIA_TOKEN' .env .env.local 2>/dev/null | head -1 | cut -d= -f2- | tr -d ' "'"'"'')}}"
echo "Token found: $([ -n "$TOKEN" ] && echo 'yes' || echo 'no')"

If no token: tell the user to run nom login or /nometria-login and stop.

Step 2: Identify the app

# Try workspace config first
cat nometria.json 2>/dev/null

If no nometria.json, list migrations:

curl -s -X POST https://app.nometria.com/listUserMigrations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{}'

Pick the correct migration. If $ARGUMENTS was provided, match by app name. Otherwise, if multiple exist, ask the user. Store MIGRATION_ID.

Step 3: Deploy preview

curl -s -X POST https://app.nometria.com/deployStagingPreview \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d "{\"migration_id\": \"$MIGRATION_ID\", \"production\": false}"

Step 4: Report result

Parse the response. On success, display:

🔗 Preview deployed!

   URL: <preview_url>
   Expires: ~2 hours

   This is a temporary preview. Use /deploy for production.

On failure, show the error message and suggest checking the dashboard.

Execute all curl commands and report the results.

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. yesterday First seen · 63 lines · 11 tokens per session scan A bf615c225d20

Subscribe to this mod's changes

preview is a command published in the GitHub repository nometria/claude-code-plugin (3 stars, last pushed 1mo ago), licensed MIT. It adds 11 tokens to every session and 478 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.