Stripe Skillのロゴ

Stripe Skill

コミュニティ
zeenie-ai
stripe-skill

Process payments, manage customers, issue refunds, and handle subscriptions via the Stripe CLI. Pass any Stripe command (customers, charges, payment_intents, refunds, invoices, products, prices, subscriptions) and the tool runs it for you and returns parsed JSON.

概要

公開者zeenie-ai
リポジトリOpenCompany
スキル名stripe-skill
スター
912
フォーク
137
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    zeenie-aiがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Stripe Skill」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/zeenie-ai/OpenCompany/tree/main/server/skills/payments_agent/stripe-skill
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zeenie-ai/OpenCompany.git /tmp/OpenCompany
mkdir -p .claude/skills
cp -r /tmp/OpenCompany/server/skills/payments_agent/stripe-skill .claude/skills/stripe-skill
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでStripe Skillを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にStripe Skillを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Stripe Skillは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Stripe Skill

Pass-through over the official Stripe CLI. The tool runs stripe <command> --api-key <stored-key> for you and returns parsed JSON. Every Stripe resource the CLI supports works without code changes — products and prices created tomorrow work the same way.

Tool: stripe_action

Single field: command — a string identical to what you would type after stripe on the terminal.

Schema

FieldTypeRequiredDescription
commandstringYesStripe CLI command (e.g. "customers create --email a@b.com"). Quote arguments that contain spaces.

Response

json
{
  "command": "customers create --email a@b.com",
  "success": true,
  "result": {
    "id": "cus_NkXz123",
    "email": "a@b.com",
    "object": "customer",
    "created": 1730000000,
    ...
  },
  "stdout": "<raw CLI stdout>"
}

On CLI failure the tool raises an error with Stripe's own message (e.g. "No such customer: cus_invalid").

Common commands

Customers

CommandPurpose
customers create --email <addr>Create a customer. Optional: --name, --description, --phone, --metadata key=val.
customers retrieve <cus_id>Fetch a customer by id.
customers list --limit 10List recent customers. Optional: --email <addr> filter.
customers update <cus_id> --email <new>Update fields on a customer.
customers delete <cus_id>Permanently delete a customer.

Search:

CommandPurpose
customers search --query "email:'a@b.com'"Server-side search across customers. Stripe Search query syntax.

PaymentIntents (recommended for charges)

CommandPurpose
payment_intents create --amount 2000 --currency usdCreate a PaymentIntent for $20.00. Amount is in the smallest currency unit (cents for USD).
payment_intents create --amount 2000 --currency usd --customer cus_123Create attached to a saved customer.
payment_intents create --amount 2000 --currency usd --confirm --payment-method pm_card_visaCreate + confirm in one shot (most common test path).
payment_intents retrieve pi_123Fetch by id.
payment_intents list --limit 20List recent intents.
payment_intents cancel pi_123Cancel an unconfirmed or processing intent.

Charges (legacy direct-charge path)

CommandPurpose
charges retrieve ch_123Fetch a charge by id.
charges list --limit 10List recent charges.
charges list --customer cus_123List charges for a specific customer.

For new integrations prefer PaymentIntents over direct charges create — Stripe deprecated raw card-token charge creation.

Refunds

CommandPurpose
refunds create --payment-intent pi_123Refund a PaymentIntent in full.
refunds create --payment-intent pi_123 --amount 500Partial refund (in smallest currency unit).
refunds create --charge ch_123Refund by charge id (older flow).
refunds retrieve re_123Fetch a refund by id.
refunds list --limit 10List recent refunds.

Invoices & Subscriptions

CommandPurpose
invoices create --customer cus_123Draft an invoice.
invoices finalize_invoice in_123Finalize a draft (locks for sending/charging).
invoices pay in_123Charge the customer for a finalized invoice.
invoices list --customer cus_123List invoices for a customer.
subscriptions create --customer cus_123 --items='[{"price":"price_xxx"}]'Create a subscription.
subscriptions retrieve sub_123Fetch a subscription.
subscriptions cancel sub_123Cancel immediately.
subscriptions update sub_123 --cancel-at-period-end trueCancel at end of current billing period.

Products & Prices

CommandPurpose
products create --name "Pro Plan"Create a product.
prices create --product prod_123 --unit-amount 2000 --currency usd --recurring='{"interval":"month"}'Create a recurring price tied to a product.
prices list --product prod_123List prices for a product.

Trigger (synthetic test events)

CommandPurpose
trigger payment_intent.succeededFire a synthetic PaymentIntent succeeded event.
trigger charge.refundedFire a synthetic refund event.
trigger customer.subscription.createdFire a synthetic subscription event.

stripe trigger is invaluable for testing webhook flows — it sends the event to Stripe, which sends it back through the same stripe listen daemon and into your stripeReceive trigger node.

Common workflows

Create a customer and charge them

json
{ "command": "customers create --email rosy@sparrow.com --name 'Rosy Sparrow'" }

returns cus_…. Then:

json
{ "command": "payment_intents create --amount 2000 --currency usd --customer cus_xxx --payment-method pm_card_visa --confirm" }

Refund the most recent payment for a customer

json
{ "command": "payment_intents list --customer cus_123 --limit 1" }

read data[0].id, then:

json
{ "command": "refunds create --payment-intent pi_xxx" }

Set up a recurring subscription

json
{ "command": "products create --name 'Pro Plan'" }     -> prod_xxx
{ "command": "prices create --product prod_xxx --unit-amount 2000 --currency usd --recurring='{\"interval\":\"month\"}'" }   -> price_xxx
{ "command": "subscriptions create --customer cus_xxx --items='[{\"price\":\"price_xxx\"}]'" }

Quoting and escaping

The command string is parsed with shlex.split before being handed to stripe. Use single quotes for arguments that contain spaces:

You want to sendType this in command
--name=Acme Inccustomers create --name 'Acme Inc'
metadata with spacescustomers update cus_x --metadata 'plan=Acme Pro'
a JSON array as a flag valuesubscriptions create --items='[{"price":"price_xxx"}]'

JSON inside --items / --recurring etc. should be a single quoted JSON string with no internal spaces — the CLI parses it on the server side.

Idempotency

For any create/charge that you don't want to duplicate on retry, add an idempotency key:

customers create --email a@b.com -H "Idempotency-Key: order_42_user_7"

The CLI accepts custom headers via -H. Stripe deduplicates by the key for 24 hours.

Test mode vs live mode

The stored API key (set in the Credentials Modal) determines mode:

Key prefixModeEffect
sk_test_…TestFake money, fake events, no real charges. Always use this for development.
sk_live_…LiveReal money. Real customers. Use only after thorough testing.
rk_test_… / rk_live_…RestrictedScoped permissions; recommended for production agents that don't need full account access.

The CLI reports livemode: true/false on every response object so you can verify which environment a result is from.

Errors

Stripe returns structured errors that surface in the tool's error field. Common ones:

Error codeMeaningRecovery
resource_missingThe id you passed doesn't existVerify the id; list to find the right one
card_declinedCard payment failedUse a different --payment-method; in test mode try pm_card_visa
invalid_request_errorWrong / missing argumentCheck stripe <resource> create --help
authentication_required3DS challenge neededUse a setup_intent or off-session payment_method
rate_limit_errorToo many requestsPause and retry; Stripe rate limit is 100/sec in live, 25/sec in test

The CLI's stderr always contains the Stripe request id (req_…) — include it when reporting issues.

Webhooks (stripeReceive trigger)

When the Stripe daemon is connected (Credentials Modal → Stripe → Connect), every event Stripe sends is forwarded to OpenCompany and delivered to any active stripeReceive trigger nodes after HMAC-SHA256 signature verification (Stripe-Signature header).

To test event delivery without making real payments, use the trigger command above. Events fire through the same path as real ones.

Filters on the trigger node (event_type_filter):

FilterMatches
allevery event
charge.succeededexact match
charge.*every charge.* event (succeeded, refunded, failed, …)
payment_intent.*every PaymentIntent event

The trigger output mirrors Stripe's event shape: event_id, event_type, created, livemode, api_version, request_id, account, data.

Authentication — stripe login (browser OAuth)

Authentication is delegated entirely to the Stripe CLI. There is no API key to paste into OpenCompany. The Credentials Modal's Login with Stripe button drives the CLI's two-step machine-friendly login:

  1. Browser-side: the modal opens https://dashboard.stripe.com/stripecli/auth/... in a new tab and shows a verification code. The user signs in to Stripe and confirms the code.
  2. CLI-side: the CLI polls Stripe until the user authorises, then writes credentials (one restricted key per mode, valid for 90 days) to ~/.config/stripe/config.toml (or $XDG_CONFIG_HOME/stripe/config.toml).
  3. OpenCompany-side: when login completes, the listen daemon starts automatically and captures the webhook signing secret.

After login, every stripe … command run via this tool reads its credentials from the CLI's config file — no --api-key flag in any command you'd type.

Logout (Credentials Modal → Disconnect) stops the listen daemon and runs stripe logout --all to clear the config file.

Best practices

  1. Restricted keys are auto-issued. When you stripe login, the CLI generates restricted keys with CLI-appropriate scopes (one per test/live mode) — you don't pick scopes manually.
  2. Default to test mode for development. The CLI distinguishes modes; livemode: true/false is on every response.
  3. Add idempotency keys to all create operations. Especially for charges and refunds — accidental retry without a key duplicates the charge.
  4. Quote string arguments with spaces (--name 'Acme Inc').
  5. Use PaymentIntents, not raw charges for new integrations.
  6. Surface Stripe error messages verbatim to the user. They are precise and actionable; don't paraphrase them.
  7. Don't include --api-key in your command string. The CLI already has stored credentials; an inline --api-key overrides them and risks key leakage in process listings and logs.

Setup checklist

  1. Stripe CLI binary — auto-downloaded on first Login with Stripe click if not already on PATH. Resolution order:
    • System install (brew install stripe/stripe-cli/stripe, scoop install stripe, apt install stripe, or a direct binary from https://stripe.com/docs/stripe-cli#install).
    • OpenCompany package cache at <DATA_DIR>/packages/stripe/bin/stripe[.exe] (populated automatically from GitHub releases — pinned to a known-good CLI version).
  2. Credentials Modal → Stripe → Login with Stripe → a browser tab opens to the Stripe Dashboard with a pairing code. Authorise. The modal flips to "Connected" when the CLI's login --complete subprocess returns and the listen daemon spins up (webhook_secret_captured: true).
  3. The Stripe action node is connected to your agent's input-tools handle.
  4. (For webhook flows) A stripeReceive trigger node is wired into your workflow with the event-type filter you care about.

よくある質問

AIスキル「Stripe Skill」では何ができますか?

Process payments, manage customers, issue refunds, and handle subscriptions via the Stripe CLI. Pass any Stripe command (customers, charges, payment_intents, refunds, invoices, products, prices, subscriptions) and the tool runs it for you and returns parsed JSON.

TypingMindでStripe Skillを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Stripe Skillはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにStripe Skillをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/zeenie-ai/OpenCompany/tree/main/server/skills/payments_agent/stripe-skillを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Stripe Skillを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Stripe Skillで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもStripe Skillを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Stripe Skill」は無料ですか?

はい。zeenie-aiがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇