AgentSkillsCN

whop-dev

为 Whop 平台构建 Next.js 应用。对于空项目,从创意构思到应用上线,全程引导用户完成从发现到搭建的全过程;对于已有项目,则提供身份验证、支付、Webhook 以及 UI 设计的最佳实践。当用户输入“帮我搭建一个 Whop 应用”、“@whop/sdk”、“verifyUserToken”、“checkAccess”、“结账流程”、“Webhook 处理”、“Experience/仪表盘页面”、“Frosted UI”等关键词时自动触发。设计、性能与数据库相关事宜,可交由配套技能(前端设计、Vercel React 最佳实践、Supabase PostgreSQL 最佳实践、网页设计指南)负责。

SKILL.md
--- frontmatter
name: whop-dev
description: Build Next.js apps for the Whop platform. For empty repos, guides users from idea to deployed app through discovery and setup. For existing projects, provides best practices for authentication, payments, webhooks, and UI. Triggers on "build me a Whop app", @whop/sdk, verifyUserToken, checkAccess, checkout flows, webhook handling, Experience/Dashboard pages, Frosted UI. Delegates to companion skills (frontend-design, vercel-react-best-practices, supabase-postgres-best-practices, web-design-guidelines) for design, performance, and database.
metadata:
  tags: whop, nextjs, payments, sdk, frosted-ui, authentication
  author: Steve | https://whop.com/@stevecooks | https://x.com/steve_cook
  version: "1.2.2"

Whop App Development

Build apps that run inside the Whop platform - handling authentication, payments, webhooks, and UI all with best practices.

What Makes a Good Whop App (Suggestions)

Guidelines for app success (not requirements, user requests take priority):

PrincipleDescription
Empower CreatorsGive customization so each whop feels unique
Drive DiscoveryMake the app have some kind of sharing feature or posting potential to allow users to attrach more users
Price SustainablyMake money without gouging creators or customers
Keep UX SimpleCore action obvious, minimal clicks

Details: app-design-principles.md

When to Use

Empty repo / new project:

  • "Build me a Whop app" → Start with app-from-scratch.md
  • Guides through discovery, setup, and building from nothing

Existing Whop project:

Companion Skills (Install First)

whop-dev focuses on Whop-specific patterns. For complete app development, install these companion skills:

bash
npx skills add https://github.com/anthropics/skills --skill frontend-design && \
npx skills add https://github.com/vercel-labs/agent-skills --skill vercel-react-best-practices && \
npx skills add https://github.com/supabase/agent-skills --skill supabase-postgres-best-practices && \
npx skills add https://github.com/vercel-labs/agent-skills --skill web-design-guidelines
SkillDelegates ToWhen
frontend-designUI creationBuilding components, pages, visual design
vercel-react-best-practicesPerformanceReact optimization, data fetching, bundles
supabase-postgres-best-practicesDatabaseQueries, schema, indexes, RLS
web-design-guidelinesUX reviewAccessibility, design auditing

IMPORTANT: When starting a new project or build-from-scratch flow, install companion skills FIRST before scaffolding. This enables whop-dev to hand off specialized work to expert skills.

See companion-skills.md for detailed handoff patterns.

How to Use

Starting fresh (empty repo)? → Follow Build From Scratch - guided flow from idea to deployed app.

Existing project? → Jump to Quick Reference for specific features.


Build From Scratch

For empty repos only. Go from idea to deployed Whop app:

StepGuideDescription
0companion-skills.mdFIRST - Install companion skills
1app-from-scratch.mdPlan your app type and architecture
2aapp-scaffold-b2b.mdB2B: Dashboard-only apps for admins
2bapp-scaffold-b2c.mdB2C: Experience apps for members
3app-database.mdAdd Supabase → supabase-postgres-best-practices
4app-whop-dashboard.mdConfigure in Whop Developer Dashboard
5app-deployment.mdDeploy to Vercel
6app-store-submission.mdSubmit to App Store (optional)

Quick Reference

Authentication & Security (CRITICAL)

RuleDescription
auth-verify-token.mdMUST verify user tokens server-side
auth-access-check.mdMUST check access levels before operations
security-checklist.mdSecurity best practices checklist
auth-headers.mdExtract tokens from headers
auth-oauth.mdOAuth for external apps
input-sanitization.mdXSS prevention

SDK Setup (CRITICAL)

RuleDescription
sdk-setup.mdInitialize Whop SDK (required)
sdk-iframe.mdClient-side iframe SDK

Design Principles (SUGGESTIONS)

RuleDescription
app-design-principles.mdFounder's suggestions for app success (user requests take priority)

Payments (HIGH)

RuleDescription
payments-checkout.mdCreate checkout flows
payments-webhooks.mdHandle payment webhooks
payments-transfers.mdSend payouts to users
payments-billing.mdBilling portal & saved methods

App Views (HIGH)

RuleDescription
views-structure.mdExperience, Dashboard, Discover pages
views-routing.mdDynamic routing patterns

Members & CRM (HIGH)

RuleDescription
api-memberships.mdMemberships & user management

UI & Design (MEDIUM)

RuleDescription
ui-frosted.mdFrosted UI components
ui-dark-mode.mdDark mode handling
ui-tailwind.mdTailwind CSS setup

API Patterns (MEDIUM)

RuleDescription
api-structure.mdAPI route patterns
api-parallel.mdParallel data fetching

Storage & Files (MEDIUM)

RuleDescription
files-upload.mdWhop native file storage

Engagement (MEDIUM)

RuleDescription
notifications.mdPush notifications
engagement-forums.mdForum posts & comments
engagement-chat.mdChat messages

Development (LOW)

RuleDescription
dev-proxy.mdLocal development proxy
dev-sandbox.mdSandbox testing

Companion Skills (ECOSYSTEM)

RuleDescription
companion-skills.mdInstall & delegate to specialized skills

App Views

Whop apps have three entry points:

ViewRoutePurpose
Experience/experiences/[experienceId]Customer-facing UI
Dashboard/dashboard/[companyId]Admin management
Discover/discoverPublic marketing page

Tech Stack

Required:

  • @whop/sdk - Server-side API client
  • @whop/react - React hooks and Frosted UI

Recommended:

  • Next.js (App Router)
  • TypeScript
  • Tailwind CSS + Frosted UI

Flexible:

  • Database: Supabase recommended, but any works
  • UI: Frosted UI, Shadcn, Radix - your choice

Platforms (Advanced)

For marketplaces with connected accounts:

Resources

Handoff Triggers

Delegate to companion skills when encountering these patterns:

PatternHand Off To
"design", "make it look good", "UI", "component"frontend-design
"optimize", "performance", "slow", "bundle"vercel-react-best-practices
"database", "query", "schema", "index", "RLS"supabase-postgres-best-practices
"review UI", "accessibility", "audit"web-design-guidelines

See companion-skills.md for complete handoff guide.