跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 UI

integrations

One-request, complete setup of external services — payment (Stripe, PromptPay, Omise, 2C2P), email, auth, analytics, storage and other integrations, including Thai-market services. Installs SDKs, creates API routes, env templates, and UI components in one pass. Use when the user asks to add payments, email, login, analytics, or any third-party service (e.g. "เพิ่มระบบชำระเงิน").

wasintoh · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add wasintoh/toh-framework --skill integrations

技能说明


name: integrations description: > One-request, complete setup of external services — payment (Stripe, PromptPay, Omise, 2C2P), email, auth, analytics, storage and other integrations, including Thai-market services. Installs SDKs, creates API routes, env templates, and UI components in one pass. Use when the user asks to add payments, email, login, analytics, or any third-party service (e.g. "เพิ่มระบบชำระเงิน"). user-invocable: false # internal — model-invoked via toh-* commands, not a user /command

🔌 Integrations Skill

Purpose: One-click setup for external services Version: 1.0.0 Author: Toh Framework Team

Overview

This skill enables easy integration with external services like payment, email, analytics, etc. User just says what they want, AI handles all the setup.

Core Principle

User says: "เพิ่มระบบชำระเงิน"
AI does: Install SDK, create API routes, setup env template, create UI components
User sees: "เพิ่ม Stripe/PromptPay แล้วครับ! ใส่ API key ใน .env แล้วใช้ได้เลย"

ONE REQUEST = COMPLETE SETUP


Available Integrations

💳 Payment

ServiceTrigger WordsThai Market
Stripestripe, credit card, บัตรเครดิต✅
PromptPaypromptpay, พร้อมเพย์, QR✅ Thai
Omiseomise, โอมิเซะ✅ Thai
2C2P2c2p✅ Thai

📧 Email

ServiceTrigger Words
Resendresend, email
SendGridsendgrid
Nodemailernodemailer, smtp
Postmarkpostmark

📊 Analytics

ServiceTrigger Words
Google Analyticsga, google analytics, วิเคราะห์
Plausibleplausible, privacy analytics
Mixpanelmixpanel
PostHogposthog

🔐 Authentication

ServiceTrigger Words
Supabase Authsupabase, auth (default)
NextAuthnextauth, oauth
Clerkclerk
Auth0auth0

📱 Messaging

ServiceTrigger Words
LINE Notifyline notify, แจ้งเตือน line
LINE Messaging APIline messaging, line bot
Twilio SMStwilio, sms
Firebase FCMpush notification, fcm

📁 Storage

ServiceTrigger Words
Supabase Storagestorage (default)
Cloudinarycloudinary, image upload
AWS S3s3, aws storage
Uploadthinguploadthing

Integration Templates

💳 Stripe Integration

Trigger: "เพิ่มระบบชำระเงิน Stripe" / "add payment"

AI Creates:

lib/
├── stripe.ts              # Stripe client setup
├── stripe-helpers.ts      # Helper functions
app/api/
├── checkout/route.ts      # Create checkout session
├── webhook/route.ts       # Handle webhooks
components/
├── PaymentButton.tsx      # Checkout button
├── PaymentSuccess.tsx     # Success page
.env.local (template)
├── STRIPE_SECRET_KEY=
├── STRIPE_PUBLISHABLE_KEY=
├── STRIPE_WEBHOOK_SECRET=

Response:

✅ **เพิ่มระบบชำระเงิน Stripe แล้วครับ!**

📁 ไฟล์ที่สร้าง:
- lib/stripe.ts - Stripe client
- app/api/checkout/route.ts - API สร้าง checkout
- app/api/webhook/route.ts - รับ webhook
- components/PaymentButton.tsx - ปุ่มชำระเงิน

⚙️ **ขั้นตอนถัดไป:**
1. ไปที่ https://dashboard.stripe.com/apikeys
2. Copy API keys ใส่ใน `.env.local`:

STRIPE_SECRET_KEY=sk_test_xxx STRIPE_PUBLISHABLE_KEY=pk_test_xxx

3. ใช้งานได้เลย!

💡 ต้องการทดสอบ payment flow ไหมครับ?

💳 PromptPay QR Integration

Trigger: "เพิ่ม PromptPay" / "พร้อมเพย์"

AI Creates:

lib/
├── promptpay.ts           # PromptPay QR generator
components/
├── PromptPayQR.tsx        # QR display component
├── PaymentConfirm.tsx     # Manual confirmation
app/api/
├── generate-qr/route.ts   # Generate QR API

Response:

✅ **เพิ่มระบบ PromptPay แล้วครับ!**

📁 ไฟล์ที่สร้าง:
- lib/promptpay.ts - สร้าง QR code
- components/PromptPayQR.tsx - แสดง QR
- components/PaymentConfirm.tsx - ยืนยันการชำระ

⚙️ **ตั้งค่า:**
ใส่เบอร์โทร/เลขบัตรประชาชน ใน `.env.local`:

PROMPTPAY_ID=0812345678


💡 หมายเหตุ: PromptPay ไม่มี webhook
ต้องให้ user กดยืนยันว่าโอนแล้ว หรือเชื่อม bank API ครับ

📧 Email with Resend

Trigger: "เพิ่มระบบส่งอีเมล" / "add email"

AI Creates:

lib/
├── email.ts               # Email client
├── email-templates/       # Email templates
│   ├── welcome.tsx
│   └── order-confirmation.tsx
app/api/
├── send-email/route.ts    # Send email API

Response:

✅ **เพิ่มระบบส่งอีเมลแล้วครับ!**

📁 ไฟล์ที่สร้าง:
- lib/email.ts - Email client (Resend)
- lib/email-templates/ - Email templates
- app/api/send-email/route.ts - API ส่งอีเมล

⚙️ **ตั้งค่า:**
1. ไปที่ https://resend.com/api-keys
2. ใส่ API key ใน `.env.local`:

RESEND_API_KEY=re_xxx


💡 พร้อมใช้งานแล้ว! ต้องการเพิ่ม template อีเมลไหมครับ?

📊 Google Analytics

Trigger: "เพิ่ม analytics" / "google analytics"

AI Creates:

components/
├── GoogleAnalytics.tsx    # GA script component
app/
├── layout.tsx             # (modified to include GA)
lib/
├── analytics.ts           # Track events helper

Response:

✅ **เพิ่ม Google Analytics แล้วครับ!**

📁 ไฟล์ที่สร้าง/แก้ไข:
- components/GoogleAnalytics.tsx
- lib/analytics.ts - Helper functions
- app/layout.tsx - เพิ่ม GA script

⚙️ **ตั้งค่า:**
1. ไปที่ https://analytics.google.com
2. สร้าง property ใหม่ แล้ว copy Measurement ID
3. ใส่ใน `.env.local`:

NEXT_PUBLIC_GA_ID=G-XXXXXXXXXX


💡 ใช้ `trackEvent('button_click', { name: 'buy' })` เพื่อ track events ครับ

Quick Integration Commands

User can say:

CommandAI Does
"เพิ่ม payment"Add Stripe (default)
"เพิ่ม PromptPay"Add PromptPay QR
"เพิ่ม email"Add Resend
"เพิ่ม analytics"Add Google Analytics
"เพิ่ม auth"Add Supabase Auth (usually already there)
"เพิ่ม push notification"Add Firebase FCM
"เพิ
阅读完整来源 ↗