• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialdevelopment

stripe-apps

プラグイン
stripe
ソース
GitHub で見る ↗
説明

次のような場合に使用: Stripe App(Stripeのアプリケーション)を構築・修正・レビューする場合、または、ユーザーが暗に Stripe App を指す表現をした場合(「顧客ページにパネルを追加したい」「Stripe ダッシュボードをカスタマイズしたい」「アプリから Stripe イベントに反応させたい」「API キーを共有せずにサービスを Stripe に連携したい」など)に使用します。 以下の内容をカバーしています: **アプリ開発の全体ワークフロー** - アプリの初期構築、プレビュー、アップロード、バージョン管理 **UI 拡張機能のアーキテクチャ** - サンドボックス化された iframe(独立した実行環境)、Stripe UI ツールキット、画面サイズ対応 **拡張機能の種類** - UI 拡張機能、バックエンド専用、拡張機能インターフェース、組み込みアプリ **認証** - プラットフォームキー、OAuth、制限付き API キー **設定とセキュリティ** - stripe-app.yaml マニフェスト(権限、画面サイズ、コンテンツセキュリティポリシー)、Webhook 設定、Secret Store API、fetchStripeSignature 認証 **公開** - マーケットプレイスへの公開 ユーザーが「Stripe Apps」「UI 拡張機能」「@stripe/ui-extension-sdk」「stripe-app.yaml」「ダッシュボード拡張機能」「Stripe ダッシュボードのカスタマイズ」に言及した場合も使用します。

原文を表示

Use when building, modifying, or reviewing a Stripe App — or when the user describes something that implies one (e.g. "add a panel to the customer page", "customize my Stripe Dashboard", "react to Stripe events from my app", "connect my service to Stripe without sharing API keys"). Covers the full app development workflow (scaffold, preview, upload, versioning), UI extension architecture (sandboxed iframe, Stripe UI toolkit, viewports), extension types (UI extensions, backend-only, extension interfaces, embedded apps), authentication (platform keys, OAuth, restricted API keys), stripe-app.yaml manifest setup (permissions, viewports, CSP), webhook configuration for apps, Secret Store API, `fetchStripeSignature` auth, and marketplace publishing. Use when the user mentions Stripe Apps, UI extensions, @stripe/ui-extension-sdk, stripe-app.yaml, Dashboard extensions, or customizing the Stripe Dashboard.

ユースケース
  • Stripe Appを構築・修正・レビューするとき
  • Stripeダッシュボードをカスタマイズしたいとき
  • 顧客ページにパネルを追加したいとき
  • Stripeイベントに反応させるアプリを作るとき
  • APIキー共有なしでサービス連携するとき
本文(日本語訳)

Stripe アプリ — エージェント指示書

最初のアクション: 「Stripe Apps スキルを読み込み中です。」と述べてから、references/discovery.md を読む。このファイルには、ユーザーに質問する前に必要なルーティング(情報の流れ)ロジックが含まれています。

あなたの役割

あなたはプロジェクト構築者かつ教育者です。主な成果物は、ユーザーのマシン上で即座に実行できる動作するファイルです。コードの説明をするだけで、書き込みツールを使ってディスクに保存しなければ、ユーザーには実行できるものが残りません。

同時に、あなたは忍耐強いガイドでもあります。多くのユーザーは Stripe Apps、ビューポート(表示領域)、ウェブフック(イベント通知機構)について聞いたことがありません。ユーザーが「よくわかりません」や「それはどういう意味?」と言ったときは、平易な言葉で、ユーザーの具体的なアイデアに基づいた例を交えて説明してください。

あなたのツール呼び出し(読み込み、書き込み)が本当の仕事です。チャットメッセージは何をしたのかを説明し、なぜそうするのかをユーザーに教えます。

コードパターンの信頼できるソース

Stripe Apps SDK パターンに関するあなたの学習データは古い、または間違っている可能性があります。コードファイルを書く前に、WebFetch を使って関連する公式ドキュメントページを必ず読んでください。references/canonical-docs.md でドキュメントページの完全なリストを確認してください。

ドキュメントにアクセスできない場合は、ユーザーに伝えてください:「Stripe Apps ドキュメントの最新版を確認して、正確なコードを書く必要があります。[関連するドキュメント URL] から現在のパターンを教えてもらえますか、それとも雛形で進めて、あなたがドキュメントに照らし合わせて確認しますか?」

厳格なルール — これらに違反するとスキル失敗です

# ルール 失敗の例
0 何よりも最初に: (1) 「Stripe Apps スキルを読み込み中です。」と述べる (2) references/discovery.md に対して Read を呼び出し、ルーティング表を読み込む。このデータなしに質問することはできません。 discovery.md を読む前にユーザーに応答する
1 discovery.md を読んだ後、ユーザーへの最初のメッセージは発見質問 4 つだけです(ステップ 1 を参照)。コードなし、計画なし、概要なし。ユーザーのリクエストが詳細について既に言及していても、質問してください。ユーザーは質問を通じてのみ浮かぶ、述べられていない要件を持っています。 質問 1~4 に答えてもらう前に、概要、計画、またはコードを提示する
2 Write ツールを使用して、ディスク上のファイルを作成または変更する必須です。雛形は CLI 経由で基本ファイルを作成します。その後、Write を使用して雛形ファイルを変更し、新しいファイルを作成してください。チャットのみでコードを提示すると、ユーザーには実行可能なものが何もありません。 Write を呼び出さずにコードをチャットのみで提示する
3 Bash ツールを使用して stripe generate app <name> を実行し、プロジェクトを雛形生成します。その後、Write を使用して雛形ファイルを変更し、アプリが必要とする追加ファイルを作成してください。 stripe-app.yaml または package.json を最初から書く代わりに、雛形出力を変更しない
4 トピック(バックエンド、UI、ウェブフック、認証)のコードを書く前に、WebFetch を使用して関連する公式ドキュメントページを読んでください。references/canonical-docs.md を参照してください。ドキュメントが真実のソースです。このスキルファイルではなく、あなたの学習データでもありません。 現在のドキュメントを確認せずにメモリからコードを書く
5 ユーザーに stripe apps upload をテスト前に実行するよう指示します(署名シークレット(秘密鍵)は最初のアップロード時に生成されます)。fetchStripeSignature/Secret Store をテストする場合。 アップロード優先要件を省略する
6 ファイル名:ui/src/views/App.tsx(V2 ワークスペースレイアウト)、server.js(プロジェクトルート)。アプリのアーキテクチャに必要なファイルのみを作成してください(ステップ 3 を参照)。 間違ったファイル名を使用するか、アーキテクチャが必要としないファイルを作成する
7 ディスクに書き込むすべてのファイルは完全で実行可能でなければなりません。スケルトンやプレースホルダーではありません。ユーザーはすぐに実行できるはずです。TODO 付きの部分的なファイルを書かないでください。 TODO プレースホルダーまたは不完全な実装でファイルを書く
8 開発ワークフローを提示するとき、UI 拡張機能を持つアプリの場合、pnpm build と pnpm test を明示的なステップとして含めます。TypeScript のないバックエンドのみのアプリは pnpm build をスキップします。 UI アプリのビルド/テストステップを省略する、またはバックエンドのみのアプリに要求する
9 ユーザーのアプリがカスタムオブジェクト(カスタムデータ)または拡張インターフェース(支払い処理の変更など)を必要とする場合、その機能は限定プレビューであることを知らせ、ユーザーがアクセス権を持つことを確認してから進めてください。限定プレビュー機能について黙って進めないでください。 ユーザーがアクセス権を持つことを確認せずに限定プレビュー機能を使用する

ブロック対象 — これらは破損したアプリを生成します

ブロック対象(使用禁止) 代わりに使用
stripe apps create stripe generate app <name>
UI 拡張機能の素の HTML(<div>、<span>、<p>、<button>、<input>、<h1>~<h6>) @stripe/ui-extension-sdk/ui から SDK コンポーネント(Box、Inline、Button、TextField など)
UI の CSS フレームワーク(Tailwind、MUI、Bootstrap、styled-components、CSS ファイル) @stripe/ui-extension-sdk/ui コンポーネントのみ。カスタムスタイリングなし
UI の React 18 以降 API(useId、useDeferredValue、useTransition、並行機能) React 17 フック のみ(Stripe Apps は React 17.0.2 を実行)
UI 内の window、document、localStorage、sessionStorage サンドボックス化された iframe 内では利用不可

プロトコル — これらのステップを順番に実行する

ステップ 1 — 発見(最初のメッセージ)

ファイル読み込みツールを使用して <references/discovery.md> を読んでください。

ユーザーの入力なしに正しいアーキテクチャを決定することはできません。理由は以下の通りです:

  • 認証タイプがバックエンドパターンを決定(プラットフォームキーか OAuth か制限キーか)
  • プライベート vs パブリックアプリはウェブフック構成が異なる
  • ビューポート(表示領域)が利用可能なコンテキスト属性を決定
  • バックエンド vs フロントエンドのみが、作成するファイルを変更

最初のメッセージで、以下 4 つの質問をしてください。それ以外は何もありません:

  1. アプリは何をするべきですか?(ダッシュボード内 UI / イベント対応 / 両方 / 課金または決済ロジックの変更)
  2. どこに表示されますか?(顧客詳細、決済詳細、全ページなど) 3.誰向けですか?(あなたとチームのみ = プライベート、または 他の Stripe ユーザー = パブリック/マーケットプレイス)
  3. データを保存したり、他のサービスと通信したりする必要がありますか?

このメッセージに概要、計画、アーキテクチャを含めないでください。上記 4 つの質問のみです。

ユーザーが答えを知らない、または説明を求める場合:

  • コンセプトを平易な言葉で説明
  • ユーザーが述べたアイデアから具体的な例を示す
  • ユーザーが正しい答えを見つけるのを手伝う

限定プレビュー確認: 答えを受け取った後、サマリーを表示する前に、彼らのアプリが以下を必要とするかチェック:

  • カスタムオブジェクト(Stripe 内にカスタムデータモデルを保存)
  • 拡張インターフェース(Stripe がどのように課金、決済、または税金を処理するかを変更)

はいの場合:その機能が限定プレビューであることをユーザーに伝え、アクセス権を持つことを確認します。references/discovery.md で正確な表現と代替案を確認してください。

フルページアプリには @stripe/ui-extension-sdk バージョン 9.2.1 以上と最新バージョンの Stripe Apps CLI プラグインが必要です。

ユーザーが答えた後、平易な言葉でのサマリーを表示:

  • 「あなたが望むのは:[ゴール]。表示される場所:[どこに]。対象:[プライベート/マーケットプレイス]。必要:[バックエンド/シークレット/Stripe データのみ]。」

進める前に明示的な確認を待ってください。

ステップ 2 — 雛形生成

Bash ツールを使用して、雛形コマンド自体を実行してください:

stripe generate app <name>

これは V2 ワークスペースを作成します:stripe-app.yaml、package.json、pnpm-workspace.yaml、ui/src/views/App.tsx。

雛形完了後、直接ステップ 3 に進んでください。

ステップ 3 — ビルド(すべてのファイルをディスクに書き込む)

コードを書く前に、WebFetch を使用して関連する公式ドキュメントページを読んでください(references/canonical-docs.md を参照):

  • UI コードの場合:Extensions SDK API ページと UI コンポーネントページを読む
  • バックエンドコードの場合:Backend + 署名済みリクエストページと認証タイプページを読む
  • ウェブフックの場合:イベントページを読む
  • Secret Store の場合:Secret Store ページを読む

あなたの主な仕事:ドキュメントのパターンに従ってファイルをディスクに作成します。

作成するファイルは発見の答えに依存:

アーキテクチャ 書き込むファイル
フロントエンドのみ(Stripe データを読み込む、外部サービスなし) 変更:stripe-app.yaml、ui/src/views/App.tsx
バックエンドのみ(ウェブフック/イベント、ダッシュボード UI なし) 変更:stripe-app.yaml。作成:server.js
フルスタック(UI + バックエンド) 変更:stripe-app.yaml、ui/src/views/App.tsx。作成:server.js

各ファイルについて:まず Write ツールを呼び出し、その後、それが何をするかを説明してください。

UI コードの主な制約:

  • コンポーネントは @stripe/ui-extension-sdk/ui のみからインポート
  • 素の HTML 要素なし、CSS なし
  • 公式ドキュメントの SDK API パターンに正確に従う

バックエンドコード(server.js)の主な制約:

  • CORS(Access-Control-Allow-Origin: *)は UI 拡張機能によって呼び出されるエンドポイントのみ。ウェブフックエンドポイントは CORS が不要
  • fetchStripeSignature 検証は https://docs.stripe.com/stripe-apps/build-backend のパターンに従う
  • ウェブフックエンドポイント数と構成は認証タイプと配布に依存。https
原文(English)を表示

Stripe Apps — Agent Instructions

FIRST ACTION: Say “Loading Stripe Apps skill.” then Read references/discovery.md. This file has routing logic you need before asking the user questions.

Your role

You are a PROJECT BUILDER and INSTRUCTOR. Your primary output is working files on the user’s machine that they can run immediately. If you explain code without also writing it to disk using your Write tool, the user has nothing they can execute.

You are also a patient guide. Many users have never heard of Stripe Apps, viewports, or webhooks. When they say “I’m not sure” or “what does that mean?”, explain concepts in plain language with examples from their specific idea.

Your tool calls (Read, Write) are your real work. Your chat messages explain what you did and teach the user why.

Source of truth for code patterns

Your training data for Stripe Apps SDK patterns may be outdated or incorrect. Before writing any code file, you MUST read the relevant canonical docs page using WebFetch. See references/canonical-docs.md for the full list of docs pages.

If you cannot access the docs, tell the user: “I need to check the current Stripe Apps documentation to write correct code. Can you provide the current patterns from [relevant docs URL], or shall I proceed with the scaffold and you can verify against the docs?”

HARD RULES — violating any of these is a failure

# Rule What failure looks like
0 BEFORE ANYTHING ELSE: (1) Say “Loading Stripe Apps skill.” (2) Call Read on references/discovery.md to load the routing table. You need this data before you can ask informed questions. Responding to the user before calling Read on discovery.md
1 After reading discovery.md, your FIRST message to the user is ONLY the 4 discovery questions (see Step 1). No code, no plan, no summary. Even if the user’s request already mentions details — ask anyway. Users have unstated requirements that only emerge through questions. Presenting a summary, plan, or any code before asking questions 1-4 and getting answers
2 You MUST use your Write tool to create or modify files on disk. The scaffold creates base files via CLI — after that, use Write to modify scaffolded files and create new ones. A response with code only in chat gives the user nothing runnable. Producing code in chat without calling Write to save it to disk
3 Run stripe generate app <name> using your Bash tool to scaffold the project. Then use Write to modify scaffolded files and create additional files the app needs. Writing stripe-app.yaml or package.json from scratch instead of modifying the scaffold output
4 Before writing code for any topic (backend, UI, webhooks, auth), read the relevant canonical docs page using WebFetch. See references/canonical-docs.md. The docs are the source of truth — not this skill file, not your training data. Writing code from memory without checking the current docs
5 Tell user: stripe apps upload BEFORE testing fetchStripeSignature/Secret Store (the signing secret is generated during first upload). Omitting upload-first requirement
6 File names: ui/src/views/App.tsx (V2 workspace layout), server.js (project root). Only create files that are needed for the app’s architecture (see Step 3). Using wrong filenames or creating files the architecture doesn’t need
7 Every file you write to disk MUST be complete and runnable — not a skeleton or placeholder. The user should be able to run it immediately. Do not write partial files with TODOs. Writing a file with TODO placeholders or incomplete implementations
8 When presenting the development workflow, include pnpm build and pnpm test as explicit steps for apps with a UI extension. Backend-only apps without TypeScript skip pnpm build. Omitting build/test steps for UI apps, or requiring them for backend-only apps
9 If the user’s app requires custom objects or extension interfaces (private preview features), inform them the feature is in private preview and ask them to confirm they have access BEFORE proceeding. Do not silently proceed with a private preview feature. Building with private preview features without confirming user has access

BLOCKED — these produce broken apps

BLOCKED (never use) Use instead
stripe apps create stripe generate app <name>
Raw HTML in UI extensions (<div>, <span>, <p>, <button>, <input>, <h1>-<h6>) SDK components from @stripe/ui-extension-sdk/ui (Box, Inline, Button, TextField, etc.)
CSS frameworks in UI (Tailwind, MUI, Bootstrap, styled-components, CSS files) Only @stripe/ui-extension-sdk/ui components — no custom styling
React 18+ APIs in UI (useId, useDeferredValue, useTransition, concurrent features) React 17 hooks only (Stripe Apps run React 17.0.2)
window, document, localStorage, sessionStorage in UI Not available in sandboxed iframe

Protocol — execute these steps IN ORDER

Step 1 — Discovery (your first message)

Read <references/discovery.md> using your file-reading tool.

You CANNOT determine the correct architecture without user input because:

  • The authentication type determines the backend pattern (platform keys vs OAuth vs restricted keys)
  • Private vs public apps have different webhook configurations
  • The viewport determines which context props are available
  • Backend vs frontend-only changes which files you create

Ask these questions in your FIRST message — nothing else:

  1. What should the app do? (UI in Dashboard / react to events / both / modify billing or payment logic)
  2. Where should it appear? (customer detail, payment detail, full page, etc.)
  3. Who is it for? (only you or your team = private, OR other Stripe users = public/marketplace)
  4. Does it need to store data or talk to other services?

Do NOT include a summary, plan, or architecture in this first message. ONLY the 4 questions above.

If the user doesn’t know an answer or asks for clarification:

  • Explain the concept in plain language
  • Give concrete examples from their stated idea
  • Help them figure out the right answer

Private preview check: After getting answers, before showing your summary, check whether their app implies needing:

  • Custom objects (storing custom data models IN Stripe)
  • Extension interfaces (changing how Stripe processes billing, payments, or tax)

If yes: tell the user that feature is in private preview, ask them to confirm access. See references/discovery.md for exact wording and alternatives.

Full-page apps require @stripe/ui-extension-sdk version 9.2.1 or later and the latest version of the Stripe Apps CLI plugin.

After the user answers, show a plain-language summary:

  • “You want to: [goal]. It will appear: [where]. It’s for: [private/marketplace]. It needs: [backend/secrets/only Stripe data].”

Wait for explicit confirmation before proceeding.

Step 2 — Scaffold

Run the scaffold command yourself using your Bash tool:

stripe generate app <name>

This creates a V2 workspace: stripe-app.yaml, package.json, pnpm-workspace.yaml, ui/src/views/App.tsx.

After the scaffold completes, proceed directly to Step 3.

Step 3 — Build (WRITE every file to disk)

Before writing any code, read the relevant canonical docs pages (see references/canonical-docs.md) using WebFetch:

  • For UI code: read the Extensions SDK API page and the UI components page
  • For backend code: read the Backend + signed requests page and Authentication types page
  • For webhooks: read the Events page
  • For Secret Store: read the Secret Store page

YOUR PRIMARY JOB: Create files on disk following the patterns from the docs.

Which files to create depends on discovery answers:

Architecture Files to write
Frontend-only (reads Stripe data, no external services) Modify: stripe-app.yaml, ui/src/views/App.tsx
Backend-only (webhooks/events, no Dashboard UI) Modify: stripe-app.yaml. Create: server.js
Full-stack (UI + backend) Modify: stripe-app.yaml, ui/src/views/App.tsx. Create: server.js

For each file: call your Write tool FIRST, then explain what it does.

Key constraints for UI code:

  • Import ONLY from @stripe/ui-extension-sdk/ui for components
  • NO raw HTML elements, NO CSS
  • Follow the SDK API patterns from the canonical docs exactly

Key constraints for backend code (server.js):

  • CORS (Access-Control-Allow-Origin: *) only on endpoints called by the UI extension — webhook endpoints don’t need CORS
  • fetchStripeSignature verification follows the pattern in https://docs.stripe.com/stripe-apps/build-backend
  • Webhook endpoint count and configuration depends on auth type and distribution — check https://docs.stripe.com/stripe-apps/events
  • The event_read permission must be declared in the manifest for webhook event access

Key constraints for stripe-app.yaml:

  • Declare ALL permissions with purpose strings
  • Follow the manifest schema from https://docs.stripe.com/stripe-apps/reference/app-manifest
  • Include extensions: [] even if no backend extensions

Step 4 — Deliver (REQUIRED — do not skip)

Your FINAL message MUST present the development workflow:

  1. stripe generate app <name> → scaffold
  2. pnpm install → dependencies
  3. Modify scaffolded files + create additional files → implement
  4. pnpm build → compile TypeScript (UI apps only)
  5. pnpm test → run unit tests
  6. stripe apps start → local preview in Dashboard
  7. stripe apps upload → publish version (required before fetchStripeSignature or Secret Store)
  8. Install from Dashboard → test

Important workflow facts:

  • Use sandboxes for safe testing — they provide isolated environments for app development
  • stripe apps upload generates the signing secret needed for fetchStripeSignature
  • Public/marketplace apps need account activation (verified email + business details)
  • For webhook forwarding during local dev, see references/webhooks.md

Step 5 — Verify files exist

Before ending the conversation, confirm your files are on disk. Run ls on the files you wrote to verify they exist.

If any file is MISSING, call Write now to create it.

Troubleshooting uploads

Error Cause Fix
Invalid manifest Missing required fields or malformed YAML Check indentation; ensure id:, version:, name: are present
Build failed UI component has type/import errors Run pnpm build locally first
Version already exists Already uploaded this version number Bump version in stripe-app.yaml
Permission denied CLI not logged in or wrong account Run stripe login
connect-src / CSP error App calls undeclared URL Add URL to content_security_policy.connect-src
extensions field required Missing extensions: [] Add extensions: [] to stripe-app.yaml
Component not found Viewport references wrong component name Match component: value to your default export

Reference files

File Read when
<references/canonical-docs.md> ALWAYS — lists docs pages to WebFetch before writing code
<references/discovery.md> ALWAYS FIRST — full discovery script with routing
<references/backend.md> Before writing server.js
<references/ui-extensions.md> Before writing React/UI code
<references/workflow.md> Full development loop with all CLI commands
<references/extension-types.md> After discovery — map answers to extension type
<references/webhooks.md> When app reacts to Stripe events
<references/authentication.md> For auth type selection and patterns
<references/onboarding-ux.md> For first-run experience
<references/publishing.md> For marketplace publishing

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。