Communitygithub.com

Biz Setup Sepay Payment — Infra de pago VietQR integral para Ne…

Guía paso a paso y configuración automatizada de la infraestructura de pago VietQR para tu landing page Next.js usando Sepay. Incluye registro de cuenta, configuración de base de datos de leads y scaffolding completo del flujo de pago.

¿Qué es Biz Setup Sepay Payment — Infra de pago VietQR integral para Ne…?

Esta skill construye toda la infraestructura de pago para una landing page Next.js utilizando Sepay, la pasarela de pago VietQR líder en Vietnam. Permite a los usuarios crear un flujo completo: el cliente llena un formulario, se genera una orden, se muestra un código QR, el cliente transfiere el dinero, y un webhook de Sepay verifica el pago, buscando el lead y activando notificaciones por email o Telegram, todo de forma automatizada. La skill soporta dos opciones para la base de datos de leads: Vercel KV (Redis, rápido de configurar) o Supabase Free (Postgres, más escalable y con UI administrativa), siendo Supabase la opción recomendada. A lo largo de 7 fases, guía al usuario en el registro de la cuenta Sepay, la configuración de la base de datos, la implementación de las rutas API (`/api/checkout`, `/api/sepay-webhook`, `/api/admin/leads`) y la incrustación del QR en la landing page. El código es agnóstico al proveedor de base de datos a través de un adaptador, facilitando cambios futuros. Incluye un plan de pruebas de 5 niveles y estrategias de deduplicación de webhooks para evitar procesamientos duplicados.

Compatible con~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/lexuanthanhhy/MKT.LANDINGPAGE.SKILLS/tree/main/.claude/skills/biz-setup-sepay-payment

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

Biz Setup Sepay Payment — Infraestructura de pago VietQR integral para Next.js

Esta skill construye toda la infraestructura de pago para una landing page Next.js usando Sepay (la pasarela de pago VietQR de Vietnam). Al finalizar: el cliente llena un formulario → se crea una orden → escanea un código QR → realiza la transferencia → un webhook de Sepay llega → se verifica el pago, se busca el lead y se activa el envío de notificaciones por email/telegram. Todo automatizado, sin necesidad de confirmación manual por parte de un administrador.

Filosofía: Sepay es el camino de menor resistencia para Vietnam — VietQR + API bancaria nativa, sin necesidad de que el cliente se registre, solo escanea el QR con su app bancaria. Comisiones del 1.5-2%, más barato que Stripe (4-5%), liquidación T+1, y un plan gratuito razonable para landing pages con menos de 100 pedidos al mes.

Por qué un almacén de leads: El webhook de Sepay solo envía content (el texto que el cliente escribe al transferir) + el monto. Sepay NO sabe quién es el cliente. Necesitamos un almacén de leads local para mapear el content al lead {nombre, teléfono, email, producto, monto}.

2 opciones para el almacén de leads — el usuario elige una en la Fase 0:

  • Vercel KV (Upstash Redis) — configuración en 2 minutos, TTL nativo, gratis 30K comandos/mes → < 500 pedidos/mes
  • Supabase Free (Postgres) — configuración en 5 minutos, consultas SQL + interfaz Studio, plan gratuito ~50 veces más amplio → < 2000 pedidos/mes. RECOMENDADA.

Las rutas API (/api/checkout, /api/sepay-webhook, /api/admin/leads) son independientes del proveedor a través de lib/leads-store.ts, que es un re-export delgado. Cambiar de proveedor después = modificar una línea.

La skill NO registra automáticamente una cuenta Sepay para el usuario (requiere verificación KYC de negocio + banco). La skill guía al usuario paso a paso y luego enlaza todo el código.


Cuándo usar esta skill

  • El usuario está lanzando un producto digital / curso / coaching y necesita recibir pagos en línea.
  • El usuario ya tiene una landing page Next.js (a través de ui-ux-pro-max o similar) y quiere añadir un flujo de pago.
  • El usuario está a punto de conectar biz-email-setup o biz-telegram-payment-notify pero aún no tiene la infraestructura de pago → esta skill es un PRERREQUISITO.

NO usar esta skill cuando:

  • El usuario usa Stripe/PayPal (pago con tarjeta internacional) → caso de uso diferente.
  • El usuario acepta transferencias bancarias manuales y las verifica él mismo (baja escala, no recomendado).
  • El usuario ya tiene infraestructura de pago y solo le falta la notificación → ir directamente a /biz-email-setup o /biz-telegram-payment-notify.

Flujo de trabajo general (7 fases)

Fase 0: DETECTAR stack Next.js + PREGUNTAR proveedor (KV / Supabase) — BARRERA
       ↓
Fase 1: GUIAR al usuario para configurar cuenta Sepay — BARRERA manual, esperar al usuario
       ↓
Fase 2A (si KV): CONFIGURAR Vercel KV (instalar paquete + variables de entorno + namespace KV)
Fase 2B (si Supabase): CONFIGURAR Supabase (crear proyecto + migración SQL + service_role)
       ↓
Fase 3: CREAR andamio lib/leads-store.ts (envoltorio de re-export) + lib/leads-{kv|supabase}.ts (implementación)
       ↓
Fase 4: CREAR andamio ruta /api/checkout (formulario → orden → almacenamiento)
       ↓
Fase 5: CREAR andamio ruta /api/sepay-webhook (verificar + buscar + marcador de efectos secundarios)
       ↓
Fase 6: INSERTAR VietQR en la landing page (elegir 1 de 3 patrones UX)
       ↓
Fase 7: Plan de pruebas de 5 niveles (almacén → checkout → webhook → producción → (solo Supabase) ping cron)

Las fases 0 y 1 tienen barrera de espera para el usuario. Las fases 2/3/4/5/6 la skill las realiza activamente.


Fase 0 — Detectar stack Next.js + elegir proveedor

0.1 Detectar stack

test -f next.config.js -o -f next.config.mjs -o -f next.config.ts && echo "Next.js: ✓"
test -d app && echo "Router: App"
test -d pages && echo "Router: Pages"
test -f tsconfig.json && echo "TS: ✓"
test -f pnpm-lock.yaml && echo "pkg: pnpm" || test -f yarn.lock && echo "pkg: yarn" || echo "pkg: npm"

Si no es Next.js: DETENER. Informar: "Esta skill solo soporta Next.js actualmente. Tu stack actual es [X]. ¿Exporto la lógica a Vite/estático con función de Vercel?" — esperar al usuario.

Si existen tanto app/ como pages/: preguntar al usuario cuál usar.

0.2 Verificar infraestructura existente

ls app/api/ pages/api/ lib/ 2>/dev/null
grep -E '"@vercel/kv"|"@supabase/supabase-js"|"@upstash/redis"' package.json
grep -E "SEPAY|KV_REST|SUPABASE_" .env.local 2>/dev/null

0.3 PREGUNTAR al usuario qué proveedor elegir

He detectado que usas Next.js con enrutador [App/Pages] + TypeScript + [pnpm/yarn/npm].

¿Dónde quieres almacenar los leads?

1. Vercel KV (Upstash Redis)
   ✓ Configuración rápida en 2 minutos (1 clic en el panel de Vercel)
   ✓ TTL nativo — sin preocupación por pausa de proyecto
   ✗ Gratis solo 30K comandos/mes → ~500 pedidos/mes
   ✗ Sin SQL — filtros administrativos complejos y difíciles

2. Supabase Free (Postgres) — RECOMENDADA
   ✓ Plan gratuito más amplio (500 MB de BD + 5 GB de ancho de banda, consultas ilimitadas)
   ✓ Postgres = consultas SQL potentes, interfaz Studio de Supabase para ver datos
   ✓ TypeScript con tipos generados automáticamente
   ✓ Configuración en 5 minutos (Consola + pegar 2 variables de entorno)
   ⚠ El proyecto se pausa automáticamente después de 7 días de inactividad → configuro un ping Vercel Cron a `/api/health` cada 6 días para solucionarlo
   ⚠ TTL manual a través de pg_cron (ya configurado en la migración SQL)
   → Adecuado para < 2000 pedidos/mes, fácil de escalar con funciones administrativas

¿Eliges 1 o 2?

BARRERA: NO pasar a la Fase 1 hasta que el usuario elija. Sugerir Supabase por defecto, pero forzar una elección explícita.

Después de que el usuario elija, resumir el plan:

Has elegido [Vercel KV / Supabase]. Voy a:

  1. Guiarte en la configuración de una cuenta Sepay (5-10 minutos)
  2. Configurar el almacén de leads según el proveedor elegido
  3. Conectar el código: lib/leads-store.ts + /api/checkout + /api/sepay-webhook + insertar VietQR
  4. Probar

¿Listo para pasar a la Fase 1?


Fase 1 — Guiar al usuario en la configuración de la cuenta Sepay

Leer references/sepay-account-setup.md para la guía completa. Resumir 5 pasos para el usuario:

Paso 1 — Registrarse en my.sepay.vn

  1. Visitar https://my.sepay.vn → Registrarse
  2. Ingresar número de teléfono, correo electrónico, contraseña → verificar OTP
  3. Completar perfil: Nombre completo + DNI/CCCD (personal) o Código de impuestos (empresa)

Paso 2 — Vincular cuenta bancaria

Panel de control → Cuentas bancarias → Agregar cuenta:

  • Seleccionar banco (Vietcombank, Techcombank, MB, ACB, VPBank, BIDV, VietinBank, TPBank, ...)
  • Ingresar número de cuenta + nombre del titular (debe coincidir con la app bancaria)
  • Verificación automática (a través de API bancaria) o manual (transferir 1.000-10.000 VND con el código de verificación que Sepay proporciona)

Paso 3 — Obtener clave API

Panel de control → Configuración → API y Webhook → Crear nueva clave API:

  • Nombre: landing-page-prod
  • Permisos: webhook:read
  • Copiar la clave (solo se muestra una vez)

Paso 4 — Configurar URL del webhook

En la misma página → Webhook → Agregar webhook:

  • URL: https://tudominio.vn/api/sepay-webhook (estará activa después del despliegue)
  • Autenticación: API Key → pegar la clave recién creada
  • Eventos: transaction:incoming
  • Guardar

⚠️ Desarrollo local: usar ngrok para exponer localhost:3000 y probar con Sepay.

Paso 5 — Pegar para la skill

SEPAY_WEBHOOK_API_KEY=sk_xxxxxxxxxxxxxxxxxxxx
SEPAY_BANK_ACCOUNT_NUMBER=1023456789
SEPAY_BANK_NAME=Vietcombank
SEPAY_ACCOUNT_NAME=NGUYEN VAN A

BARRERA: NO pasar a la Fase 2 hasta que el usuario pegue todos los datos.


Fase 2A — Configurar Vercel KV (solo si el usuario eligió KV en la Fase 0)

Vercel KV = Upstash Redis gestionado. Gratis 30K comandos/mes.

2A.1 Crear namespace KV

Panel de Vercel → Proyecto → Storage → Create Database → KV (Redis) → nombre sepay-leads → Crear.

Genera automáticamente 4 variables de entorno:

KV_URL=...
KV_REST_API_URL=...
KV_REST_API_TOKEN=...
KV_REST_API_READ_ONLY_TOKEN=...

Hacer clic en Connect to Project → Vercel inyecta las variables de entorno (Production + Preview + Development).

2A.2 Obtener variables de entorno localmente

npm i -g vercel    # si aún no está instalado
vercel link
vercel env pull .env.local

2A.3 Instalar paquete

pnpm add @vercel/kv  # o yarn / npm install

2A.4 Verificar

node -e "
const { kv } = require('@vercel/kv');
kv.set('test', 'hello').then(() => kv.get('test')).then(v => {
  console.log('KV OK:', v);
  return kv.del('test');
});
"

Esperar KV OK: hello. Ir a Fase 3.


Fase 2B — Configurar Supabase Free (solo si el usuario eligió Supabase en la Fase 0)

Leer references/supabase-setup.md para la guía completa de 6 pasos. Resumen:

2B.1 Crear cuenta y proyecto en Supabase

  1. https://supabase.com → Iniciar proyecto → Iniciar sesión con GitHub
  2. New project:
    • Nombre: sepay-leads-<marca>
    • Contraseña de la base de datos: hacer clic en Generate → guardar
    • Región: ⚠️ Southeast Asia (Singapore) (por defecto us-east tiene latencia de 250ms+)
    • Precio: Free
  3. Esperar ~2 minutos para el aprovisionamiento

2B.2 Ejecutar migración SQL

Barra lateral → SQL Editor → New query → pegar el contenido de templates/supabase-migration.sql → Run.

Crea 4 tablas + índices + función next_order_id() + habilita RLS + trabajo diario de limpieza pg_cron.

Verificar la salida: 4 tablas (leads/phone_index/order_counter/webhook_dedup) + 1 trabajo pg_cron + next_order_id() devuelve "DH000001".

Restablecer el contador (porque la verificación ya lo incrementó):

UPDATE order_counter SET current_value = 0 WHERE id = 1;
DELETE FROM leads WHERE order_id = 'DH000001';

2B.3 Obtener credenciales API

Project Settings → API:

  • Copiar Project URL (https://xxxxx.supabase.co)
  • Copiar el secreto service_role (NO la clave anon — service_role omite RLS, se usa para el servidor)

2B.4 Pegar variables de entorno

SUPABASE_URL=https://xxxxx.supabase.co
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJI...

La skill verifica automáticamente:

  • La URL coincide con ^https://[a-z0-9]+\.supabase\.co$
  • La clave decodifica JWT, verifica role: "service_role" (NO anon)

Si es incorrecto → mostrar error, pedir que lo pegue de nuevo.

2B.5 Instalar paquete

pnpm add @supabase/supabase-js

2B.6 Configurar Vercel Cron ping (para evitar pausa)

Supabase Free se pausa automáticamente después de 7 días de inactividad. Solución: hacer ping a /api/health cada 6 días.

La skill crea app/api/health/route.ts (a partir de templates/api-health-route.ts) y agrega vercel.json con:

{
  "crons": [
    { "path": "/api/health", "schedule": "0 3 */6 * *" }
  ]
}

⚠️ El plan Vercel Cron Hobby tiene un límite de 2 crons/mes. El patrón */6 days = ~5 veces/mes → supera la cuota. Opciones:

  1. Vercel Pro ($20/mes) — crons ilimitados
  2. GitHub Actions flujo de trabajo .github/workflows/keep-alive.yml (GRATIS) — la skill lo crea si detecta un repositorio de GitHub
  3. cron-job.org (GRATIS) — configuración manual, pegar URL /api/health

La skill elige por defecto la opción 2 (GitHub Actions) si el repositorio tiene .git/config con un remoto de GitHub. De lo contrario, muestra las instrucciones de la opción 3.

2B.7 Verificar

node -e "
const { createClient } = require('@supabase/supabase-js');
const sb = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_SERVICE_ROLE_KEY);
sb.from('order_counter').select('current_value').eq('id', 1).single().then(r => {
  if (r.error) { console.error('FAIL:', r.error.message); process.exit(1); }
  console.log('Supabase OK. current_value =', r.data.current_value);
});
"

Esperar Supabase OK. current_value = 0. Ir a Fase 3.


Fase 3 — Crear andamio lib/leads-store.ts + implementación

Abstracción del proveedor: las rutas API importan desde lib/leads-store.ts, sin saber si el almacenamiento subyacente es KV o Postgres.

Si eligió KV (Fase 0)

Crear 2 archivos:

  • lib/leads-store.ts ← copiar templates/lib-leads-store-kv.ts (1 línea export * from './leads-kv')
  • lib/leads-kv.ts ← copiar templates/lib-leads-kv.ts (implementación KV, ~160 líneas)

Si eligió Supabase

Crear 3 archivos:

  • lib/leads-store.ts ← copiar templates/lib-leads-store-supabase.ts (re-exportar Supabase)
  • lib/leads-supabase.ts ← copiar templates/lib-leads-supabase.ts (implementación Postgres + listLeads para administradores)
  • lib/supabase-admin.ts ← copiar templates/lib-supabase-admin.ts (cliente administrador en caché singleton con service_role)

SUPERFICIE de API COMÚN (ambas implementaciones):

  • createLead(input) → { orderId, lead } — ID atómico + inserción + índice secundario
  • getLeadByOrderId(orderId) → Lead | null
  • getLeadByPhone(phone) → Lead | null — búsqueda de respaldo
  • findPendingLeadByAmountAndTime(amount, start, end) → Lead[] — Estrategia 3 de coincidencia de webhook
  • markLeadPaid(orderId, payment) → Lead | null
  • isTransactionProcessed(sepayId) → boolean — deduplicación
  • markTransactionProcessed(sepayId) → void

TTL: 7 días pendiente / 90 días pagado. KV a través del parámetro ex:. Supabase a través del campo expire_at + trabajo diario de eliminación pg_cron.

Cambiar de proveedor después = modificar 1 línea de leads-store.ts (NO tocar el código de la API).

Leer references/leads-kv-schema.md (KV) o references/supabase-leads-schema.md (Supabase) para conocer la justificación detallada.


Fase 4 — Crear andamio ruta /api/checkout

Leer templates/api-checkout-app-router.ts (enrutador App) o templates/api-checkout-pages-router.ts (enrutador Pages). Copiar en la ruta correspondiente.

Ambas plantillas import { createLead } from '@/lib/leads-store' — independientes del proveedor.

Flujo:

Cliente POST /api/checkout { name, phone, email, productName, amount }
  ↓
Servidor:
  1. Validar (formato de teléfono VN, regex de email, amount > 0)
  2. createLead() → { orderId: "DH000123" }
  3. Generar URL de QR de Sepay: https://qr.sepay.vn/img?acc=X&bank=Y&amount=Z&des=DH000123&template=compact
  4. Devolver { orderId, amount, bankInfo, content, qrUrl }
  ↓
Cliente: mostrar modal con QR O redirigir a /checkout/DH000123

Fase 5 — Crear andamio ruta /api/sepay-webhook

Leer templates/api-sepay-webhook-app-router.ts. Copiar en app/api/sepay-webhook/route.ts.

La plantilla import ... from '@/lib/leads-store' — independiente del proveedor.

Flujo:

Sepay POST /api/sepay-webhook
  Authorization: Apikey {SEPAY_WEBHOOK_API_KEY}
  Cuerpo: SepayWebhookPayload
  ↓
Servidor:
  1. Verificar autenticación con timingSafeEqual — proteger contra ataques de temporización
  2. Deduplicación temprana: isTransactionProcessed(payload.id) → devolver 200 pronto
  3. Registrar deduplicación PRIMERO — idempotente incluso si falla el procesamiento
  4. Filtrar transferType === 'in' (ignorar transferencias salientes)
  5. Coincidencia multi-estrategia:
     a. content → order_id (regex /DH\d+/)
     b. content → teléfono (regex /0\d{9}/) → getLeadByPhone
     c. amount + timestamp ±30min → findPendingLeadByAmountAndTime (solo aceptar si length === 1)
  6. Rechazar pagos insuficientes, ACEPTAR pagos excesivos
  7. markLeadPaid(orderId, payment) → actualizar almacén
  8. Propagar efectos secundarios a través de un bucle try/catch (NO Promise.all)
  9. SIEMPRE devolver 200 (incluso en caso de error interno) — Sepay reintenta con Fibonacci 7 veces si no es 200

Marcadores de efectos secundarios para que biz-email-setup + biz-telegram-payment-notify se conecten después.

Leer references/sepay-webhook-flow.md para conocer la justificación de la deduplicación y el comportamiento de reintentos.


Fase 6 — Insertar VietQR en la landing page

3 patrones de UX, preguntar al usuario que elija 1:

PatrónCuándoUX
A. Ventana emergente modalProducto único / compra impulsivaEnviar formulario → ventana emergente modal con QR en la misma página
B. Página /checkout/[orderId]Múltiples productos / necesidad de compartir URL

...

[truncado para la traducción]

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Best practices for Remotion - Video creation in React

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Scaffold trang `/admin` CRM-style trực quan vào Next.js project (Supabase backend) — KHÔNG còn variant Vercel KV. Layout 1CRM-inspired: sidebar 3 tab (Tổng quan / Khách hàng / Email marketing) + popup nhập mã đăng nhập. **Tab Tổng quan**: 4 KPI cards (Tổng leads / Đã thanh toán / Tỷ lệ chuyển đổi / Doanh thu) có delta arrow vs kỳ trước, line chart leads+paid+revenue theo ngày dùng `recharts`, donut trạng thái paid/pending/expired, period selector pill 7d/30d/90d, list 5 thanh toán gần nhất. **Tab Khách hàng**: bảng leads + search + filter trạng thái + filter ngày + CSV export. **Tab Email marketing**: form soạn chiến dịch (tên + tiêu đề + body chọn định dạng **văn bản thường HOẶC HTML** + placeholder `{{name}}` + audience 4 loại all/paid/pending/last_days + tên người gửi) — có nút **Xem trước** mở modal iframe render đúng email thật (text → auto convert + wrap khung; HTML fragment → wrap khung, HTML đầy đủ giữ nguyên) → gửi bulk qua SMTP (reuse `nodemailer` của `biz-email-setup` — KHÔN

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Deploy landing page / website (React, Next.js, Vite, static HTML) lên Vercel — tự kiểm tra Vercel CLI hoặc Vercel MCP đã cài chưa, nếu chưa thì cài qua npm/pnpm và hướng dẫn user authenticate (vercel login), tự detect framework (Next.js / Vite / CRA / static), auto-generate vercel.json khi cần, chạy `vercel --prod`, trả về live URL + inspect URL + hướng dẫn custom domain. USE WHEN user says 'deploy lên vercel', 'đẩy landing page lên vercel', 'publish website', 'go live', 'deploy nextjs', 'deploy react', 'deploy vite', 'tạo URL live', 'đưa lên production', 'biz-deploy-vercel', 'host landing page', 'vercel deploy', 'ship lên vercel', 'đẩy code lên vercel'. Skill này áp dụng cho cả case dùng Vercel CLI lẫn Vercel MCP server.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Setup SMTP-based email auto-responder cho landing page bán hàng — tự động gửi email sau khi user điền form (tên/SĐT/email), KHÔNG cố định vào provider nào. Skill này (1) hỏi user chọn SMTP provider (Gmail/Google Workspace, Resend SMTP, SendGrid, Mailgun, Brevo, Zoho, hoặc SMTP custom của hosting VN) và detect Next.js stack đang dùng, (2) đọc context từ `offer.json` + `conversion-copy.md` (từ `/biz-offer-alex-hormozi`) HOẶC đọc trực tiếp Next.js project đã build qua `ui-ux-pro-max` (file `app/page.tsx`) HOẶC đọc HTML landing page đã deploy để hiểu offer, dream outcome, mechanism, bonus. Lưu ý: skill `biz-sales-page-layout` đã DEPRECATED 2026-05-14 — pipeline mới skip layout/copy.json, (3) **draft 2 email**: email A — auto-responder gửi cho lead (warm welcome + deliver lead magnet/booking confirm/payment link tuỳ offer type), email B — notification gửi cho owner (lead alert + thông tin liên hệ), (4) **show draft cho user duyệt và chỉnh sửa** trước khi wire vào code, (5) cài `nodemailer`

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Cài chatbot AI dạng floating widget góc dưới phải vào project Next.js có sẵn (App Router hoặc Pages Router), responsive đầy đủ web + tablet + mobile, gọi LLM qua OpenRouter (mặc định google/gemini-3-flash-preview, có thể đổi sang anthropic/claude-sonnet-4.6), streaming response, RENDER MARKDOWN trong assistant bubble (bold / list / link / code) qua react-markdown + remark-gfm — KHÔNG hiện raw **bold** dạng text — có knowledge base từ FAQ + tài liệu sản phẩm/khóa học do user cung cấp để chatbot tự động trả lời khách hàng, và TỰ ĐỘNG EXTRACT + LƯU LEAD (tên + SĐT + email) vào Upstash Redis/Vercel KV dưới namespace `chat-lead:{phone}` khi user cung cấp đầy đủ thông tin trong chat — dedupe theo SĐT, TTL 90 ngày, fire-and-forget không block stream. Skill tự detect số lượng project Next.js — nếu có nhiều hơn 1 sẽ hỏi user chọn project nào để cài; tự detect TypeScript/JS, App Router/Pages Router, Tailwind/CSS module, KV/Upstash availability (skip auto-save nếu chưa có); tự install react-markd

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Đóng gói offer **không thể chối từ** (grand slam offer) theo phương pháp Alex Hormozi ($100M Offers) — nhận input pains/gains/customer jobs theo Value Proposition Design (Osterwalder 2014) + sản phẩm/dịch vụ, rồi sinh ra: (1) markdown report tiếng Việt đầy đủ Value Equation scoring + Core Offer + 3-4 Bonus stack + Guarantee + Urgency + Pricing, (2) offer.json structured cho pipeline downstream (`ui-ux-pro-max` build sales page production-ready), (3) conversion copy block (headline + subheadline + CTA) sẵn sàng paste landing page. 2 input mode: (B) user paste sẵn pains + gains + product, (C) user chỉ có sản phẩm — skill phỏng vấn theo VPD framework để surface pain/gain trước. Bonus stack mode hybrid: skill brainstorm 5-7 candidate có justification value rồi user pick/chỉnh 3-4 cái. Tiếng Việt thuần (xưng anh/chị), giá VND charm pricing (X99K), 3-tier decoy structure. USE WHEN user says 'đóng gói offer', 'tạo offer', 'thiết kế offer Hormozi', 'grand slam offer', 'value stack', 'offer sta

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Nâng cấp copy sales page tiếng Việt — biến copy có sẵn (từ `offer.json` + `conversion-copy.md` của `/biz-offer-alex-hormozi`, HOẶC từ Next.js project đã build qua `ui-ux-pro-max`, HOẶC user paste block copy bất kỳ) thành **copy chất lượng cao chốt đơn**: headline punchy hơn, pain agitation đau hơn, mechanism rõ hơn, benefit cụ thể hơn, FAQ xử lý đúng objection của thị trường VN, CTA mạnh hơn. Skill này có 3 INTENSITY LEVEL: (1) **Polish** — light edit + power word + sửa nhịp; (2) **Conversion-optimized** — rewrite 5 block critical + tạo A/B variants cho hero/CTA; (3) **Sales-letter** — long-form story-driven full rewrite kèm P.S.. Mỗi section áp dụng đúng formula thuyết phục (PAR cho pain, BAB cho solution, FEP cho benefit, PVEN cho final CTA, Star-Chain-Hook cho testimonial). Output gồm 4 file: `copy-upgraded.md`, `copy-variants.md` (A/B test bank — 3 hero + 3 CTA + 3 final-CTA), `copy-changes.md` (diff Trước/Sau + lý do), `copy.json` (structured downstream). Giọng văn tiếng Việt thuầ

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

⚠️ DEPRECATED (2026-05-14) — Skill này KHÔNG còn trong pipeline chuẩn. Quy trình mới đã bỏ bước wireframe markdown trung gian: sau `/biz-offer-alex-hormozi` đi THẲNG sang `ui-ux-pro-max` để build Next.js sales page production-ready (có design language nhất quán: style + palette + font pairing, không phải Tailwind defaults). Lý do deprecate: wireframe markdown làm thêm 1 bước trung gian không tạo giá trị — `ui-ux-pro-max` đọc trực tiếp `offer.json` đã đầy đủ anchor + core + bonus + guarantee + urgency + pricing rồi ra HTML production luôn. Chỉ dùng skill này KHI user EXPLICITLY yêu cầu wireframe markdown để review/in/share trước khi build code (rare case). KHÔNG trigger trên các keyword 'tạo sales page', 'tạo landing page bán hàng' nữa — những keyword đó giờ trigger `ui-ux-pro-max`.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Setup Telegram bot notification cho thanh toán thành công từ Sepay webhook trong Next.js project. Skill này: (1) hướng dẫn user 3 bước tạo Telegram bot riêng qua @BotFather + lấy bot token + chat_id (qua @userinfobot cho chat 1-1, hoặc /getUpdates API cho group), (2) tạo helper function `sendTelegramNotification()` reusable trong `lib/telegram.ts`, (3) detect existing Sepay webhook route trong project (thường là `/api/sepay-webhook`, `/api/payment-success`, hoặc tương đương) và wire Telegram call CÙNG CHỖ với email auto-responder (Resend) — gửi parallel qua `Promise.allSettled` để Telegram fail KHÔNG block 200 response trả Sepay (Sepay sẽ retry webhook nếu nhận non-200, gây duplicate notification), (4) draft message format mặc định tiếng Việt: emoji + tên khách + SĐT + email + amount (charm pricing VND định dạng `499.000đ`) + tên sản phẩm + timestamp giờ VN dd/mm/yyyy HH:mm, (5) update `.env.local` với `TELEGRAM_BOT_TOKEN` + `TELEGRAM_CHAT_ID`, add vào `.gitignore`, nhắc user paste vào

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Convert a single MP3 voiceover file into a single HeyGen avatar lip-sync MP4 video. Single-purpose — no planning, no SRT, no chunking, no Remotion compositing. Hybrid path — REST upload (helper script) + HeyGen MCP for video creation, because the post-2026 MCP no longer exposes an asset-upload tool. Reads avatar look pool (`HEYGEN_AVATAR_LOOKS`) from `.env` and HeyGen API key (`HEYGEN_API_KEY`) for the upload step. USE WHEN user says "tạo video heygen từ mp3", "mp3 to heygen", "heygen mp4 từ audio", "convert mp3 sang heygen video", "tạo avatar video từ file mp3", "lip sync mp3 heygen", "biến mp3 thành video heygen", or any time the user has exactly one MP3 file and wants exactly one HeyGen avatar MP4 out.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Demand-side market research cho digital product / service ở Việt Nam — đo cầu thật + WTP + channel-market fit + defensibility qua keyword volume, marketplace sales (Shopee/Unica/Edumall/Gitiho/KyNa), community signal (FB groups, TikTok hashtag, Zalo OA), competitor pricing, unit economics — không phải macro PESTEL. Output: keyword portfolio + Niche Score 100 điểm 7-dimension có evidence + go/no-go decision + falsification protocol. Force triangulate ≥3 sources cho mỗi claim quan trọng. USE WHEN user says 'nghiên cứu thị trường', 'market research', 'validate niche', 'keyword research', 'demand validation', 'niche có nên làm không', 'có ai làm chưa', 'thị trường đủ lớn không', 'có lời không', 'chọn ngách', 'kiểm tra cầu'. Cũng trigger khi user mô tả 1 ý tưởng kinh doanh cụ thể và muốn check feasibility. Skill này KHÔNG fit: high-ticket transactional sale (BĐS, ô tô), B2B enterprise (sales cycle 6+ tháng), hyper-local geo micro-market (1 toà nhà, 1 phường). KHÔNG làm: macro PESTEL/Porter

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Transcribe an MP3 voiceover into an SRT subtitle file and a word-level segments JSON using local OpenAI Whisper. Input is a single MP3 path; output is `<stem>.srt` + `<stem>_segments.json` written next to the MP3 (or to a custom output dir). USE WHEN the user says 'extract srt from mp3', 'trích srt từ mp3', 'transcribe voiceover', 'tạo file srt và segments', 'whisper transcribe', 'bóc transcript có timestamp', 'extract voiceover segments', 'tách SRT từ audio', or any time a downstream skill (plan-short-video-edit, heygen-remotion-short-video-editor) needs an SRT + word-level segments JSON from a voiceover MP3 and one does not already exist.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Convert Vietnamese/English script text to MP3 voiceover using ElevenLabs TTS API. Calls POST /v1/text-to-speech/{voice_id}, streams audio bytes, writes MP3 directly. Locked to Hoang's brand voice ID by default. USE WHEN user says 'tạo mp3 elevenlabs', 'elevenlabs tts', 'eleven labs voice', 'text to speech elevenlabs', 'tạo voiceover elevenlabs', 'đọc text bằng elevenlabs', 'tts elevenlabs to mp3', 'eleven labs script to mp3', 'voiceover bằng elevenlabs', 'giọng elevenlabs'.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

End-to-end orchestrator: **script → final MP4 16:9 (1920×1080) podcast-keynote**.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

End-to-end short-video pipeline — từ kịch bản (Việt/Anh) ra MP4 TikTok/Reels 9:16 hoàn chỉnh. Orchestrator 3 phase ghép skill có sẵn — (1) TTS provider chọn được giữa `mkt-elevenlabs-tts-to-mp3` (default, voice của Hoàng) hoặc `mkt-video-script-to-mp3` (MiniMax speech-2.8-hd), (2) checkpoint user duyệt MP3, (3) `heygen-mp3-to-mp4` lip-sync avatar HeyGen, (4) delegate Phase 3 packaging cho sub-agent `mkt-full-video-phase3-packager` (transcribe + scene outline + checkpoint + fan-out N scene writers parallel + scaffold + preview Studio). API key + voice ID cho cả 2 provider lưu ở `.env`. USE WHEN user nói "tạo full video từ script", "script to tiktok video", "pipeline full video heygen + hyperframe", "tạo video từ kịch bản đến mp4", "elevenlabs heygen hyperframe full pipeline", "minimax heygen pipeline", "kịch bản ra video tiktok", hoặc có sẵn 1 script + (optional) ảnh b-roll và muốn ra MP4 9:16 đóng gói có captions, SFX, b-roll.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Build a TikTok/Reels/YouTube **landscape 16:9 (1920×1080)** short video from a pre-recorded talking-head MP4 using HyperFrames — transcribe Vietnamese audio, scaffold a complete preview-ready 1920×1080 project with a slide pane (1200px) on the left and a floating avatar frame on the right, GSAP timeline có SPLIT↔PIP transitions (slide full-screen + avatar PIP corner thumbnail), breathing yoyo zoom + beat-driven punch-in trên avatar, 5 scene compositions kiểu "tier-row" pattern (post-stack hook / chats-stack problem / hero-orb solution / counter-row recap / terminal-row CTA), optional cream-paper editorial infographic image slots với `<img onerror>` fallback, 6 SFX wired tại scene boundaries, **NO captions** (giọng avatar là spine). USE WHEN user nói "edit video 16:9 từ HeyGen MP4", "scaffold project landscape", "podcast keynote editor", "talking head + slide editor", "build hyperframes 1920×1080", "tạo project 16:9 từ avatar mp4", "scaffold 16:9 hyperframes", "hyperframe landscape vide

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Pipeline đóng gói: từ MP4 quay sẵn (talking head 9:16) tới HyperFrames preview project hoàn chỉnh có captions, SFX, zoom hooks, b-roll toàn cảnh có hiệu ứng rich, và CTA finale.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Audit bài Facebook / Reels / YouTube để phát hiện 4 downward drivers (over-branding, over-production, stock imagery, standardized aesthetic) + frequency-over-quality. Mỗi anti-pattern bị drop ~75% performance nếu hiện diện. USE WHEN user says 'audit content', 'check anti pattern', 'content có lỗi gì không', 'kiểm tra over branding', 'vì sao video bị chết', 'vì sao post không ai xem', 'content audit', 'kiểm tra chất lượng content'.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Tìm viral pattern ở ngành khác (bác sĩ, luật sư, tài chính, bất động sản, thủ công) có thể apply cho niche AI/automation của Hoang. Ngách AI educator VN còn ít format được khai thác — cross-industry adaptation là blue ocean. USE WHEN user says 'tìm format ngành khác', 'cross industry research', 'học format từ ngành khác', 'blue ocean format', 'tìm format chưa ai làm', 'adapt format từ niche khác', 'cross industry viral'.

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

Rewrite CTA kiểu autocratic (Mua ngay! Follow ngay! Đăng ký liền!) sang 3 variants Democratic / Benevolent / Laissez-faire — reach 85% dân số thay vì chỉ 5% (action-based). Áp dụng cho landing page, caption FB, CTA video, email. USE WHEN user says 'rewrite cta', 'sửa cta', 'cta không autocratic', 'viết lại kêu gọi hành động', 'cta cho landing page', 'cta nhẹ nhàng hơn', 'inclusive cta', 'cta democratic benevolent'.

Skills relacionados