Command Palette

Search for a command to run...

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

masterdata-storage-strategy

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

Apply when deciding whether VTEX Master Data is the right storage for a given workload, designing JSON Schemas with v-indexed, v-cache, v-security, and…

vtexот vtex★ 47 звёзд на GitHub

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

Master Data storage strategy

When this skill applies

Use this skill before creating any new Master Data entity or when auditing existing usage. It helps you answer:

  • Is Master Data the right storage for this data, or would Catalog, OMS, VBase, or an external database serve better?
  • How should I design the JSON Schema for performance and security?
  • Which fields should I index (v-indexed), and which should I not?
  • Should I enable or disable caching (v-cache)?
  • Do I need triggers (v-triggers), or is an event-driven IO approach better?
  • How do I plan for capacity and lifecycle of schemas and documents?

Do not use this skill for:

  • VTEX IO app integration patterns (MasterDataClient, masterdata builder, CRUD in code) — use vtex-io-masterdata
  • Performance patterns for IO services (LRU, VBase caching layers) — use vtex-io-application-performance

Decision rules

When to use Master Data

Master Data is a good fit when all of the following are true:

  1. Document-oriented access — Your data is naturally key-value or document-shaped (JSON documents with variable schemas). You query by indexed fields and retrieve full or partial documents.
  2. Platform-integrated — You benefit from VTEX-native features: v-triggers for automated workflows, v-security for per-field public access, v-indexed for search/filter, and the masterdata builder for schema-as-code.
  3. Moderate volume — Your entity will hold thousands to low millions of documents. MD handles this well with proper indexing.
  4. Not on the purchase critical path — MD is not optimized for sub-10ms latency. Synchronous MD reads in checkout/cart/payment flows risk conversion if MD is slow.
  5. No better native fit — The data doesn't belong in Catalog (product/SKU attributes), OMS (order data), CL/AD (customer profiles/addresses), or VBase (app-specific cache/state).

When NOT to use Master Data

Data type Better storage Why
Product attributes, specifications Catalog (specifications, unstructured specs) Native indexing, search integration, catalog APIs
Order data, order history OMS (via OMS APIs + BFF cache) Single source of truth; duplicating to MD creates drift
Customer profiles, addresses CL/AD native entities Platform-managed, already indexed and cached
App-specific cache or temp state VBase Designed for per-app ephemeral storage, no schema overhead
Application logs, debug traces ctx.vtex.logger Structured logging infrastructure, not a database
High-throughput time-series data External database (SQL, NoSQL, time-series DB) MD is not designed for millions of writes/day
Relational data with joins External SQL database MD has no join support; denormalize or use a relational DB
Data requiring strong consistency External database MD is eventually consistent for indexed fields

Schema design principles

  • One entity per concept — Don't mix unrelated data in a single entity. Each entity should represent a clear business concept (e.g. reviews, wishlists, legacyOrders).
  • Index what you query — Only fields in v-indexed can be used in where clauses. But don't over-index: each indexed field increases write latency and storage because the index is updated on every document change.
  • Minimal v-default-fields — Return only the fields most consumers need by default. Large default payloads waste bandwidth.
  • v-cache matches the workload — Leave true (default) for read-heavy entities. Set to false for entities with high write frequency where consumers need immediate consistency after writes.
  • v-security is explicit — Set allowGetAll: false unless unauthenticated list access is intentional. Use publicRead, publicWrite, publicFilter only for fields that must be accessible without authentication.

VTEX schema extensions (v-* fields) — reference

Master Data v2 extends standard JSON Schema with v-* properties that control indexing, caching, security, defaults, triggers, and schema inheritance. These are VTEX-specific; standard JSON Schema validators ignore them.

v-indexed

Array of field names that Master Data will create secondary indexes for.

  • Only indexed fields can appear in where clauses for searchDocuments and scrollDocuments. Queries on non-indexed fields trigger **full
Полный SKILL.md на GitHub

Установить masterdata-storage-strategy в Claude Code и Claude Desktop

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

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

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

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

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

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл masterdata-storage-strategy?

Apply when deciding whether VTEX Master Data is the right storage for a given workload, designing JSON Schemas with v-indexed, v-cache, v-security, and v-triggers, planning entity capacity and lifecycle, or auditing existing Master Data usage. Covers when to use MD versus Catalog, OMS, VBase, or external databases, schema design best practices, indexing strategy, trigger patterns, and operational considerations. Use before creating any new Master Data entity.

Как установить скилл masterdata-storage-strategy?

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

Скилл masterdata-storage-strategy запускает скрипты?

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

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

Сравнить masterdata-storage-strategy с