跳到正文
cccskills
免费在 GitHub 公开中文介绍

Stripe

查询 Stripe 中的商品、价格、订阅、客户、付款、退款和优惠券,汇总收入与每月经常性收入(MRR),查看指定账户记录,并仅在你明确批准后执行账单变更。

原文查看原文说明

Runs Stripe billing operations via the Stripe SDK and, when configured, an admin dashboard's cached endpoints: products, prices, subscriptions, MRR and revenue, customers, payments, refunds, coupons, disputes. USE WHEN Stripe, subscriptions, billing, MRR, revenue, customers, invoices, refund, coupon, payment link, charges, subscriber count, earnings. NOT FOR newsletter-platform subscribers billed outside Stripe.

danielmiessler/LifeOS星标 19,635(GitHub 19,635 + cccskills 0)
集成工具Stripe

实测评分 未实测

查看安装方法

适用场景

  • 查看商品和价格列表
  • 查询订阅人数与状态
  • 汇总 MRR、收入或退款
  • 获批后取消订阅或退款

中文介绍

功能

查看 Stripe 账户中的商品、价格、订阅、客户、付款、发票、退款和优惠券等记录,并回答相关问题或协助处理账单事务。可以汇总收入、每月经常性收入(MRR)和订阅人数。配置了多个账户时,会查询你指定账户的数据。若已设置管理后台缓存,可用缓存快速查看概况;详细核查和操作则使用 Stripe SDK。退款、取消订阅以及创建或修改商品和价格等写入操作,都必须先得到你的明确批准。

适用场景

需要了解订阅数量、近期收款、月收入或优惠券时,可以使用此技能。你也可以提出账单操作请求,在批准执行后查看生成或更新的 Stripe 对象。由 Stripe 以外的邮件简报服务管理的订阅者不在处理范围内。

使用示例

  • “列出主账户中有效的促销代码。”
  • “在客户 X 的年度订阅到期时取消续订。”
  • “查看当前 MRR 和最近三个月的收入。”

注意事项

首次设置需要 Config.md、可使用 Stripe SDK 的工作目录、API 版本,以及各账户对应的环境变量。必要配置缺失时,技能会停止处理。密钥值不会被显示或写入代码。读取数据需要访问 Stripe API;变更操作还需要具有相应权限的密钥和你的明确批准。管理后台缓存可能延迟数分钟。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

文档检查

AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。

安全性发送数据、删除文件、执行命令等是否有说明
B部分不足不显示密钥且写入需批准,但也会运行任意代码。
安装难易度所需工具和 API 密钥是否少且有说明
B部分不足需要 Config.md、SDK目录、API版本和账户密钥环境变量。

不计入评分。 由 AI(OpenAI Codex)于 2026年10月28日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(8)

  • SKILL.md8.8 KB
  • Intents/Customers.md1.8 KB
  • Intents/ListProducts.md2.6 KB
  • Intents/Manage.md7.5 KB
  • Intents/Payments.md1.6 KB
  • Intents/Revenue.md6.0 KB
  • Intents/Subscriptions.md2.4 KB
  • Setup.md7.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Stripe Billing Operations

Contents: Ideal State · Intent Routing · Data & Config · Tool contract · Gotchas · Examples

Answers and acts on Stripe billing questions: promotion codes and coupons, products and prices, subscriptions and subscriber counts, MRR and revenue, customers, payments, invoices, refunds and payment links, across one main account and any number of additional ones. With more than one Stripe account, using the wrong key returns wrong numbers silently, so every call names the account's key.

Ideal State

  • Every figure comes from the account the user meant, through that account's env var, with keys loaded from ~/.claude/.env and never printed or hardcoded; a missing Config.md or STRIPE_SDK_DIR stops the run with a pointer to Setup.md instead of a guess.
  • Counts and revenue cover every page of the list they come from, and historical views keep canceled and churned subscriptions and attribute every row to a product.
  • No write reaches Stripe without the user's explicit approval, and every write reports the resulting object back.

Intent Routing

IntentTriggerFile
ListProducts"products", "what products", "list products"Intents/ListProducts.md
Subscriptions"subscriptions", "subscribers", "how many subscribers"Intents/Subscriptions.md
Revenue"revenue", "MRR", "how much", "earnings", "income"Intents/Revenue.md
Customers"customers", "customer list", "who subscribes"Intents/Customers.md
Payments"payments", "recent payments", "charges"Intents/Payments.md
Manage"promotion codes", "promo code", "find a coupon", "create product", "create price", "change the price", "cancel", "refund", "coupon", "invoice", "payment link"Intents/Manage.md
FileRead when
Setup.mdfirst-time setup: Config.md, STRIPE_SDK_DIR, the per-account key env vars, and the check that it works

Data & Config

Account-specific values — the SDK working directory (STRIPE_SDK_DIR), account aliases and their env var names, product and price IDs, product domains, invoicing practice, and the optional admin-dashboard endpoints — live in LIFEOS/USER/CUSTOMIZATIONS/SKILLS/Stripe/Config.md. First-time setup is in Setup.md. Secrets are env-var names only, values in ~/.claude/.env. The skill body is generic.

When Config.md is missing, or it names no STRIPE_SDK_DIR, stop, say so, and point the user at Setup.md. Never guess an SDK directory, an account, or a product list.

AccountEnv varFormatNotes
Main (default)STRIPE_SECRET_KEYsk_live_*Used when no alias is given
AdditionalSTRIPE_SECRET_KEY_<ALIAS>sk_live_* or restricted rk_live_*Config.md's Accounts table maps each alias to its env var
  • Test mode: a test-mode key (sk_test_*) is its own row in the Accounts table, for example alias test with STRIPE_SECRET_KEY_TEST, used as --account test.
  • SDK: stripe npm package (v20+), called with the API version Config.md names (the preamble below passes it).
  • Admin dashboard (optional): if Config.md names an admin dashboard that serves cached Stripe endpoints (its base URL, the endpoint list and what each returns), prefer those for fast overview answers: customer and subscription totals, MRR, products with subscriber counts, monthly revenue, recent payments. Treat the cache as possibly minutes old and say so when freshness matters. With no dashboard configured, answer from the SDK; nothing else in this skill depends on it.

Tool contract

Reads go through the read-only CLI first: bun ~/.claude/LIFEOS/TOOLS/StripeRead.ts promos | coupons | products | prices | subs | customer <email> | balance | get <v1 path> [k=v…] (--account <alias> for an additional account). It is a single plain command with no write path, so it runs wherever a shell command can, including unattended sessions. The inline cd … && bun --env-file … -e script below is arbitrary code, and a harness that asks before running such code will stop on it when nobody is there to approve, so use it only for writes and anything the CLI can't express, such as the computed reports in each intent. Two limits of the CLI, from its code: products and prices return active objects only, and every list stops at 1,000 rows, so a count of exactly 1,000 is a floor and needs fetchAll below.

Writes and computed reports run inside this preamble. Fill its two <…> values from Config.md before running it: the SDK folder (STRIPE_SDK_DIR, a directory where the stripe npm package is installed, with a leading ~ written as $HOME) and the API version (STRIPE_API_VERSION). bun -e resolves the SDK from that folder. If Config.md lacks either, stop and point at Setup.md. Each intent's Tool contract gives the body that replaces the last two lines.

cd "<STRIPE_SDK_DIR from Config.md>" && bun --env-file ~/.claude/.env -e "
import Stripe from 'stripe';
const API_VERSION = '<STRIPE_API_VERSION from Config.md>';
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, { apiVersion: API_VERSION });

async function fetchAll(listFn, params = {}) {
  const items = [];
  let hasMore = true;
  let startingAfter;
  while (hasMore) {
    const batch = await listFn({ limit: 100, ...params, ...(startingAfter ? { starting_after: startingAfter } : {}) });
    items.push(...batch.data);
    hasMore = batch.has_more;
    if (batch.data.length > 0) startingAfter = batch.data[batch.data.length - 1].id;
  }
  return items;
}

const result = await stripe.METHOD;
console.log(JSON.stringify(result, null, 2));
"

For an additional account the key line becomes const stripe = new Stripe(process.env['<ENV VAR>'], { apiVersion: API_VERSION });, with <ENV VAR> taken from that alias's row in Config.md's Accounts table, never built from the alias by hand. The read-only CLIs (StripeRead.ts, InvoiceWatch.ts) resolve --account <alias> to STRIPE_SECRET_KEY_<ALIAS in capitals>, so name each additional key that way. Bun's --env-file loads the configured key into the process without reading or printing the secret in shell. A restricted key (rk_live_*) allows only the scopes granted on it: read operations work; write operations (create/refund/cancel) fail unless that scope was granted.

Gotchas

  • Daily product attribution must follow realized balance activity, not MRR. Join each charge/refund/dispute balance transaction to its charge, then invoice or Checkout line items, price, and product; allocate multi-product invoices proportionally and retain unmatched activity as Unattributed. Report gross, refunds/adjustments, Stripe fees, and net using day boundaries in the timezone recorded in Config.md.
  • Invoice-generated charges may return invoice: null. In recent API versions, a charge can expose only a description such as Invoice ABCD1234-0001. Recover the invoice with /v1/invoices/search by exact invoice number, then resolve lines.data[].pricing.price_details.product. Do not use the invoice description itself as the product name. Nested expansion of lines.data.pricing.price_details.product may be rejected; plain invoice retrieval already returns the product ID, which can be retrieved separately.

Examples

User: "list active promotion codes in the main account"
→ Manage intent, read-only
→ A table of every active code with its coupon terms, redemptions and expiry
User: "cancel the annual subscription for customer X at period end"
→ Manage intent
→ After approval, the subscription shows cancel_at_period_end and the date access ends
User: "what's the MRR looking like?"
→ Revenue intent
→ MRR and ARR from every active subscription, labelled active-only and list price before discounts, with the count of discounted subscriptions, plus three months of gross, refunds, fees and net

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

AnnualReports

免费有简介

按类别或厂商查找并获取网络安全报告,比较威胁、勒索软件、数据泄露、云安全和AI趋势。分析会注明每项数据的厂商、年份及报告,并分别呈现来源间的分歧。

  • 按类别查找威胁报告
  • 获取指定厂商的报告
  • 比较多家厂商的勒索软件趋势
danielmiessler/LifeOS2万2026年10月28日 更新

ApertureOscillation

免费有简介

通过三轮分析,对比单个功能或组件的设计需求与整个系统的目标,梳理两者的冲突、合适的实现范围,以及方案是否符合整体方向。

  • 判断服务或库是否应拆分
  • 比较功能需求与产品方向
  • 检查新组件是否符合现有系统
danielmiessler/LifeOS2万2026年10月28日 更新

Aphorisms

免费有简介

按文章主题寻找格言或引文,按相关程度排序,并附上作者和推荐理由。可添加带出处的引文、按主题研究思想家的言论、整理使用记录,帮助避免重复引用。

  • 为新闻简报寻找引文
  • 保存有出处且不重复的引文
  • 按主题研究思想家的言论
danielmiessler/LifeOS2万2026年10月28日 更新

Art

免费有简介

按用途选择制作流程,生成博客插图、技术图解、比较图、漫画和图标等视觉内容,并输出供预览的图像。

  • 制作博客标题图
  • 解释系统结构
  • 展示比较或时间线
danielmiessler/LifeOS2万2026年10月28日 更新

ArtDirection

免费有简介

依据简报和制作标准评估图片、影片、幻灯片及网站页面截图,由视觉评审给出评分和缺陷优先级,支持有限轮次的修改;通过评审后才能交付,并可记录人工评分供后续校准。

  • 按优先级整理图片修改项
  • 依标准评估影片或幻灯片
  • 发布前检查视觉效果
danielmiessler/LifeOS2万2026年10月28日 更新

ArXiv

免费有简介

按主题、研究领域或论文编号查找 arXiv 论文,并整理标题、作者、摘要和链接;查看新投稿,也可在有内容时获取 AlphaXiv 的人工智能生成概述。

  • 查看人工智能和机器学习新论文
  • 查找特定主题的论文
  • 按论文编号或 arXiv 网址查询
danielmiessler/LifeOS2万2026年10月28日 更新

查看 danielmiessler 的全部技能

报告此技能的问题