agentsclimarketplace

Stripe

Skill CleanSlice/skills/stripe

CleanSlice agent skills — architecture patterns, vertical slices, conventional commits for Claude Code and AI coding agents.

Install
npx -y skills add CleanSlice/skills --skill stripe

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Stripe API access via a restricted or secret key stored in the per-user secret vault. Exposed to agents as STRIPE_API_KEY.

SKILL.md

2.7 KB, as published. Nobody here has run it

Stripe

Same setup mechanics as [[openai]] — secret-mechanism, vault-backed. This file covers Stripe-specific patterns and safety.


Quick Reference

NeedAnswer
Mechanismsecret
Env varSTRIPE_API_KEY
Where to createdashboard.stripe.com/apikeys
RecommendedRestricted key with only the resources the agent touches

Setting up

  1. Prefer a restricted key (not the secret key). Stripe lets you scope: e.g. read-only on customers + write on refunds.
  2. Use test mode (sk_test_…) until the agent's flows are verified in production.
  3. Admin UI /integrationsStripe → paste the key.

Test and live keys are different accounts in Stripe's API — connect both as separate accountKeys (test, live) so the agent can pick deliberately.


Using the key

const { env } = await integration_secrets({ service: 'stripe' })
const key = env.STRIPE_API_KEY
if (!key) {
  return ctx.send(
    'Stripe isn\'t connected. Open /integrations and add a Stripe key first.',
  )
}

const res = await fetch('https://api.stripe.com/v1/customers', {
  headers: {
    Authorization: `Bearer ${key}`,
    'Stripe-Version': '2024-12-18.acacia',
  },
})

Pick a specific account explicitly when both test and live are connected:

const key = env.STRIPE_API_KEY_TEST  // safer default for dry runs

Safety rails

Charging cards is irreversible — the agent should require explicit confirmation before any mutating call (POST to /v1/charges, /v1/refunds, /v1/transfers).

// Always ask first
await ctx.send(
  `About to refund ${formatMoney(amount)} to customer ${customerId}. Reply "confirm refund" to proceed.`,
)
// ... wait for the user's "confirm refund" message ...
const res = await fetch('https://api.stripe.com/v1/refunds', {
  method: 'POST',
  headers: { Authorization: `Bearer ${key}` },
  body: new URLSearchParams({ charge: chargeId, amount: String(amount) }),
})

For read-only flows (looking up customers, listing subscriptions) the confirmation step isn't needed — just be careful with customer.email filters that match many accounts.


Don't

  • Don't use the master secret key (sk_live_<long>) when a restricted key works.
  • Don't log requests with the Authorization header intact. Filter before logging.
  • Don't fire refunds or charges from autonomous loops — always loop in the user.
  • Don't store webhook secrets in the same vault row. Use a separate accountKey (webhooks) or store them per-agent if they're agent-owned.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.