skills/vibe-deploy/SKILL.md
One-command deploy for vibe-kit projects. Supports three targets: Vercel (default, cloud), Docker (container image for any host), and VPS (self-managed server via SSH + systemd + nginx). User-visible strings match the user's input language (Vietnamese by default for VN users). Trigger phrases (EN + VN): "deploy this", "publish the site", "go live", "push to vercel", "dockerize", "deploy to my vps", "deploy di", "day len vercel".
npx skillsauth add Hikkywannafly/vibe-kit vibe-deployInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are the vibe-deploy skill. Ship the current vibe-kit project to production and return a live URL (for Vercel) or access instructions (Docker/VPS).
Language rule (MUST follow): Detect the language of the user's input. If they wrote Vietnamese (or VN-style mixed text like "deploy di", "day len vercel"), reply 100% in Vietnamese — friendly, conversational, Southern style. If English, reply in English. Default to Vietnamese for ambiguous/short input. Applies to ALL user-visible text: progress lines, prompts, errors, the final URL announcement. Keep sentences short, no jargon.
Before any other check, run the vibe-security skill in quick mode to catch P0 issues that would make deploy unsafe (leaked secrets, RLS gaps, unverified webhooks, service-role key in client bundle, etc.).
Invoke via Skill tool:
Skill({ skill: "vibe-security", args: "quick" })
Read the returned report. Decision tree:
🚨 Không thể deploy — còn {N} lỗi bảo mật P0.
Chạy `/vibe-security` để xem chi tiết và fix, rồi gõ `/vibe-deploy` lại.
Write .vibe/checkpoint.json: {"status": "blocked-by-security", "p0_count": N}. Do NOT proceed.P1/P2 findings are reported but never block deploy (user decides).
Run ALL checks. If any fails, stop and emit the matching message — do NOT proceed.
| # | Check | Command | Fail message |
|---|-------|---------|--------------|
| 1 | Build passes locally | npm run build 2>&1 exit 0 | "Build is failing. Run /vibe-fix first." |
| 2 | .env.local exists | test -f .env.local | ".env.local is missing. Create it with your Supabase + Polar keys." |
| 3 | Required env keys present | grep NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY in .env.local | "Missing Supabase keys in .env.local." |
| 4 | Config file exists | test -f next.config.js -o -f next.config.mjs -o -f next.config.ts | "Next.js config not found. Is this a vibe-kit project?" |
(Secrets-in-tracked-files check has moved to Step 1 security gate via vibe-security.)
Emit progress: "Pre-flight checks... done"
Parse target from args (--target=vercel|docker|vps). If not given:
.vibe/deploy-target.txt exists, read from it.Where do you want to deploy?
1. vercel — Free cloud hosting, fastest to set up (recommended)
2. docker — Build a Docker image; run it on any host you own
3. vps — Deploy to your own VPS over SSH (systemd + nginx)
Type: vercel / docker / vps
.vibe/deploy-target.txt.Read project name from package.json ($PROJECT_NAME).
npx vercel --prod --yes 2>&1
https://*.vercel.app or the user's custom domain..vibe/checkpoint.json: {"status": "deploy-failed", "target": "vercel", "last_error": "..."}. Stop.Vercel auth: if npx vercel prompts for login, tell the user:
Vercel needs a one-time login. A browser will open — click "Accept".
Create a production-ready Dockerfile if missing:
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/package*.json ./
COPY --from=builder /app/node_modules ./node_modules
EXPOSE 3000
CMD ["npm", "start"]
Also create .dockerignore if missing (node_modules, .next, .env*, .git).
Build the image:
docker build -t $PROJECT_NAME:latest .
Then emit:
Docker image ready: $PROJECT_NAME:latest
Run it locally:
docker run --env-file .env.local -p 3000:3000 $PROJECT_NAME:latest
Push to a registry:
docker tag $PROJECT_NAME:latest <registry>/$PROJECT_NAME:latest
docker push <registry>/$PROJECT_NAME:latest
Then run on your host.
Write .vibe/deploy-url.txt: docker://$PROJECT_NAME:latest.
Require .vibe/vps.env with: VPS_HOST, VPS_USER, VPS_PATH (defaults /var/www/$PROJECT_NAME), VPS_PORT (defaults 22).
If the file is missing, emit:
VPS config needed. Create .vibe/vps.env with:
VPS_HOST=your-server.com
VPS_USER=deploy
VPS_PATH=/var/www/$PROJECT_NAME
VPS_PORT=22
Re-run /vibe-deploy --target=vps when ready.
Stop.
If present:
npm run build
rsync -az --delete \
--exclude node_modules --exclude .env.local --exclude .git \
./ "$VPS_USER@$VPS_HOST:$VPS_PATH/"
ssh "$VPS_USER@$VPS_HOST" "cd $VPS_PATH && npm ci --omit=dev && sudo systemctl restart $PROJECT_NAME"
Add /etc/systemd/system/$PROJECT_NAME.service on your VPS:
[Unit]
Description=$PROJECT_NAME (vibe-kit)
After=network.target
[Service]
Type=simple
WorkingDirectory=$VPS_PATH
EnvironmentFile=$VPS_PATH/.env.local
ExecStart=/usr/bin/node node_modules/.bin/next start -p 3000
Restart=always
User=$VPS_USER
[Install]
WantedBy=multi-user.target
Then:
sudo systemctl daemon-reload
sudo systemctl enable --now $PROJECT_NAME
127.0.0.1:3000. Example nginx snippet written to .vibe/nginx.conf.snippet for the user to copy.Write .vibe/deploy-url.txt: ssh://$VPS_USER@$VPS_HOST$VPS_PATH + the public domain the user points at the VPS.
echo "<url-or-identifier>" > .vibe/deploy-url.txt
Update .vibe/checkpoint.json:
{"status": "deployed", "target": "<vercel|docker|vps>", "deploy_url": "<url>", "deployed_at": "<ISO timestamp>"}
Emit exactly (substitute the relevant line):
Deploy succeeded! 🎉
<one of:>
Live at: <https://...vercel.app> # vercel
Image ready: $PROJECT_NAME:latest # docker
Deployed to: $VPS_USER@$VPS_HOST:$VPS_PATH # vps
Want to add a feature? Type: /vibe-add <description>
Something broken? Type: /vibe-fix
/vibe automatically.package.json): emit "I don't see a project here. Cd into the project folder first."domain-or-host arg overrides: Vercel → --prod --scope <domain>; VPS → VPS_HOST=<arg>; Docker → ignored.brew install docker on Mac / Docker Desktop elsewhere) and stop.ssh or rsync is missing on target=vps: emit install hint and stop.data-ai
Generate Vietnamese marketing copy, UI strings, CTAs, error messages, and email templates for vibe-kit projects. Tone: friendly, conversational, Southern Vietnamese style. Activated for any user-visible text generation.
development
One-shot orchestrator. Turns the prose after /vibe into a shipped product by clarifying intent, rendering a plan, gating on approval, then spawning planner+researcher+fullstack-dev+tester+reviewer agents in sequence. User-visible strings match the user's input language (Vietnamese by default for VN users). Two modes: SAFE (default — clarify + show plan + wait for approval, max 1 round-trip) and YOLO (skip clarify+approval, run full auto with smart defaults — for demos and power users). YOLO triggers: prose contains `yolo`, `nhanh nha`, `lam luon`, `khoi hoi`, `auto`, or args start with `yolo`. Trigger phrases (EN + VN): "build me a site", "make me a landing page", "create a shop", "I need an app", "vibe lam website", "tao cho toi mot", "xay dung shop online", "lam landing page", "can mot app".
tools
On-demand security audit for vibe-kit projects. Stack-aware checks for Next.js App Router + Supabase + Polar: secrets leak, RLS gaps, service-role key in client bundle, missing webhook signature verification, unprotected API routes, weak headers, dependency vulns. Outputs a Vietnamese P0/P1/P2 report with file:line + fix hints. User-visible strings match the user's input language (Vietnamese by default for VN users). Trigger phrases (EN + VN): "check security", "audit it", "security scan", "is this safe to launch", "kiem tra bao mat", "quet bao mat", "audit du an", "co an toan khong", "scan bao mat truoc khi deploy".
tools
Wire Supabase JS client into a React Native (Expo) vibe-kit project: session persistence via AsyncStorage, magic-link OAuth callback via expo-linking deep links, Realtime subscriptions on RN, and shared TypeScript types with the Next.js webapp twin (vibe-kit's typical web<->mobile pair pattern). This is the mobile counterpart of `auth-magic-link` (web). User-visible strings match the user's input language (Vietnamese by default for VN users). Trigger phrases (EN + VN): "supabase react native", "supabase mobile", "auth mobile expo", "magic link mobile", "tich hop supabase vao app", "supabase deep link".