Token导航 LogoToken导航TokenDH.com
开发规范敏感数据github未标认证来源可访问许可证需确认审计提醒

stripe-best-practicesStripe 最佳实践

Agent Skill

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

总安装

282

周安装

12

GitHub Stars

公开资料未说明

下载量

99
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:stripe-best-practices(Stripe 最佳实践)
来源仓库:https://github.com/getpaykit/skills
仓库路径:skills/stripe-best-practices
安装命令:
npx skills add https://github.com/getpaykit/skills --skill stripe-best-practices
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/getpaykit/skills --skill stripe-best-practices

简介

stripe-best-practices 用于处理 GitHub 仓库、Issue 和 Pull Request 协作信息。

  • 适合围绕仓库状态、代码变更或协作事项进行整理与分析。
  • 通过 GitHub 仓库安装,支持 Codex、Claude 等平台使用。
  • 建议在使用前确认权限范围和维护状态,防范潜在风险。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Stripe Provider

Connect PayKit to Stripe with @paykitjs/stripe.

Setup

1. Install the provider

pnpm add @paykitjs/stripe

2. Get your Stripe keys

From the Stripe Dashboard:

  • Secret key (sk_test_... or sk_live_...)
  • Webhook signing secret (whsec_...), created when you add a webhook endpoint

3. Add environment variables

STRIPE_SECRET_KEY="sk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."

4. Configure the provider

import { createPayKit } from "paykitjs"
import { stripe } from "@paykitjs/stripe"

export const paykit = createPayKit({
  // ...
  provider: stripe({
    secretKey: process.env.STRIPE_SECRET_KEY!,
    webhookSecret: process.env.STRIPE_WEBHOOK_SECRET!,
  }),
})

Syncing Plans to Stripe

After defining or changing plans, sync them:

npx paykitjs push

This creates/updates in Stripe:

  • Products: one per plan
  • Prices: one per plan with pricing

Check sync status:

npx paykitjs status

Note: Always run push after modifying plans. PayKit won't auto-sync on startup.


Webhook Setup

PayKit processes Stripe webhooks through its route handler. Configure Stripe to send webhooks to:

https://your-domain.com/paykit/api/webhook

Required Stripe webhook events

PayKit needs these events enabled in your Stripe webhook endpoint:

  • checkout.session.completed
  • customer.subscription.created
  • customer.subscription.updated
  • customer.subscription.deleted
  • invoice.paid
  • invoice.payment_failed

Local development

Use the Stripe CLI to forward webhooks locally:

stripe listen --forward-to localhost:3000/paykit/api/webhook

The CLI outputs a webhook signing secret (whsec_...). Use this as STRIPE_WEBHOOK_SECRET in development.


Customer Portal

Stripe's Customer Portal lets customers manage their billing. PayKit provides a wrapper:

Server-side:

const { url } = await paykit.customerPortal({
  customerId: "user_123",
  returnUrl: "https://example.com/billing",
})

// Redirect user to url

Client-side:

await paykitClient.customerPortal({
  returnUrl: window.location.href,
})

Configure the Customer Portal appearance and features in the Stripe Dashboard.


How PayKit Uses Stripe

PayKit maps its concepts to Stripe objects:

PayKitStripe
CustomerCustomer
PlanProduct
Plan pricePrice
SubscriptionSubscription
Checkout flowCheckout Session

PayKit stores its own records in your PostgreSQL database and keeps them in sync with Stripe via webhooks.


Test vs Live Mode

Use Stripe test keys (sk_test_...) during development. Switch to live keys (sk_live_...) for production.

PayKit doesn't distinguish between modes. It follows whatever key you provide.

Test cards: Use Stripe's test card numbers to simulate payments:

  • 4242 4242 4242 4242 succeeds
  • 4000 0000 0000 0002 declines

Troubleshooting

ProblemFix
Webhooks not arrivingVerify endpoint URL matches basePath + /api/webhook
Webhook signature failsCheck STRIPE_WEBHOOK_SECRET matches the endpoint's signing secret
Plans not in StripeRun npx paykitjs push
Checkout redirects to wrong URLCheck successUrl and cancelUrl in subscribe()
Customer Portal not configuredSet it up in Stripe Dashboard > Settings > Billing > Portal
Local webhooks not workingRun stripe listen --forward-to localhost:3000/paykit/api/webhook

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.18%
按下载量换算35

Claude

30.47%
按下载量换算30

Cursor

20.21%
按下载量换算20

Gemini CLI

8.82%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills