Communitygithub.com

lexuanthanhhy/MKT.LANDINGPAGE.SKILLS

在 Next.js 專案 (Supabase 後端) 中建立 CRM 風格的 `/admin` 管理頁面。提供 3 個標籤頁:儀表板 (KPI 圖表)、客戶管理 (表格 + 篩選) 與電子郵件行銷 (撰寫、預覽、大量發送)。

MKT.LANDINGPAGE.SKILLS 是什麼?

這項技能會自動在現有的 Next.js (App Router) 專案中搭建一個完整的 CRM 風格管理後台,專為使用 Supabase 作為後端並已整合 Sepay 金流的站長設計。它會建立 `/admin` 路徑,包含密碼保護、三個核心標籤頁 (總覽儀表板、客戶管理、電子郵件行銷),並完全依賴 Supabase 儲存活動與寄送記錄。技能會自動偵測專案相依性、安裝 `recharts` 套件、在 Supabase 中執行 SQL 遷移以建立 `campaigns` 和 `campaign_sends` 資料表,並覆蓋 9 個檔案 (5 個函式庫、4 個 API 路由、1 個頁面元件)。同時它也會將管理員密碼寫入 `.env.local`。最終產出是一個即用型、單一密碼的後台,支援 KPI 圖表 (折線圖、圓餅圖)、客戶資料搜尋與 CSV 匯出,以及完整的電子郵件行銷工作流程:支援純文字與 HTML 格式、使用 `{{name}}` 個人化標籤、提供 Iframe 預覽,並透過既有 `nodemailer` 實例使用 SMTP 大量寄送。使用者可透過 Phase 6 的 3 層測試 (cURL、介面檢測、寄送測試活動) 驗證功能。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/lexuanthanhhy/MKT.LANDINGPAGE.SKILLS/tree/main/.claude/skills/biz-admin-leads-dashboard

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Biz Admin Leads Dashboard — CRM 風格 /admin 後台 for Supabase

在 Next.js 專案 (App Router) 中建立 /admin 頁面,風格類似 1CRM。3 個標籤頁 — 總覽 (KPI + 圖表)、客戶 (表格 + 篩選)、電子郵件行銷 (撰寫 + 大量寄送 + 歷史記錄)。

設計理念:比 1CRM 更簡潔 (共用一組密碼,無多用戶),但具備足夠的圖表、差異變化與電子郵件行銷功能,可供 1-2 位企業主使用。所有狀態儲存於 Supabase,檔案結構獨立於現有專案。

/admin → 彈窗 "輸入管理密碼" → 各個標籤頁呼叫 /api/admin/{leads|dashboard|campaigns}
                                  → 每次請求帶上 header x-admin-pass
                                  → 伺服器以 timing-safe 方式比對 ADMIN_PASSWORD 環境變數

密碼儲存在 React 狀態中 — 重新整理頁面 = 再次顯示彈窗 (刻意為之,簡單設計,無需 session cookie)。

僅支援 Supabase — KV 變體已移除。原因:campaigns + campaign_sends 需要 SQL join 與 service_role 繞過 RLS;KV 原生不支援此功能。


何時使用此技能

  • 專案已透過 lib/leads-supabase.ts (從 biz-setup-sepay-payment 選擇 Supabase) 整合 Sepay 金流與客戶資料儲存 → 需要檢視層、儀表板與電子郵件行銷。
  • 使用者想要 CRM 風格的頁面:包含差異變化的 KPI 卡片、按日顯示的折線圖、轉換率圓餅圖,以及向已註冊客戶發送促銷郵件。

請勿使用於以下情況:

  • 專案尚未建立 lib/leads-supabase.ts → 請使用者先執行 /biz-setup-sepay-payment (選擇 Supabase)。
  • 專案使用 Vercel KV 而非 Supabase → 此技能已不支援 KV。使用者僅有兩個選擇:遷移至 Supabase 或自行手動移植。
  • 需要多管理員角色/權限 → 此技能使用共用密碼,不適用。
  • 需要詳細的郵件追蹤 (每位收件者的開啟/點擊) → 此技能僅追蹤寄送成功/失敗。使用者需使用 Resend/SendGrid/Brevo 等具備追蹤功能的大量寄送服務。

工作流程 (6 個階段)

Phase 0: 偵測 Next.js App Router + 驗證 lib/leads-supabase.ts + 驗證 SMTP 環境變數
Phase 1: 詢問使用者密碼 (預設 123456) — 閘道
Phase 2: 安裝 npm 套件 `recharts`
Phase 3: 在 Supabase SQL Editor 中執行 supabase-migration-admin.sql — 閘道
Phase 4: 將 ADMIN_PASSWORD 寫入 .env.local
Phase 5: 建立 9 個程式碼檔案 (5 個函式庫 + 4 個路由 + 1 個頁面)
Phase 6: 3 層測試 (cURL 儀表板、UI 檢測、寄送測試活動)

Phase 0 — 偵測與驗證相依性

# 檢查 Next.js + App Router
test -f next.config.js -o -f next.config.mjs -o -f next.config.ts && echo "Next.js: ✓"
test -d app && echo "App Router: ✓" || { echo "✗ 需要 App Router。此技能不支援 Pages Router。"; exit 1; }

# 驗證 Supabase 客戶資料儲存
test -f lib/leads-supabase.ts && echo "Supabase store: ✓" || { echo "✗ 缺少 lib/leads-supabase.ts — 請先執行 /biz-setup-sepay-payment 並選擇 Supabase"; exit 1; }
test -f lib/leads-store.ts && echo "Provider-agnostic wrapper: ✓"
test -f lib/supabase-admin.ts && echo "Service-role client: ✓"

# 驗證 SMTP 環境變數 (來自 biz-email-setup)
grep -E "^SMTP_HOST=" .env.local && echo "SMTP_HOST: ✓" || { echo "✗ 缺少 SMTP 環境變數 — 請先執行 /biz-email-setup"; exit 1; }
grep -E "^SMTP_USER=" .env.local
grep -E "^SMTP_PASS=" .env.local
grep -E "^MAIL_FROM=" .env.local

# 驗證套件
grep '"nodemailer"' package.json && echo "nodemailer: ✓"
grep '"@supabase/supabase-js"' package.json && echo "@supabase: ✓"

如果缺少 lib/leads-supabase.ts:

⚠ 我發現專案尚未建立 Supabase 客戶資料儲存。請您先執行 /biz-setup-sepay-payment (選擇 Supabase 後端) 來整合金流、建立 leads 資料表與 RLS。完成後再回來,我將為您建立管理儀表板。

如果缺少 SMTP 環境變數:

⚠ 我發現 SMTP 尚未設定。電子郵件行銷標籤頁需要 SMTP 才能發送郵件。請您先執行 /biz-email-setup 選擇供應商 (Gmail/Resend SMTP/Brevo/SendGrid/Zoho...) 後再回來。我可以先繼續但跳過郵件標籤頁 — 您確認要這樣做嗎?

摘要告知使用者:

我已偵測到:Next.js App Router ✓,Supabase 客戶資料儲存 ✓,SMTP 已設定 ✓。 我將進行以下步驟:

  1. 請您提供 /admin 的密碼
  2. 安裝 recharts (用於折線圖與圓餅圖)
  3. 執行 SQL 遷移,在 Supabase 中建立 campaigns + campaign_sends 資料表
  4. 將 ADMIN_PASSWORD 寫入 .env.local
  5. 建立 9 個檔案 (5 個函式庫 + 4 個路由 + 1 個頁面)
  6. 引導您進行測試

準備好進入 Phase 1 了嗎?


Phase 1 — 詢問密碼 (閘道)

直接詢問:

您想要為 /admin 頁面設定什麼密碼?

  • 預設建議:123456
  • 或者您可以貼上更安全的密碼用於正式環境 (至少 12 個字元,包含字母 + 數字 + 特殊字元)

請貼上密碼 (或輸入 "123456" 使用預設值):

等待使用者回應。取得使用者貼上的密碼。若留空 → 使用 123456。

在使用者確認密碼之前,請勿進入 Phase 2。


Phase 2 — 安裝 recharts

# 偵測套件管理工具
test -f pnpm-lock.yaml && PM=pnpm
test -f yarn.lock && PM=yarn
test -z "$PM" && PM=npm

$PM add recharts  # 或: pnpm add recharts / yarn add recharts

nodemailer 已由 /biz-email-setup 安裝完畢。無需再次安裝。


Phase 3 — 執行 SQL 遷移 (閘道)

引導使用者:

請您開啟 Supabase Dashboard → SQL Editor → New query → 將下方完整內容貼上 → 點擊 Run:

[在此貼上 templates/supabase-migration-admin.sql 內容]

這個 SQL 會建立 2 個新資料表:campaigns (活動標頭) + campaign_sends (每位收件者的記錄)。不會影響既有的 leads 資料表。

執行完畢後,請在 SQL 結尾處驗證 — 應看到 campaigns: 0 與 campaign_sends: 0。

等待使用者確認 "SQL 已執行完畢" 後,再進入 Phase 4。


Phase 4 — 寫入 .env.local

附加到 .env.local:

# Admin /admin 頁面密碼
ADMIN_PASSWORD=<Phase-1-使用者提供的密碼>

如果 ADMIN_PASSWORD 已存在 → 詢問使用者是否覆蓋 (預設為「否」)。

確保 .env.local 已在 .gitignore 中:

grep -qxF ".env.local" .gitignore 2>/dev/null || echo ".env.local" >> .gitignore

Phase 5 — 建立 9 個檔案

lib/admin-auth.ts          ← 樣板 lib-admin-auth.ts
lib/admin-stats.ts         ← 樣板 lib-admin-stats.ts
lib/campaigns.ts           ← 樣板 lib-campaigns.ts
lib/email-render.ts        ← 樣板 lib-email-render.ts
lib/mailer.ts              ← 樣板 lib-mailer.ts
app/admin/page.tsx         ← 樣板 app-admin-page.tsx
app/api/admin/leads/route.ts      ← 樣板 app-api-admin-leads-route.ts
app/api/admin/dashboard/route.ts  ← 樣板 app-api-admin-dashboard-route.ts
app/api/admin/campaigns/route.ts  ← 樣板 app-api-admin-campaigns-route.ts

Email 渲染模組:lib/email-render.ts 是純模組 (不匯入 nodemailer) — 包含 textToHtml / wrapEmailHtml / personalize / renderCampaignEmail。lib/mailer.ts 重新匯出這些函式並加上 SMTP 傳輸。如此分離,app/admin/page.tsx (客戶端元件) 便可為「預覽」按鈕匯入渲染輔助函式,而無需將 nodemailer 帶入客戶端 bundle。

注意:如果專案已從 biz-email-setup 擁有 lib/mailer.ts:請勿覆蓋 — 將此技能的 mailer 建立為 lib/admin-mailer.ts,並修改 app/api/admin/campaigns/route.ts 中的匯入路徑為 @/lib/admin-mailer。lib/email-render.ts 永遠安全 (名稱獨立,不會衝突)。

注意匯入別名:所有樣板均使用 @/lib/...。請確認專案的 tsconfig.json 中 paths 設定為 "@/*": ["./*"] (Next.js 預設)。若無此設定,請改為相對路徑匯入。

注意 lib/leads-store.ts:leads API 路由會從 @/lib/leads-store (來自 biz-setup-sepay-payment 的供應商無關包裝) 匯入 listLeads。如果使用者之前設定 KV 後又改名,則需要確認包裝器指向 Supabase。

資料流程圖

瀏覽器 (admin/page.tsx)
  │  使用 fetch 加上 header x-admin-pass
  ├──► GET /api/admin/dashboard?days=30   → lib/admin-stats.ts → leads 資料表     → { kpi, timeseries, deltas }
  ├──► GET /api/admin/leads?status=...    → lib/leads-store.ts → leads 資料表     → { leads, stats }
  ├──► GET /api/admin/campaigns            → lib/campaigns.ts  → campaigns 資料表 → { campaigns: [...] }
  └──► POST /api/admin/campaigns   (body 包含 bodyFormat: 'text' | 'html')
            └─► lib/campaigns.queryAudience(leads.where status/days)
            └─► lib/email-render.renderCampaignEmail(format, body) → { html, text } (渲染 1 次)
            └─► lib/campaigns.createCampaign (campaigns 資料列)
            └─► loop (限流 200ms):
                  lib/mailer.personalize(html/text per recipient)
                  lib/mailer.sendOne(to, subject, html)
                  lib/campaigns.logCampaignSend (campaign_sends 資料列)
            └─► lib/campaigns.setCampaignStatus (最終計數 + sentAt)
            return { successCount, failCount }

客戶端預覽 (不呼叫伺服器):admin/page.tsx 直接匯入 lib/email-render,
「預覽」按鈕渲染 { html } + personalize(範本) → 在 <iframe srcDoc sandbox> 中顯示。

Phase 6 — 3 層測試

測試 1 — 使用 curl 測試儀表板端點

PASS="<Phase-1-的密碼>"

# 密碼錯誤 → 401
curl -i http://localhost:3000/api/admin/dashboard -H "x-admin-pass: wrong"
# 預期結果:401, {"error":"invalid_password"}

# 密碼正確 → 200 並附帶 KPI 與時間序列資料
curl -s http://localhost:3000/api/admin/dashboard?days=7 -H "x-admin-pass: $PASS" | jq '.period, .deltas'
# 預期結果:period {days, leads, paid, revenue, conversionRate}, deltas {leadsPct, ...}

測試 2 — 使用瀏覽器進行 UI 檢測

1. pnpm dev (或 yarn/npm)
2. 開啟 http://localhost:3000/admin
3. 應出現彈窗 "管理頁面" → 輸入錯誤密碼 → 應顯示 "密碼錯誤,請重試"
4. 輸入正確密碼 → 進入儀表板
5. 總覽標籤頁:應看到 4 張 KPI 卡片、折線圖、圓餅圖、7d/30d/90d 期間選擇器可運作
6. 客戶標籤頁:應看到表格 + 篩選 + CSV 匯出
7. 電子郵件行銷標籤頁:應看到撰寫表單 + 歷史記錄 (一開始為空)
8. 電子郵件行銷標籤頁:輸入內容 → 點擊 "👁 預覽" → 應出現 modal 顯示郵件
   渲染畫面 (切換「純文字」↔「HTML」模式以確認兩者均可運作)

測試 3 — 為擁有者發送測試活動郵件

重要:選擇 audience last_days = 7 (配合已設定的密碼),並在郵件內容中使用 {{name}}。先向資料庫中唯一的測試 lead (擁有者的測試 lead) 發送測試郵件,以在真正大量發送前確認流程正常。

1. 進入電子郵件行銷標籤頁
2. 活動名稱:"測試發送"
3. 主旨:"來自 /admin 的測試郵件 — 您收到了嗎?"
4. 收件者:"最近天數" → 7 天
5. 內容:
     哈囉 {{name}},
     
     這是從管理頁面發送的測試郵件,用於確認 SMTP 運作正常。
     
     如果您收到了,我將開始發送真正的行銷活動。
6. 點擊 "👁 預覽" → 確認郵件顯示正確 → 關閉 modal
7. 點擊 "立即發送" → 確認
8. 等待 10-30 秒 (200ms × 收件者人數)
9. 驗證:
   - 應出現綠色橫幅 "已成功發送 X/X 封郵件 (0 個錯誤)"
   - 歷史記錄表格中應出現新的一列,狀態為 "已發送"
   - 擁有者檢查收件匣 → 應收到一封郵件,其中 `{{name}}` 已被取代為實際姓名

最終輸出

✓ 已建立 /admin CRM 風格頁面,使用 Supabase + recharts + 電子郵件行銷

📁 新增的檔案 (9 個):
  lib/
    admin-auth.ts          (timing-safe 密碼檢查)
    admin-stats.ts         (KPI + 時間序列 + 差異變化)
    campaigns.ts           (CRUD + 收件者查詢)
    email-render.ts        (純函式:textToHtml + wrapEmailHtml + renderCampaignEmail — 伺服器與客戶端預覽共用)
    mailer.ts              (nodemailer 傳輸器 + 重新匯出 email-render + 可選的頁尾)
  app/admin/page.tsx       (1CRM 3 標籤頁 UI — 總覽 / 客戶 / 電子郵件行銷 — 純文字/HTML 內文 + 預覽)
  app/api/admin/
    leads/route.ts         (GET 列表 + 篩選)
    dashboard/route.ts     (GET KPI + 時間序列)
    campaigns/route.ts     (GET 歷史記錄 + POST 大量發送)

🗄  Supabase 遷移:
  - campaigns + campaign_sends 資料表 (RLS deny-all, service_role 繞過)
  - 您已執行 templates/supabase-migration-admin.sql ✓

📦 NPM 套件:
  - recharts (新安裝)
  - nodemailer (已從 biz-email-setup 安裝)

🔐 環境變數:
  - ADMIN_PASSWORD 已寫入 .env.local
  - .gitignore 已包含 .env.local
  - SMTP_* + MAIL_FROM 重用自 biz-email-setup

🧪 測試:
  1. ✓ 使用 curl 測試儀表板端點 (測試 1)
  2. ✓ 使用瀏覽器 UI 檢測 (測試 2)
  3. ✓ 發送測試活動郵件給擁有者 (測試 3)

🔧 您待處理的事項:
  1. (若部署到正式環境) 將 ADMIN_PASSWORD 加入 Vercel 環境變數:
     vercel env add ADMIN_PASSWORD production
  2. 重新部署:vercel --prod
  3. 開啟 https://<domain>/admin → 輸入密碼 → 確認 3 個標籤頁皆可正常運作
  4. 首次發送真實活動時:先選擇少量收件者 (last_days 7) 以確認
     供應商的 SMTP 速率限制,再擴展至 'all'

樣板

檔案說明
templates/supabase-migration-admin.sql建立 campaigns + campaign_sends 的遷移腳本
templates/lib-admin-auth.tscheckAdminPass() timing-safe 比對
templates/lib-admin-stats.tsgetDashboardData(days) — KPI + 時間序列 + 差異變化
templates/lib-campaigns.tsCRUD campaigns + queryAudience()
templates/lib-email-render.ts純函式模組 — textToHtml() + wrapEmailHtml() + personalize() + renderCampaignEmail() (text/HTML)。未匯入 nodemailer → 客戶端元件可用於預覽
templates/lib-mailer.tsnodemailer 傳輸器 + sendOne() + sleep() + 從 email-render 重新匯出渲染輔助函式
templates/app-admin-page.tsx1CRM 風格頁面,含側邊欄 + 3 個標籤頁 + recharts。郵件標籤頁包含文字/HTML 格式切換 + 預覽按鈕 (iframe modal)
templates/app-api-admin-leads-route.tsLeads 資料表 API (呼叫 listLeads())
templates/app-api-admin-dashboard-route.ts儀表板分析 API
templates/app-api-admin-campaigns-route.tsGET 列表 + POST 建立與發送

反模式 (請勿執行)

  • ❌ 使用 === 比較密碼 → timing 攻擊。樣板透過 lib/admin-auth.ts 使用 crypto.timingSafeEqual。
  • ❌ 在原始碼中硬編碼密碼 → 忘記修改 → 正式環境中使用了測試密碼。一律透過 process.env.ADMIN_PASSWORD 取得。
  • ❌ 透過 URL 查詢字串傳遞密碼 (?pass=123456) → 洩漏至瀏覽器歷史記錄與存取日誌。請使用 header x-admin-pass。
  • ❌ 為簡單的管理需求建立獨立登入頁面 + session cookie + JWT。行內彈窗即可滿足。
  • ❌ 將密碼儲存在 localStorage → JavaScript 可讀取,XSS 洩漏。樣板儲存在 React 狀態中 (重新整理即消失,符合設計初衷)。
  • ❌ 跳過檢查

…

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

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

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'.

相關技能