Medusa Customersのロゴ

Medusa Customers

組織
OrcaQubits
medusa-customers

Manage Medusa v2 customers — customer profiles, email and social authentication, customer groups, addresses, and account management. Use when working with customer data and auth.

概要

公開者OrcaQubits
リポジトリagentic-commerce-skills-plugins
スキル名medusa-customers
スター
40
フォーク
17
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/OrcaQubits/agentic-commerce-skills-plugins.git /tmp/agentic-commerce-skills-plugins
mkdir -p .claude/skills
cp -r /tmp/agentic-commerce-skills-plugins/medusa-commerce/skills/medusa-customers .claude/skills/medusa-customers
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

Medusa v2 Customer Management

Before writing code

Fetch live docs:

  1. Web-search site:docs.medusajs.com customer module for customer data model and service methods
  2. Web-search site:docs.medusajs.com auth module for authentication providers and flows
  3. Web-search site:docs.medusajs.com customer group for group management and pricing rules
  4. Fetch https://docs.medusajs.com/resources/references/customer and review the ICustomerModuleService interface
  5. Web-search medusajs v2 auth provider social login 2026 for latest authentication patterns

Customer Data Model

Entity Relationships

EntityRelationshipKey Fields
CustomerRootemail, first_name, last_name, phone, has_account, metadata
Addresses[]Customer → manyaddress fields, country_code, is_default_shipping/billing
CustomerGroups[]Customer ↔ manyMany-to-many group membership
Orders[]Customer → many (link)Via Order Module link

Key Fields

FieldTypeDescription
emailstringUnique identifier for the customer
has_accountbooleantrue for registered, false for guest
first_name / last_namestringCustomer name
phonestringPhone number
metadataJSONBCustom key-value data

Authentication Architecture

Medusa v2 separates customer identity from authentication via the Auth Module:

Auth Module
├── AuthIdentity
│   ├── provider_identities[] (emailpass, google, github...)
│   └── app_metadata (linked customer_id)
└── Auth Providers (built-in + custom)

Authentication Flow

Register/Login ──> Auth Module validates ──> JWT token
  ──> Token includes auth_identity_id ──> Linked to customer_id

Auth Provider Comparison

ProviderTypeConfiguration
emailpassBuilt-inNo external config needed
googleOAuth2Client ID + secret
githubOAuth2Client ID + secret
CustomExtensibleImplement AbstractAuthModuleProvider

Email + Password Flow

StepEndpointPurpose
Register/auth/customer/emailpass/registerCreate auth identity
Login/auth/customer/emailpassAuthenticate, get token
Create customer/store/customersCreate customer profile (with token)

Social Login Flow (OAuth2)

StepEndpointPurpose
Initiate/auth/customer/{provider}Get redirect URL
Callback/auth/customer/{provider}/callbackExchange code for token
Create/Link/store/customersCreate or link customer profile

Fetch live docs for OAuth2 callback handling, redirect URIs, and token exchange flow.

Customer Groups

FieldTypeDescription
namestringGroup name (e.g., "VIP", "Wholesale")
metadataJSONBCustom group data
customersrelationMany-to-many with customers

Use Cases

Use CaseMechanism
Group-specific pricingPrice List rules linked to customer groups
Conditional promotionsPromotion rules targeting customer groups
Access controlCustom middleware checking group membership

Key Service Methods

OperationMethod
Create groupcustomerModuleService.createCustomerGroups()
Add to groupcustomerModuleService.addCustomerToGroup()
Remove from groupcustomerModuleService.removeCustomerFromGroup()
List groupscustomerModuleService.listCustomerGroups()

Address Management

FieldRequiredNotes
first_name / last_nameYes
address_1YesStreet address
cityYes
country_codeYesISO 2-letter code
postal_codeConditionalRequired by country
is_default_shipping / is_default_billingNoDefault flags
WorkflowPurpose
createCustomerAddressesWorkflowAdd new address
updateCustomerAddressesWorkflowUpdate existing address
deleteCustomerAddressesWorkflowRemove address

Store API Routes

Route PatternMethodPurpose
/store/customersPOSTCreate customer profile
/store/customers/meGETRetrieve authenticated customer
/store/customers/mePOSTUpdate customer profile
/store/customers/me/addressesGET/POSTList/add addresses
/store/customers/me/addresses/:idPOST/DELETEUpdate/remove address

All /store/customers/me routes require a valid JWT in the Authorization header.

Admin API Routes

Route PatternMethodPurpose
/admin/customersGET/POSTList/create customers
/admin/customers/:idGET/POSTRetrieve/update customer
/admin/customer-groupsGET/POSTManage groups
/admin/customer-groups/:id/customersPOSTAdd customers to group

Fetch live docs for request body shapes and query parameters on each route.

Best Practices

Authentication

  • Use the Auth Module for all authentication -- never implement custom auth logic outside it
  • Support both emailpass and at least one OAuth2 provider for user convenience
  • Store provider-specific data in provider_identities, not in customer metadata
  • Always link auth identities to customer profiles via app_metadata.customer_id

Customer Data

  • Use has_account to distinguish registered customers from guest checkouts
  • Store loyalty points, preferences, and custom attributes in metadata
  • Use customer groups for segmentation -- avoid duplicating group logic in app code

Address Management

  • Validate addresses against country-specific requirements (postal code formats)
  • Set is_default_shipping and is_default_billing to streamline checkout

Security

  • Validate JWT tokens on every authenticated request
  • Scope Store API customer data to the authenticated customer only
  • Never expose customer lists or group memberships via the Store API

Fetch the Medusa v2 customer module and auth module documentation for exact service method signatures, auth provider configuration, and JWT handling before implementing.

よくある質問

AIスキル「Medusa Customers」では何ができますか?

Manage Medusa v2 customers — customer profiles, email and social authentication, customer groups, addresses, and account management. Use when working with customer data and auth.

TypingMindでMedusa Customersを使うメリットは何ですか?

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

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

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

Medusa Customersを使えるAIモデルはどれですか?

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

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

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

AIスキル「Medusa Customers」は無料ですか?

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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