Communitygithub.com

Biz Telegram Payment Notify — Alerte en temps réel pour les pai…

Configure une notification bot Telegram pour les paiements réussis provenant du webhook Sepay dans un projet Next.js. Ce skill guide l'utilisateur à travers la création d'un bot, la récupération des identifiants, la création d'une fonction d'assistance réutilisable et l'intégration dans le gestionnaire de webhook existant.

Qu'est-ce que Biz Telegram Payment Notify — Alerte en temps réel pour les pai… ?

Ce skill est conçu pour les développeurs utilisant Next.js, Sepay et souhaitant des alertes en temps réel sur Telegram lors de paiements réussis. Il automatise l'intégration d'une notification Telegram dans un webhook Sepay existant, en parallèle des notifications email (Resend). Le skill commence par détecter la route de webhook Sepay et le magasin de leads (Vercel KV), puis guide l'utilisateur pas à pas pour créer un bot Telegram via @BotFather et obtenir le token et le chat_id. Il crée ensuite une fonction utilitaire `sendTelegramNotification()` dans `lib/telegram.ts`, formate les messages en français (mais personnalisable) avec emoji et détails clients, et met à jour les variables d'environnement. L'intégration utilise `Promise.allSettled` pour garantir qu'un échec de Telegram ne bloque pas la réponse 200 à Sepay, évitant ainsi les notifications en double. Enfin, il propose un plan de test en trois niveaux. Ce skill ne fonctionne que si un webhook Sepay est déjà configuré.

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

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Biz Telegram Payment Notify — Alerte en temps réel quand Sepay reçoit un paiement

Ce skill intègre la notification bot Telegram dans le webhook Sepay déjà existant de votre projet Next.js. À chaque fois qu'un client effectue un virement réussi sur un compte bancaire lié à Sepay, le bot Telegram envoie un message en temps réel dans le chat du propriétaire (ou du groupe de vente) — avec le nom du client, son téléphone, le montant, le produit et l'heure.

Philosophie : L'auto-répondeur email pour le client (Resend) et l'alerte Telegram pour le propriétaire servent deux acteurs différents. L'email est formel pour le client. Telegram est un "ping" pour le propriétaire — vous êtes en déplacement, vous ouvrez Telegram et vous voyez immédiatement la nouvelle commande, sans avoir à ouvrir Gmail et chercher parmi 100 autres emails. Latence Telegram < 2 secondes contre 30-60 secondes pour l'email.

Pourquoi Telegram et pas Slack/Discord/Zalo : La configuration d'un bot Telegram prend 5 minutes (1 token + 1 chat_id), nécessite ni espace de travail ni administrateur serveur, est gratuite avec messages illimités, a des notifications push plus puissantes que l'email, et dispose d'applications natives iOS/Android/desktop. Slack nécessite un espace de travail + une invitation. Discord nécessite un serveur + une configuration de permissions. Zalo OA nécessite un compte professionnel vérifié (approbation de 3 à 7 jours) + des frais mensuels pour utilisateur actif. Telegram est le chemin de moindre résistance pour les alertes côté propriétaire.

Sortie : correctif de code + guide de configuration du bot étape par étape + liste des variables d'environnement + plan de test en 3 niveaux. Le skill NE teste PAS l'envoi Telegram lui-même — il demande à l'utilisateur de coller le token et le chat_id du bot au préalable, car ces identifiants sont la propriété de l'utilisateur.


Quand utiliser ce skill

  • L'utilisateur vient de configurer le webhook Sepay et souhaite être notifié en temps réel sur Telegram lorsqu'un client transfère de l'argent.
  • L'utilisateur a déjà un /api/payment-success (ou équivalent) qui gère l'email Resend et souhaite ajouter une alerte Telegram en PARALLÈLE — sans créer une nouvelle route, sans dupliquer la logique.
  • L'utilisateur dit "prévenez-moi quand il y a une commande" et le contexte est une page de vente avec intégration Sepay.

N'utilisez PAS ce skill quand :

  • L'utilisateur veut une notification Slack/Discord → cas d'utilisation différent.
  • L'utilisateur veut un bot Zalo OA → nécessite un compte professionnel vérifié + une structure de coûts différente.
  • L'utilisateur n'a pas encore configuré le webhook Sepay (pas de compte bancaire lié à Sepay, pas de point de terminaison pour recevoir le webhook) → ce skill ne configure pas Sepay à partir de zéro, il ne fait que s'intégrer dans un webhook existant.
  • L'utilisateur veut un email uniquement pour le propriétaire → biz-email-setup a déjà un Email B (notification propriétaire).

Workflow général (6 phases)

Phase 0: DÉTECTER la route du webhook Sepay existant (chemin + framework + forme du gestionnaire)
       ↓
Phase 0.5: DÉTECTER le magasin de leads (lib/leads-kv.ts depuis /biz-setup-sepay-payment)
           → présent : utiliser la recherche KV réelle
           → absent : proposer 2 options (mode brut OU exécuter /biz-setup-sepay-payment d'abord)
       ↓
Phase 1: GUIDER l'utilisateur pour créer le bot Telegram (BotFather → token → chat_id)
       ↓ [BARRIÈRE — attendre que l'utilisateur colle le token + chat_id]
       ↓
Phase 2: PROPOSER le format du message → montrer un aperçu à l'utilisateur → confirmer
       ↓
Phase 3: INTÉGRER le code (assistant lib/telegram.ts + intégration dans le gestionnaire webhook + variables d'environnement)
       ↓
Phase 4: PLAN DE TEST (curl bot direct → payload Sepay simulé → vérification en production)

Les phases 1 et 4 ont une barrière d'attente car l'utilisateur doit effectuer des opérations manuelles (récupérer le token, vérifier en production). Les phases 0/0.5/2/3 sont prises en charge par le skill.


Phase 0 — Détecter le webhook Sepay existant

Ce skill s'intègre dans un webhook existant, il NE crée PAS de nouvelle route. Commencez par localiser le gestionnaire.

Trouver la route du webhook — rechercher avec les mots-clés courants :

# Dans la racine du projet
grep -r "sepay" --include="*.ts" --include="*.js" --include="*.tsx" -l
grep -r "transferAmount\|transferType\|payment-success\|payment-webhook" --include="*.ts" --include="*.js" -l

3 scénarios courants :

ScénarioChemin existantAction
L'utilisateur utilise le pipeline biz-email-setupapp/api/payment-success/route.ts (ou pages/api/payment-success.ts) contient déjà Resend appelant sendCustomerEmail + sendOwnerEmailIntégrer sendTelegramNotification dans le même Promise.allSettled
L'utilisateur a une route spécifique à Sepayapp/api/sepay-webhook/route.ts ou app/api/webhook/sepay/route.tsIntégrer après l'analyse et la validation du payload Sepay (branche transferType === 'in')
Aucune route trouvée—ARRÊTER. Informer l'utilisateur : "Je n'ai pas trouvé de route webhook recevant Sepay. Veuillez d'abord configurer le webhook Sepay (lier un compte bancaire à Sepay → créer une URL de webhook pointant vers votre domaine), puis revenez ici pour que j'intègre Telegram. Ou si le webhook se trouve à un point de terminaison avec un nom différent, veuillez m'indiquer le chemin."

Lire le gestionnaire actuel pour comprendre sa forme :

  • Y a-t-il une authentification de la requête Sepay ? (en-tête Authorization Apikey ou HMAC)
  • Y a-t-il une déduplication basée sur id ou referenceCode ? (Sepay relance si non-200 → nécessite une déduplication pour éviter les notifications en double)
  • Y a-t-il une recherche de lead basée sur content (le message de virement contenant l'ID de commande) ?
  • Format de la réponse à Sepay : { success: true } ou 200 OK simple ?

Si le gestionnaire actuel n'a pas de déduplication — avertir l'utilisateur mais NE PAS bloquer. Le skill ne fait qu'intégrer Telegram, la déduplication est une préoccupation de la logique de paiement. Suggérer à l'utilisateur d'ajouter une déduplication séparée si nécessaire.


Phase 0.5 — Détecter le magasin de leads (CRITIQUE)

Le webhook Sepay n'envoie que content (le texte que le client a collé lors du virement) + transferAmount + referenceCode. Sepay ne sait pas qui est le client — il faut rechercher dans un stockage local en fonction du content (qui contient l'ID de commande).

Le skill vérifie 3 choses :

# 1. Vérifier si l'assistant du magasin de leads existe
test -f lib/leads-kv.ts || test -f lib/leads-kv.js && echo "magasin de leads : ✓"

# 2. Vérifier les variables d'environnement Vercel KV
grep -E "KV_REST_API_URL|KV_REST_API_TOKEN" .env.local && echo "variables d'environnement KV : ✓"

# 3. Vérifier si @vercel/kv est installé
grep '"@vercel/kv"' package.json && echo "paquet KV : ✓"

3 scénarios :

ScénarioAction
Les 3 ✓ — magasin de leads prêtPasser à la Phase 1, utiliser getLeadByOrderId() depuis lib/leads-kv.ts dans le gestionnaire webhook
1+ manquant — pas encore configuréARRÊTER, demander à l'utilisateur 2 options (voir ci-dessous)

Si manquant, demander à l'utilisateur :

J'ai détecté que vous n'avez pas encore de magasin de leads (Vercel KV). Le webhook Sepay ne connaît pas l'identité du client — il n'a que le contenu du virement + le montant. Que souhaitez-vous faire ?

Option 1 — Configurer un magasin de leads complet via /biz-setup-sepay-payment d'abord (recommandée) :

  • Ce skill configurera Vercel KV, créera le squelette de lib/leads-kv.ts et intégrera la soumission de formulaire pour sauvegarder le lead lors de l'inscription de l'utilisateur
  • Revenez ensuite ici pour que j'intègre Telegram avec une recherche complète du nom/téléphone/email du client
  • L'alerte Telegram affichera : "Nguyễn Văn A — 0901234567 — [email protected] — 499K — Cours AI Agent"

Option 2 — Mode brut : envoyer le payload Sepay directement sur Telegram, sans recherche de lead :

  • Telegram affichera seulement : "Vietcombank — 499.000đ — contenu : DH001 0901234567 — 14:32"
  • Le propriétaire devra deviner le client à partir du contenu et recouper avec les logs email Resend
  • Simple, fonctionne immédiatement, mais mauvaise expérience utilisateur

Choisissez l'option 1 ou 2 ?

Si l'utilisateur choisit 1 → ARRÊTER ce skill, suggérer /biz-setup-sepay-payment. Une fois que l'utilisateur a terminé la configuration → revenir à ce skill.

Si l'utilisateur choisit 2 → passer à la Phase 1, utiliser le modèle brut (voir templates/lib-telegram-raw.ts).


Phase 1 — Guider l'utilisateur pour créer le bot Telegram

Lire references/telegram-bot-setup.md pour des instructions détaillées avec des captures d'écran textuelles. Résumé en 3 étapes pour l'utilisateur :

Étape 1 — Créer un nouveau bot avec @BotFather

1. Ouvrir Telegram (mobile/desktop)
2. Rechercher : @BotFather → cliquer sur Démarrer
3. Taper la commande : /newbot
4. BotFather demande le nom du bot — saisir un nom d'affichage (ex : "Commandes Marque X")
5. BotFather demande un nom d'utilisateur — saisir un nom d'utilisateur se terminant par "_bot" (ex : marquex_commandes_bot) — doit être unique globalement
6. BotFather renvoie un message contenant la ligne :
   "Use this token to access the HTTP API: 1234567890:AAxxxxxxxxxxxxxxxxxxxxxx"
7. Copier ce token, le coller ici.

ATTENTION SÉCURITÉ : Ce token équivaut à un droit de contrôle du bot. Ne le committez pas sur Git, ne le partagez pas publiquement. En cas de fuite → retourner chez @BotFather → /token → /revoke pour créer un nouveau token.

Étape 2 — Récupérer le chat_id

Chat 1-1 (seul le propriétaire reçoit) — recommandé pour un solopreneur :

1. Dans Telegram, rechercher : @userinfobot → cliquer sur Démarrer
2. Le bot renvoie un message contenant "Id : 123456789" — copier ce numéro.
3. C'est le chat_id.

Chat de groupe (l'équipe de vente reçoit ensemble) — recommandé pour une équipe :

1. Créer un nouveau groupe Telegram (ou utiliser un groupe existant)
2. Cliquer sur le nom du groupe → Ajouter un membre → rechercher le bot que vous venez de créer (par son nom d'utilisateur @marquex_commandes_bot) → Ajouter
3. Dans le groupe, taper : /start@marquex_commandes_bot (ou n'importe quel message)
4. Ouvrir un navigateur, accéder à :
   https://api.telegram.org/bot<TOKEN>/getUpdates
   (remplacer <TOKEN> par le token de l'étape 1)
5. Dans la réponse JSON, chercher "chat":{"id":-1001234567890,...} — copier ce numéro (ne pas oublier le signe moins s'il est présent)
6. C'est le chat_id du groupe.

Channel (diffusion à sens unique, pas de discussion) — le chat_id commence par -100. La méthode pour le récupérer est la même que pour un groupe, mais il faut ajouter le bot en tant qu'administrateur du channel.

Étape 3 — Coller les informations pour le skill

Attendre que l'utilisateur colle :

TELEGRAM_BOT_TOKEN=1234567890:AAxxxxxxxxxxxxxxxxxxxxxx
TELEGRAM_CHAT_ID=123456789

BARRIÈRE IMPORTANTE : NE PAS passer à la Phase 2 tant que l'utilisateur n'a pas collé les deux valeurs. Si l'utilisateur dit "je les ai déjà, ailleurs" → attendre quand même le collage, car elles doivent être injectées dans .env.local à la Phase 3.


Phase 2 — Proposer le format du message

Format par défaut en français, adapté aux mobiles (Telegram rend le HTML) :

🎉 <b>NOUVELLE COMMANDE</b>

👤 <b>{{nom}}</b>
📞 {{téléphone}}
📧 {{email}}
💰 <b>{{montant}}</b> — {{nom_produit}}
🕐 {{heure_vn}}

🔗 Code transaction : <code>{{code_référence}}</code>

Après injection des variables :

🎉 NOUVELLE COMMANDE

👤 Jean Dupont
📞 06 12 34 56 78
📧 [email protected]
💰 499.000đ — Cours AI Agent
🕐 14:32 14/05/2026

🔗 Code transaction : FT26134567890

Montrer un aperçu à l'utilisateur, demander :

  1. Ce format vous convient-il ? Souhaitez-vous ajouter/supprimer des champs ? (ex : ajouter la source UTM, le nombre de commandes du jour, le lien Zalo du client)
  2. Y a-t-il trop d'emojis ? (certains utilisateurs préfèrent le texte brut)
  3. Souhaitez-vous ajouter un bouton en ligne (CTA) menant vers un CRM ou Google Sheets ? (avancé — le skill peut ajouter un clavier en ligne)

Règles de format :

  • Mode HTML (parse_mode: "HTML") — Telegram supporte <b>, <i>, <u>, <code>, <pre>, <a href>. NE supporte PAS <br> — utiliser \n.
  • Format du montant VN : 499.000đ (point comme séparateur de milliers, avec đ à la fin) OU version simplifiée 499K / 1.99M pour plus d'élégance. Lire depuis le paramètre voice dans offer.json si présent.
  • Format du téléphone : 06 12 34 56 78 (par paires) — plus facile à scanner sur mobile.
  • Heure VN : HH:mm dd/mm/yyyy — régler sur l'heure du Vietnam (UTC+7), pas UTC.
  • Éviter les spams d'emojis (>5 emojis/message → diminue le sentiment professionnel).

Phase 3 — Intégrer le code

3 modifications :

3.1 Créer la fonction d'assistance lib/telegram.ts

Lire templates/lib-telegram.ts (TypeScript) ou templates/lib-telegram.js (JavaScript vanille). Contenu :

// lib/telegram.ts
type TelegramPayload = {
  name: string;
  phone: string;
  email: string;
  amount: number; // VND, nombre brut (ex : 499000)
  productName: string;
  referenceCode?: string;
};

export async function sendTelegramNotification(payload: TelegramPayload): Promise<void> {
  const token = process.env.TELEGRAM_BOT_TOKEN;
  const chatId = process.env.TELEGRAM_CHAT_ID;

  if (!token || !chatId) {
    console.error('[telegram] TELEGRAM_BOT_TOKEN ou TELEGRAM_CHAT_ID manquant');
    return; // Ne pas lever d'exception — un échec Telegram ne doit pas bloquer la réponse de paiement
  }

  const text = formatMessage(payload);

  try {
    const res = await fetch(`https://api.telegram.org/bot${token}/sendMessage`, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        chat_id: chatId,
        text,
        parse_mode: 'HTML',
        disable_web_page_preview: true,
      }),
    });
    if (!res.ok) {
      const errBody = await res.text();
      console.error(`[telegram] Échec de l'envoi : ${res.status} ${errBody}`);
    }
  } catch (err) {
    console.error('[telegram] Erreur réseau :', err);
    // Ignorer — ne pas laisser un échec Telegram provoquer une relance de Sepay
  }
}

function formatMessage(p: TelegramPayload): string {
  const amountStr = p.amount.toLocaleString('vi-VN') + 'đ';
  const phoneStr = p.phone.replace(/(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/, '$1 $2 $3 $4 $5');
  const now = new Date().toLocaleString('vi-VN', {
    timeZone: 'Asia/Ho_Chi_Minh',
    day: '2-digit', month: '2-digit', year: 'numeric',
    hour: '2-digit', minute: '2-digit',
  });
  return [
    '🎉 <b>NOUVELLE COMMANDE</b>',
    '',
    `👤 <b>${escapeHtml(p.name)}</b>`,
    `📞 ${phoneStr}`,
    `📧 ${escapeHtml(p.email)}`,
    `💰 <b>${amountStr}</b> — ${escapeHtml(p.productName)}`,
    `🕐 ${now}`,
    p.referenceCode ? `\n🔗 Code transaction : <code>${escapeHtml(p.referenceCode)}</code>` : '',
  ].filter(Boolean).join('\n');
}

function escapeHtml(s: string): string {
  return s.replace(/[<>&]/g, c => ({ '<': '&lt;', '>': '&gt;', '&': '&amp;' }[c]!));
}

Pourquoi ignorer l'erreur : Sepay relance le webhook s'il reçoit un code non-200. Si un timeout/panne de Telegram fait planter le webhook → Sepay relance → chaque relance renvoie l'email et enregistre à nouveau le paiement → l'utilisateur reçoit 5 emails + 5 alertes Telegram pour une seule commande. Telegram est un canal secondaire best-effort, pas un chemin critique.

3.2 Intégrer dans le gestionnaire webhook Sepay

Lire le gestionnaire actuel, localiser l'endroit où le paiement réussi est traité (après l'analyse du payload Sepay + validation de transferType === 'in'). Ajouter :

// app/api/payment-success/route.ts (ou équivalent)
import { sendTelegramNotification } from '@/lib/telegram';
import { sendCustomerEmail, sendOwnerEmail } from '@/lib/resend'; // si existant

export async function POST(req: Request) {
  const payload = await req.json();

  // [Existant] Valider l'authentification Sepay + analyser le payload
  if (payload.transferType !== 'in') {
    return Response.json({ success: true }); // ignorer les transferts sortants
  }

  // [Existant] Rechercher le lead via le contenu (contenant l'ID de commande) ou le code de référence
  const lead = await lookupLeadByTransferContent(payload.content);

  // [NOUVEAU] Lancer 3 effets secondaires en parallèle — un échec Telegram ne bloque pas l'email
  await Promise.allSettled([
    sendCustomerEmail(lead),
    sendOwnerEmail(lead),
    sendTelegramNotification({
      name: lead.name,
      phone: lead.phone,
      email: lead.email,
      amount: payload.transferAmount,
      productName: lead.productName,
      referenceCode: payload.referenceCode,
    }),
  ]);

  return Response.json({ success: true });
}

Raison d'utiliser Promise.allSettled au lieu de Promise.all :

  • Promise.all se rejette si N'IMPORTE QUELLE promesse échoue → le gestionnaire lève une exception → Sepay reçoit un 500 → relance → email en double.
  • Promise.allSettled attend que toutes les promesses soient tenues (résolues ou rejetées), sans lancer d'exception.

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

End-to-end Sepay VietQR payment infrastructure cho landing page Next.js — guide user setup Sepay account + bank linking + scaffold đầy đủ payment flow trong project. Skill này xử lý 7 phase: (0) detect Next.js stack + **HỎI user chọn lead store backend** (Vercel KV hoặc Supabase Free Postgres — default recommend Supabase do free tier rộng hơn ~50× + có SQL + admin UI), (1) GUIDE user đăng ký Sepay account tại my.sepay.vn + link bank account VN (Vietcombank/Techcombank/MB/ACB/VPBank/BIDV/...) + lấy API key + setup webhook URL trên Sepay dashboard, (2A nếu chọn KV) setup Vercel KV (install `@vercel/kv` + KV namespace + 4 env vars KV_*), (2B nếu chọn Supabase) setup Supabase project (tạo project tại Singapore region + chạy migration SQL tạo 4 bảng leads/phone_index/order_counter/webhook_dedup với pg_cron TTL cleanup + RLS deny-all + lấy SUPABASE_URL + SUPABASE_SERVICE_ROLE_KEY + Vercel Cron ping `/api/health` mỗi 6 ngày chống auto-pause), (3) scaffold `lib/leads-store.ts` (thin re-export

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 associés