Wave 11·Skills.sh · part of AI Dimensie·Why Skills.sh? →·⌘K jump
aidimension UI built-in skill

Deploy

Ship a project to Vercel, Fly.io, Railway, Render, or Cloudflare Pages with preflight, health check, and rollback.

.skills/deploy/SKILL.md2875 charsagentdeployops
.skills/deploy/SKILL.md
GitHub
---
name: deploy
description: >
  Deploy a project to Vercel, Fly.io, Railway, Render, or Cloudflare
  Pages from a local checkout or Git ref. Runs the right preflight checks
  (env vars, build, migrations), picks the target org, promotes a preview
  or production deployment, and prints the live URL plus rollback steps.
  Use when shipping a release, validating a preview environment, or moving
  a service between providers without hand-rolling the CLI.
when-to-use:
  - Shipping a release to production
  - Promoting a staging build to a preview URL
  - Cutting over a service from one host to another
  - Running a one-off preview for a stakeholder demo
---

# Deploy

Ship a project to the chosen host with sane defaults and clear rollback
instructions, in one command.

## Overview

The skill detects the project shape (Next.js, Node, Go, Python, static),
picks the appropriate provider CLI (`vercel`, `fly`, `railway`, `wrangler`,
or `render`), and runs:

1. **Preflight** — `pnpm build`, env-var diff against the target, DB
   migration plan, secret presence check.
2. **Build** — provider-native build, with the right adapter for monorepos.
3. **Promote** — either a preview deployment (default) or production
   with `--prod`, gated by a confirmation prompt unless `--yes` is set.
4. **Verify** — health check or `curl` against the live URL; aborts and
   rolls back if the check fails within the retry window.
5. **Report** — prints the live URL, deployment id, rollback command, and
   any new env vars to add to your password manager.

## Usage examples

```bash
# Preview deploy to Vercel (default for Next.js)
npx skills run deploy --target vercel

# Production deploy to Fly.io with explicit region
npx skills run deploy --target fly --region ams --prod --yes

# Deploy a static site to Cloudflare Pages
npx skills run deploy --target cloudflare --project docs
```

## Parameters

| Name | Type | Default | Description |
|---|---|---|---|
| `target` | enum | auto | `vercel`, `fly`, `railway`, `render`, `cloudflare`. |
| `ref` | string | `HEAD` | Git ref or branch to deploy. |
| `prod` | bool | `false` | Promote to production; requires confirmation. |
| `region` | string | provider default | Region code (`iad`, `ams`, `fra`, …). |
| `env_file` | string | `.env.production` | Env file to diff against remote. |
| `migrate` | bool | `false` | Run DB migrations before promoting. |
| `yes` | bool | `false` | Skip the production confirmation prompt. |
| `rollback_on_fail` | bool | `true` | Auto-rollback if the post-deploy health check fails. |

## Expected output

A deployment record on stdout containing `url`, `deployment_id`,
`provider`, `region`, `duration`, `commit`, and a one-line rollback
command (`vercel rollback <id>` etc.). Exit code is `0` on success and
non-zero on any preflight or post-deploy failure — the rollback is logged
on stderr.

How to use this skill

These files live in the .skills/ directory of the aidimension UI repo. Open Design–compatible agents (Claude Code, Cursor, Cline, etc.) auto-detect them. You can also reference them directly:

# in your agent's config
- name: aidimension-ui
  source: https://github.com/javashn/aidimension-ui/tree/main/.skills