Communitygithub.com

YepAPI/技能

多供應商架構、Stripe Connect入職、佣金費用、託管付款、賣家儀表板及評價。

技能 是什麼?

此技能提供一個完整的多供應商市場平台架構,包含 Stripe Connect 整合、佣金計算、託管付款流程、賣家儀表板及雙向評價系統。它適用於建構如 Amazon 或 Etsy 等市集平台,支援開發者透過 Stripe Connect Express 處理賣家入職、KYC 驗證及稅務申報,並利用 `application_fee_amount` 參數自動計算平台佣金。技能強調安全的託管付款機制:在購買時先扣款,待賣家完成訂單或爭議期過後才釋放資金至賣家帳戶。賣家擁有專用儀表板,可查看銷售分析、管理訂單與商品、檢視付款歷史,而買賣雙方皆可對每筆訂單互評,並採用加權平均計算整體評分。此技能適合與 Claude Code、Cursor 或 Codex 等 AI 代理搭配使用,提供結構化的實作指引與 TypeScript 程式碼範例。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/YepAPI/skills/tree/HEAD/skills/marketplace

在你喜歡的 AI 中提問

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

說明文件

市集

規則

  • 多供應商資料模型:User 擁有一個 Seller 個人檔案 — 產品歸屬於賣家,訂單連結買家與賣家
  • 使用 Stripe Connect 進行付款:透過 Connect Express 引導賣家入職 — 處理 KYC、稅務表單、銀行帳戶
  • 佣金:將平台費用計算為百分比 — 在 PaymentIntents 或 Checkout Sessions 上使用 application_fee_amount
  • 託管流程:購買時扣款,暫留資金,待送達確認或爭議期過後轉移給賣家
  • 賣家儀表板:獨立佈局,包含銷售分析、訂單管理、產品 CRUD、付款歷史
  • 買家/賣家評價:每筆訂單一個評價,雙向進行 — 以加權平均匯總評分
  • 含賣家篩選的搜尋:在搜尋篩選條件中包含賣家名稱、評分、位置
  • 賣家入職流程:多步驟流程 — 商家資訊 → Stripe Connect → 產品上架 → 上線

模式

// Stripe Connect:為賣家建立關聯帳戶
const account = await stripe.accounts.create({
  type: "express",
  email: seller.email,
  metadata: { sellerId: seller.id },
});

// 建立入職連結
const accountLink = await stripe.accountLinks.create({
  account: account.id,
  refresh_url: `${baseUrl}/seller/onboarding?refresh=true`,
  return_url: `${baseUrl}/seller/onboarding/complete`,
  type: "account_onboarding",
});

// 含平台費用的結帳
const session = await stripe.checkout.sessions.create({
  line_items: [{ price: priceId, quantity: 1 }],
  payment_intent_data: {
    application_fee_amount: Math.round(price * 0.10), // 10% 平台費用
    transfer_data: { destination: seller.stripeAccountId },
  },
  mode: "payment",
  success_url: `${baseUrl}/orders/{CHECKOUT_SESSION_ID}`,
  cancel_url: `${baseUrl}/cart`,
});

// 資料模型草稿
// sellers: id, userId, stripeAccountId, businessName, rating, status (pending|active|suspended)
// products: id, sellerId, title, price, inventory, status
// orders: id, buyerId, sellerId, status (pending|paid|shipped|delivered|disputed)
// reviews: id, orderId, reviewerId, rating, comment, type (buyer_to_seller|seller_to_buyer)

避免事項

  • 未經託管的直接轉帳 — 資金應暫留,直到送達確認或爭議期結束
  • 所有賣家共用單一 Stripe 帳戶 — 每位賣家需有各自的 Connect 帳戶以符合法規
  • 允許賣家自行設定付款排程 — 為防止詐騙,應由平台控制付款
  • 未驗證賣家身份 — 上線前務必要求完成 Stripe Connect 入職
  • 平台代賣家處理稅務 — Stripe Connect Express 會處理賣家的稅務申報

Individual skills in this repo

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

YepAPI/skills

WCAG 2.1 AA — semantic HTML, keyboard navigation, screen readers.

YepAPI/skills

Experiment setup, variant splitting, statistical significance, and feature flag integration.

YepAPI/skills

CRUD generators, data tables, user management, role-based access, and bulk operations.

YepAPI/skills

Monitor what ChatGPT and Gemini say about your brand using YepAPI.

YepAPI/skills

Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

YepAPI/skills

Commander.js, interactive prompts with Clack, spinners, colors, config files, exit codes, and npm publishing.

YepAPI/skills

cmdk integration, Cmd+K trigger, fuzzy search, grouped actions, keyboard navigation, and dynamic action registration.

YepAPI/skills

Content planning with trend and sentiment data from YepAPI.

YepAPI/skills

Content calendar, keyword-driven planning, and content briefs.

YepAPI/skills

Theme switching with CSS variables, system preference detection, next-themes, and persistence.

YepAPI/skills

Threaded comments, @mentions, reactions, moderation queue, optimistic UI, and cursor pagination.

YepAPI/skills

Competitive analysis between domains using YepAPI.

YepAPI/skills

Layout grids, KPI cards, data tables with sorting/filtering, sidebar navigation, and responsive breakpoints.

YepAPI/skills

Data encryption — TLS everywhere, AES-256-GCM for PII, bcrypt passwords, encrypted backups.

YepAPI/skills

Chart patterns with Recharts/Nivo/D3, responsive containers, color scales, and accessibility.

YepAPI/skills

Drizzle schema definition, push vs migrate, type-safe queries, relations, transactions, and prepared statements.

YepAPI/skills

Upload handling, resize/compress, CDN delivery, blur placeholders, and next/image patterns.

YepAPI/skills

Local business and Google Maps research using YepAPI.

YepAPI/skills

Cursor-based pagination, IntersectionObserver, virtualized lists with @tanstack/react-virtual, and scroll position restoration.

YepAPI/skills

Chat UI components, streaming responses with AI SDK, context window management, and RAG patterns.

相關技能