deploy-preview

deploy-preview is a skill for Claude Code, Codex from morganmuli/metaskill. It costs 26 tokens per session (585 once invoked), scanned A, a copy of deploy-preview, MIT.

A deployment-preview skill that builds Docker images, starts the application locally with Docker Compose, and checks whether the services are healthy.

In plain words
What is it for?
Use it to create a local preview, rebuild containers, start services, inspect their status, and run Prisma database migrations.
Why use it?
It helps detect problems in the full application environment before merging, including image-build, dependency, TypeScript, startup, and database-migration failures.

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/morganmuli/metaskill/deploy-preview
Any agent
npx skills add morganmuli/metaskill --skill deploy-preview
Clone the repo
git clone --depth 1 https://github.com/morganmuli/metaskill

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 deploy-preview

README.md
[![agentmods](https://agentmods.dev/badge/skills/morganmuli/metaskill/deploy-preview.svg)](https://agentmods.dev/skills/morganmuli/metaskill/deploy-preview)
Your own site
<a href="https://agentmods.dev/skills/morganmuli/metaskill/deploy-preview"><img src="https://agentmods.dev/badge/skills/morganmuli/metaskill/deploy-preview.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 585 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00026 $0.00585
Opus 5 $0.00013 $0.00293
Sonnet 5 $0.00005 $0.00117
Haiku 4.5 $0.00003 $0.00059

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

Security

Grade A, and why

deploy-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 4d 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.

Makes network callslowCapability

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

curl -sf http://localhost:3000/api/health || echo "HEALTH CHECK FAILED"
Origin

This is a copy

100% identical to deploy-preview — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

examples/fullstack-web/.claude/skills/deploy-preview/SKILL.md · 103 lines

How it starts

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

You are a deployment preview agent. Your job is to build and launch a local preview environment using Docker, then verify it is healthy.

Current State

Current branch: !git branch --show-current Git status: !git status --short

Deployment Steps

Step 1: Verify Docker is Available

docker --version && docker compose version

If Docker is not available, report that Docker must be installed and stop.

Step 2: Stop Any Existing Preview

docker compose -f docker-compose.yml down --remove-orphans 2>/dev/null || true

Step 3: Build Docker Images

Build the application image using the multi-stage Dockerfile:

docker compose -f docker-compose.yml build --no-cache

If the build fails, report the full error output. Common issues: missing files in build context (check .dockerignore), npm install failures, TypeScript compilation errors.

Step 4: Start Services

docker compose -f docker-compose.yml up -d

Wait for services to be healthy:

echo "Waiting for services to start..."
sleep 5
docker compose -f docker-compose.yml ps

Step 5: Run Database Migrations

docker compose -f docker-compose.yml exec -T app npx prisma migrate deploy

If migrations fail, report the error. Common issues: database not ready yet (may need longer wait), migration conflicts.

Step 6: Health Check

Verify the application is responding:

curl -sf http://localhost:3000/api/health || echo "HEALTH CHECK FAILED"

If the health check fails, inspect the logs:

docker compose -f docker-compose.yml logs --tail=50 app

Step 7: Report

## Preview Deployment Results

**Branch:** [branch name]
**Status:** RUNNING / FAILED at [step]

### Services
| Service | Status | Port |
|---------|--------|------|
| app | running/stopped | 3000 |
| db | running/stopped | 5432 |
| client | running/stopped | 5173 |

### Access URLs
- API: http://localhost:3000/api
- Frontend: http://localhost:5173
- Health: http://localhost:3000/api/health

### Cleanup
To stop the preview environment:
docker compose -f docker-compose.yml down

Read the full file on GitHub · 103 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. 4d ago First seen · 103 lines · 26 tokens per session scan A ec6f97c6063a

Subscribe to this mod's changes

deploy-preview is a skill published in the GitHub repository morganmuli/metaskill (1 stars, last pushed 2d ago), licensed MIT. It adds 26 tokens to every session and 585 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 100% identical to deploy-preview, differing in 0 lines, and is treated as a copy.