Communitygithub.com

YepAPI/skills

多卖家架构、Stripe Connect入驻、佣金费用、托管支付、卖家仪表盘和评价系统。

skills 是什么?

本技能提供构建多卖家市场平台的完整指南,涵盖从数据模型到支付处理的各项核心功能。它详细说明了如何使用 Stripe Connect 的 Express 账户类型实现卖家入驻、KYC验证和自动税务报告。技能重点描述了基于 PaymentIntents 或 Checkout Sessions 的佣金计算机制,以及一种托管资金流程:购买时扣款、资金暂存,待交付确认或争议期过后再释放给卖家。此外,还规划了卖家专属仪表盘(含销售分析、订单管理、产品 CRUD 和提现历史)、买卖双方互评系统(每订单一次,加权平均计算评分)以及支持卖家姓名、评分和位置筛选的搜索功能。该技能适用于 Claude Code、Cursor 等 AI 编码助手,帮助开发者快速在 Stripe 合规框架下搭建具备支付和信任功能的市场平台。

兼容平台~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.

相关技能