跳到正文
Skillpedia
API 与服务器(后端)20k · #10463

Stripe

它能做什么

查询并管理 Stripe 的账单数据,例如订阅、收入、客户、发票和退款。它适用于通过 Stripe 收款的创始人和开发者。

适用场景

  • ✓当你想知道订阅者数量或每月经常性收入的时候。
  • ✓当你需要创建优惠券、付款链接或退款的时候。
  • ✓当你想查询某位客户、发票或付款的时候。

技能链接

https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/Stripe/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/Stripe/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我们现在有多少活跃订阅者?本月的每月经常性收入是多少?”

每周 5 个新技能,1 分钟读完。

工作原理

该技能使用你设置的账户密钥调用 Stripe,并检查每个数字是否来自你指定的账户。统计前它会读取列表的每一页,并且未经你批准不会做任何更改。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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

Intent Trigger File
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
File Read when
Setup.md first-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.

Account Env var Format Notes
Main (default) STRIPE_SECRET_KEY sk_live_* Used when no alias is given
Additional STRIPE_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 `f

常见问题

它会自行更改我的账单吗?

不会。每次写入都需要你明确批准,且该技能会报告它更改的对象。

如果我有多个 Stripe 账户怎么办?

每次调用都会指定其账户密钥,因此数字来自你所指的账户。

密钥保存在哪里?

密钥从你的环境文件中加载,从不会被打印或写入该技能中。

详情

作者的原始描述

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.

repo: danielmiessler/LifeOS

热度

GitHub 星标
20k
排名
#10463
许可证
MIT
更新时间
2026/10/28

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能