Token导航 LogoToken导航

Agent Skill · 前端设计

billing-integration(计费集成)

billing-integration 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

billing-integration 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 9,918。

总安装 190周安装 8GitHub Stars 10下载 67核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:billing-integration(计费集成)
来源仓库:https://github.com/vanman2024/ai-dev-marketplace
仓库路径:skills/billing-integration
安装命令:
npx skills add https://github.com/vanman2024/ai-dev-marketplace --skill billing-integration
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/vanman2024/ai-dev-marketplace --skill billing-integration

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

billing-integration 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。通过 npx skills add 命令从指定 GitHub 仓库安装并使用。

安装前需确认权限范围和维护状态,注意可能触发联网或文件读写操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/billing-integration

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/vanman2024/ai-dev-marketplace --skill billing-…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

billing-integration 怎么安装?

在终端执行 npx skills add https://github.com/vanman2024/ai-dev-marketplace --skill billing-integratio…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

billing-integration 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

billing-integration 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

billing-integration 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

billing-integration 用的人多吗?

公开数据是累计安装 190 次,近一周安装 8 次,下载 67 次,GitHub 10 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

billing-integration 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
billing-integration

计费集成 · 本页

19010需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

billing-integration

Instructions

This skill provides complete Clerk Billing integration with Stripe for subscription management, pricing plans, and payment processing. Clerk Billing eliminates the need for custom webhooks and payment UI by connecting directly to Stripe while handling user interface, entitlement logic, and session-aware billing flows.

1. Enable Clerk Billing

Initialize Clerk Billing in your Clerk Dashboard:

# Run automated setup script
bash ./skills/billing-integration/scripts/setup-billing.sh

What This Does:

  • Guides you through Clerk Dashboard setup
  • Connects your Stripe account
  • Enables billing features
  • Configures production/sandbox modes

Manual Setup Steps:

  1. Navigate to Clerk Dashboard > Configure > Billing
  2. Click "Enable Billing"
  3. Connect your Stripe account (or use sandbox mode for development)
  4. Configure billing settings and defaults

2. Configure Pricing Plans

Create subscription plans and features:

# Run plan configuration script
bash ./skills/billing-integration/scripts/configure-plans.sh

Configuration Process:

  1. Navigate to Dashboard > Configure > Subscription Plans
  2. Click "Add User Plan" (B2C) or "Add Organization Plan" (B2B)
  3. Enter plan details:

- Name (e.g., "Pro Plan") - Slug (auto-generated, e.g., "pro_plan") - Description - Pricing (monthly/yearly)

  1. Add features to plan:

- Feature name (e.g., "AI Assistant") - Feature slug (e.g., "ai_assistant") - Feature description

  1. Set feature limits if usage-based

Plan Types:

  • User Plans: B2C subscriptions tied to individual users
  • Organization Plans: B2B subscriptions for teams/companies
  • Free Tier: Optional free plan with limited features
  • Trial Plans: Time-limited free access to paid features

3. Implement Pricing Table

Add the pricing display component:

Using Template:

# Copy pricing page template
cp ./skills/billing-integration/templates/pricing-page.tsx app/pricing/page.tsx

Basic Implementation:

import { PricingTable } from '@clerk/nextjs'

export default function PricingPage() {
  return (
    <div className="container mx-auto py-12">
      <h1 className="text-4xl font-bold text-center mb-8">
        Choose Your Plan
      </h1>
      <PricingTable />
    </div>
  )
}

What PricingTable Provides:

  • Automatic plan rendering from Dashboard configuration
  • Built-in payment form with Stripe Elements
  • Subscription creation and management
  • Responsive design matching Clerk UI
  • Session-aware (shows current plan for logged-in users)

4. Implement Checkout Flow

Create a complete checkout experience:

# Copy checkout flow template
cp ./skills/billing-integration/templates/checkout-flow.tsx components/checkout-flow.tsx

Checkout Features:

  • Plan selection and comparison
  • Payment method collection
  • Subscription confirmation
  • Error handling
  • Success redirects
  • Email receipts (automatic via Stripe)

Customization Options:

<PricingTable
  appearance={{
    theme: 'dark',
    variables: {
      colorPrimary: '#3b82f6',
      borderRadius: '0.5rem',
    }
  }}
  onSuccess={(subscription) => {
    // Custom success handler
    router.push('/dashboard')
  }}
/>

5. Access Control & Entitlements

Protect features based on subscription status:

Frontend Protection:

import { useAuth } from '@clerk/nextjs'

export default function FeatureComponent() {
  const { has } = useAuth()
  const canUseFeature = has?.({ feature: 'ai_assistant' })

  if (!canUseFeature) {
    return <UpgradePrompt feature="AI Assistant" />
  }

  return <AIAssistantInterface />
}

Backend Protection (API Routes):

import { auth } from '@clerk/nextjs/server'

export async function POST(request: Request) {
  const { has } = await auth()

  if (!has({ feature: 'ai_assistant' })) {
    return Response.json(
      { error: 'Subscription required' },
      { status: 403 }
    )
  }

  // Process request
}

Organization-Level Access:

const { has } = useAuth()
const orgHasFeature = has?.({
  permission: 'org:billing:manage',
  feature: 'team_workspace'
})

6. Subscription Management

Enable users to manage subscriptions:

Built-in Management:

import { UserButton } from '@clerk/nextjs'

export default function Navigation() {
  return (
    <UserButton afterSignOutUrl="/" />
  )
}

What Users Can Access:

  • View current plan and features
  • See invoice history
  • Update payment methods
  • Upgrade/downgrade plans
  • Cancel subscriptions
  • View upcoming renewals

Custom Management Interface:

# Copy subscription management template
cp ./skills/billing-integration/templates/subscription-management.tsx components/subscription-management.tsx

7. Webhook Handling (Optional)

While Clerk handles most webhook logic automatically, you may need custom webhooks for:

  • Usage tracking
  • Custom notifications
  • Analytics integration
  • Third-party service integration
# Setup webhook handlers
bash ./skills/billing-integration/scripts/setup-webhooks.sh

Common Webhook Events:

  • subscription.created - New subscription
  • subscription.updated - Plan change
  • subscription.deleted - Cancellation
  • invoice.payment_succeeded - Successful payment
  • invoice.payment_failed - Failed payment

Handler Templates:

# Copy webhook handler templates
cp ./skills/billing-integration/templates/webhook-handlers/subscription-created.ts app/api/webhooks/subscription-created/route.ts
cp ./skills/billing-integration/templates/webhook-handlers/payment-succeeded.ts app/api/webhooks/payment-succeeded/route.ts

8. Testing & Development

Sandbox Mode:

  • Use Clerk's sandbox mode for development
  • No Stripe account required initially
  • Test all billing flows without real payments
  • Switch to production when ready

Test Cards (Stripe):

Success: 4242 4242 4242 4242
Decline: 4000 0000 0000 0002
3D Secure: 4000 0027 6000 3184

Testing Checklist:

  • Plan selection and display
  • Payment form functionality
  • Subscription creation
  • Feature access control
  • Plan upgrades/downgrades
  • Subscription cancellation
  • Invoice generation
  • Email notifications

Examples

Example 1: Complete SaaS Billing Flow

# 1. Enable billing in Dashboard
bash ./skills/billing-integration/scripts/setup-billing.sh

# 2. Configure pricing plans
bash ./skills/billing-integration/scripts/configure-plans.sh

# 3. Implement pricing page
cp ./skills/billing-integration/templates/pricing-page.tsx app/pricing/page.tsx

# 4. Add subscription management
cp ./skills/billing-integration/templates/subscription-management.tsx components/subscription-management.tsx

# 5. Copy complete example
cp ./skills/billing-integration/examples/saas-billing-flow.tsx app/subscribe/page.tsx

Result: Full billing system with pricing display, checkout, and subscription management

Example 2: Freemium Model with Feature Gates

Setup:

  1. Create "Free" plan with basic features
  2. Create "Pro" plan with premium features
  3. Implement feature gates throughout app

Implementation:

// Feature-gated component
import { useAuth } from '@clerk/nextjs'
import { PricingTable } from '@clerk/nextjs'

export default function PremiumFeature() {
  const { has } = useAuth()

  if (!has({ feature: 'premium_analytics' })) {
    return (
      <div className="border rounded-lg p-6">
        <h3>Premium Analytics</h3>
        <p>Upgrade to Pro to unlock advanced analytics</p>
        <PricingTable />
      </div>
    )
  }

  return <AdvancedAnalyticsDashboard />
}

Example 3: Organization Billing (B2B)

Setup:

  1. Enable Organization Plans in Dashboard
  2. Configure team-based pricing
  3. Implement organization billing interface

Implementation:

import { useOrganization } from '@clerk/nextjs'

export default function OrgBilling() {
  const { organization } = useOrganization()

  return (
    <div>
      <h2>Billing for {organization?.name}</h2>
      <PricingTable mode="organization" />
    </div>
  )
}

Example 4: Usage-Based Billing

Setup:

  1. Configure usage-based features in Dashboard
  2. Set usage limits per plan
  3. Track usage in your application

Implementation:

// Track API usage
import { clerkClient } from '@clerk/nextjs/server'

export async function POST(request: Request) {
  const { userId } = await auth()

  // Check current usage
  const user = await clerkClient.users.getUser(userId)
  const currentUsage = user.publicMetadata.apiUsage || 0

  // Check limit
  const { has } = await auth()
  const limit = has({ feature: 'api_calls_1000' }) ? 1000 : 100

  if (currentUsage >= limit) {
    return Response.json({ error: 'Usage limit reached' }, { status: 429 })
  }

  // Increment usage
  await clerkClient.users.updateUserMetadata(userId, {
    publicMetadata: {
      apiUsage: currentUsage + 1
    }
  })

  // Process request
}

Requirements

Clerk Setup:

  • Clerk account with application configured
  • Clerk Billing enabled in Dashboard
  • Next.js 13.4+ with App Router
  • @clerk/nextjs version 5.0+

Stripe Requirements:

  • Stripe account (production or test mode)
  • Stripe publishable and secret keys
  • Products and prices configured in Stripe (synced via Clerk)

Environment Variables:

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...

Dependencies:

{
  "@clerk/nextjs": "^5.0.0",
  "next": "^14.0.0",
  "react": "^18.0.0"
}

Project Structure:

app/
├── pricing/
│   └── page.tsx          # Pricing page with PricingTable
├── subscribe/
│   └── page.tsx          # Checkout flow
├── api/
│   └── webhooks/         # Optional custom webhooks
components/
├── subscription-management.tsx
└── upgrade-prompt.tsx

Security Best Practices

Never Hardcode Credentials:

# ❌ WRONG
STRIPE_SECRET_KEY=sk_live_actual_key_here

# ✅ CORRECT
STRIPE_SECRET_KEY=your_stripe_secret_key_here

Always Use Environment Variables:

// ✅ Read from environment
const stripeKey = process.env.STRIPE_SECRET_KEY
if (!stripeKey) {
  throw new Error('STRIPE_SECRET_KEY not configured')
}

Protect API Routes:

  • Always verify authentication with auth()
  • Check feature entitlements on server-side
  • Validate webhook signatures
  • Use HTTPS in production

Webhook Security:

import { headers } from 'next/headers'
import { stripe } from '@/lib/stripe'

export async function POST(request: Request) {
  const body = await request.text()
  const signature = headers().get('stripe-signature')

  try {
    const event = stripe.webhooks.constructEvent(
      body,
      signature,
      process.env.STRIPE_WEBHOOK_SECRET
    )
    // Process event
  } catch (err) {
    return Response.json({ error: 'Invalid signature' }, { status: 400 })
  }
}

Configuration Files

Clerk Billing Settings (Dashboard):

  • Subscription plans and features
  • Pricing tiers and intervals
  • Trial period configuration
  • Cancellation behavior
  • Invoice settings
  • Payment methods accepted

Stripe Configuration (Synced):

  • Products → Clerk Plans
  • Prices → Clerk Pricing Tiers
  • Customers → Clerk Users
  • Subscriptions → User/Org Subscriptions
  • Payment Methods → Stored automatically

Best Practices

Plan Design:

  • Start with 2-3 clear tiers (Free, Pro, Enterprise)
  • Make feature differences obvious
  • Use clear, benefit-focused names
  • Set appropriate price points
  • Consider annual discounts

User Experience:

  • Show current plan clearly
  • Make upgrading easy (one-click from app)
  • Provide grace period on cancellation
  • Send clear email notifications
  • Display usage limits proactively

Access Control:

  • Always check entitlements server-side
  • Use frontend checks for UX only
  • Implement graceful degradation
  • Show upgrade prompts at relevant moments
  • Don't break existing functionality on downgrade

Pricing Strategy:

  • Price based on value, not cost
  • Use psychological pricing ($29 vs $30)
  • Offer annual plans with discount
  • Consider usage-based for scalability
  • Test pricing with real users

Monetization Approach:

  • Freemium: Free tier + paid upgrades
  • Trial: 7-14 day free trial, then charge
  • Tiered: Multiple plans with different features
  • Usage-based: Pay per API call/user/feature
  • Hybrid: Base fee + usage charges

Integration with Clerk Features

Organizations:

  • Enable organization billing for B2B
  • Set per-seat pricing
  • Allow organization admins to manage billing
  • Track usage at organization level

User Management:

  • Link subscriptions to user accounts
  • Store subscription status in user metadata
  • Use publicMetadata for client-accessible data
  • Use privateMetadata for sensitive billing data

Session Awareness:

  • PricingTable shows current plan when logged in
  • Automatically handles upgrade flows
  • Redirects to login if unauthenticated
  • Preserves intended plan selection

Troubleshooting

Common Issues:

  1. PricingTable not displaying:

- Verify Billing is enabled in Dashboard - Check plans are configured - Ensure Stripe is connected - Verify component import

  1. Payment failing:

- Check Stripe API keys - Verify webhook endpoint - Test with Stripe test cards - Review Stripe Dashboard logs

  1. Access control not working:

- Verify feature slugs match exactly - Check plan includes the feature - Ensure subscription is active - Test both client and server checks

  1. Webhooks not firing:

- Verify webhook URL is correct - Check webhook signing secret - Enable webhook forwarding for local dev - Review Clerk webhook logs

Debugging:

// Log subscription status
const { has, debug } = useAuth()
console.log('Auth debug:', debug)
console.log('Has feature:', has({ feature: 'ai_assistant' }))

Plugin: clerk Version: 1.0.0 Category: Billing & Monetization Skill Type: Integration & Setup

平台分布

Codex

33.65%
按下载量换算23

Claude

32.05%
按下载量换算21

Cursor

18.99%
按下载量换算13

Gemini CLI

10.47%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills