---
name: deploy-to-vercel
description: Deploy the current project to Vercel production. Use when the user says "hacé el deploy", "deployá a Vercel", "subí a producción", or asks to publish the project live.
metadata:
  category: Handoff
---

# Skill: Deploy to Vercel

Runs `vercel --prod` in the project root and reports the production URL.

## Prerequisites

- Vercel CLI available (`vercel`). If not found, stop:
  > No encontré el CLI de Vercel. Instalalo con `npm i -g vercel` y luego autenticáte con `vercel login`.
- Project linked (`.vercel/project.json` exists). If not, stop:
  > El proyecto no está linkeado a Vercel. Corré `vercel link` primero.

## Steps

### 1. Verify vercel.prod.json

```bash
cat vercel.prod.json 2>/dev/null || echo "missing"
```

Check that `installCommand` is present and matches exactly:

```
"echo '//npm.pkg.github.com/:_authToken='$GITHUB_TOKEN >> .npmrc && rm -f bun.lockb && bun install"
```

If missing or different, update `vercel.prod.json` to:

```json
{
  "installCommand": "echo '//npm.pkg.github.com/:_authToken='$GITHUB_TOKEN >> .npmrc && rm -f bun.lockb && bun install",
  "rewrites": [
    { "source": "/((?!api/).*)", "destination": "/index.html" }
  ]
}
```

Also verify that `GITHUB_TOKEN` is set in the Vercel project environment variables (any env). If not, tell the user:

> Necesitás agregar `GITHUB_TOKEN` en las variables de entorno de Vercel (Settings → Environment Variables) con un token que tenga acceso a los paquetes privados de `@humanddev`.

### 2. Deploy

```bash
vercel --prod --local-config vercel.prod.json
```

### 3. Report

Share the production URL printed by Vercel:

> ✅ Deploy listo. URL de producción: **<url>**
