Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

composable-commerce

БесплатноБез исполняемых скриптовНе проверен

Architect a modern store using MACH principles — independent microservices, API-first integrations, cloud-native hosting, and headless frontend

finsilabsот finsilabs★ 69 звёзд на GitHub

Об этом скилле

Composable Commerce

Overview

Composable commerce is an architectural approach based on MACH principles — Microservices, API-first, Cloud-native, Headless — where each commerce capability (cart, catalog, search, CMS, checkout, loyalty) is provided by a best-of-breed service rather than a monolithic platform. Services communicate via APIs and events, enabling teams to replace or upgrade individual capabilities without touching the rest of the system. This skill covers MACH architecture patterns, service integration, event-driven coordination, and the operational considerations of running a composable stack in production.

When to Use This Skill

  • When a monolithic platform (Magento, Salesforce CC) can no longer scale with your team or traffic patterns
  • When different domains (catalog, checkout, loyalty) have divergent release cadences and ownership
  • When you need to mix best-of-breed vendors — e.g., Algolia for search, Contentful for CMS, commercetools for commerce
  • When entering new markets requiring different fulfillment, pricing, or tax providers per region
  • When building a platform that must support multiple storefronts (web, mobile, in-store, B2B portal) from a single backend

Prerequisites & Platform Notes

This skill is written for custom/headless storefronts (Node.js, Python, or similar backend). The code examples use TypeScript/Node.js and can be adapted to any stack.

Shopify: Shopify Hydrogen is Shopify's headless framework. MACH/composable patterns apply when using Shopify as the commerce backend with a custom frontend, or when mixing Shopify with other best-of-breed services. WooCommerce: WooCommerce can serve as a headless backend via its REST API and WPGraphQL. These patterns apply when decoupling the frontend from WordPress. Magento: Magento's GraphQL API and PWA Studio support headless architectures. These composable patterns apply to Magento as a backend service in a MACH stack.

You'll need:

  • Node.js 18+ (or adapt to your backend language)
  • PostgreSQL (or your preferred relational database)
  • A search service (Algolia, Elasticsearch, or Typesense)
  • Stripe account and API keys
  • An email sending service (SendGrid, AWS SES, or Postmark)

Core Instructions

  1. Design service boundaries around commerce capabilities

    A typical composable commerce stack separates capabilities into discrete services:

    Capability Example Services
    Product Catalog commercetools, Akeneo PIM, Salsify
    Search & Discovery Algolia, Elasticsearch, Constructor.io
    CMS / Content Contentful, Sanity, Storyblok
    Cart & Checkout commercetools, Elastic Path, Medusa
    Payments Stripe, Adyen, Braintree
    Tax Avalara, TaxJar
    Shipping & Fulfillment EasyPost, ShipBob, custom OMS
    Customer Identity Auth0, Okta, Cognito
    Loyalty & Promotions Talon.One, Voucherify
    Email / Notifications SendGrid, Customer.io

    Define bounded contexts: each service owns its data and exposes it only via APIs. Never share databases between services.

  2. Implement an API composition layer (BFF)

    A Backend-for-Frontend (BFF) aggregates multiple upstream APIs into a single request, tailored to what the frontend needs:

    // bff/src/routes/product-page.ts
    import {getProduct} from '../services/catalog';
    import {getSearchReviews} from '../services/reviews';
    import {getRecommendations} from '../services/recommendations';
    import {getInventory} from '../services/inventory';
    
    export async function productPageData(productId: string, customerId?: string) {
      // Parallel fetch from independent services
      const [product, inventory, recommendations] = await Promise.all([
        getProduct(productId),
        getInventory(productId),
        getRecommendations(productId, customerId),
      ]);
    
      // Sequential: reviews needs product.sku
      const reviews = await getSearchReviews(product.sku);
    
      return {
        product,
        inventory,
        recommendations,
        reviews,
      };
    }
    

    Expose the BFF as a GraphQL API using schema stitching or federation:

    import {buildHTTPExecutor} from '@graphql-tools/executor-http';
    import {stitchSchemas} from '@graphql-tools/stitch';
    
    const gatewaySchema = await stitchSchemas({
      subschemas: [
        { schema: await introspectSchema(catalogExecutor), executor: catalogExecutor },
        { schema: await introspectSchema(inventoryExecutor), executor: inventoryExecutor },
        { schema: await introspectSchema(reviewsExecutor), executor: reviewsExecutor },
      ],
    });
    
  3. Use event-driven architecture for cross-service coordination

    Services should communicate asynchronously for workflows that span multiple capabilities (order placed → inventory reserved → fulfillment triggered → email sent):

    // Order service publishes an event after ch
    
Полный SKILL.md на GitHub

Установить composable-commerce в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

claude-code
cursor
gemini-cli
copilot
codex-cli
kiro
opencode

Вложенные файлы

evals/api-versioning-and-distributed-tracing/criteria.jsonevals/api-versioning-and-distributed-tracing/task.mdevals/bff-aggregation-with-circuit-breakers/criteria.jsonevals/bff-aggregation-with-circuit-breakers/task.mdevals/event-driven-saga-with-compensating-tran/criteria.jsonevals/event-driven-saga-with-compensating-tran/task.mdtile.json

FAQ

Что делает скилл composable-commerce?

Architect a modern store using MACH principles — independent microservices, API-first integrations, cloud-native hosting, and headless frontend

Как установить скилл composable-commerce?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл composable-commerce запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить composable-commerce с