vtex-io-client-integration
БесплатноБез исполняемых скриптовНе проверенApply when designing or implementing how a VTEX IO backend app integrates with VTEX services or external APIs through @vtex/api and @vtex/clients. Covers…
от vtex★ 47 звёзд на GitHubОб этом скилле
Client Integration & Service Access
When this skill applies
Use this skill when the main decision is how a VTEX IO backend app should call VTEX services or external APIs through the VTEX IO client system.
- Creating custom clients under
node/clients/ - Choosing between native clients from
@vtex/apior@vtex/clientsand a custom client - Registering clients in
IOClientsand exposing them throughctx.clients - Configuring
InstanceOptionssuch as retries, timeout, headers, or caching - Reviewing backend integrations that currently use raw HTTP libraries
Do not use this skill for:
- deciding the app contract in
manifest.json - structuring
node/index.tsor tuningservice.json - designing GraphQL schema or resolver contracts
- modeling route authorization or security permissions
- building storefront or admin frontend integrations
Decision rules
- Prefer native clients from
@vtex/apior@vtex/clientswhen they already cover the target VTEX service. Common examples include clients for catalog, checkout, logistics, and OMS. Write a custom client only when no suitable native client or factory exists. - Use
ExternalClientprimarily for non-VTEX external APIs. Avoid using it for VTEX-hosted endpoints such as*.myvtex.comor*.vtexcommercestable.com.brwhen a native client in@vtex/clients,JanusClient, or another documented higher-level VTEX client is available or more appropriate. - Janus is VTEX's Core Commerce API gateway. Use
JanusClientonly when you need to call a VTEX Core Commerce API through Janus and no suitable native client from@vtex/clientsalready exists. - Use
InfraClientonly for advanced integrations with VTEX IO infrastructure services under explicit documented guidance. In partner apps, prefer higher-level clients and factories such asmasterDataorvbaseinstead of extendingInfraClientdirectly. - Register every custom or native client in
node/clients/index.tsthrough aClientsclass that extendsIOClients. - Consume integrations through
ctx.clients, never by instantiating client classes inside middlewares, resolvers, or event handlers. - Keep clients focused on transport, request options, endpoint paths, and small response shaping. Keep business rules, authorization decisions, and orchestration outside the client.
- When building custom clients, always rely on the
IOContextpassed by VTEX IO such asaccount,workspace, and available auth tokens instead of hardcoding account names, workspaces, or environment-specific VTEX URLs. - Configure shared
InstanceOptionsin the runtime client config, then use client-specific overrides only when an integration has clearly different needs. - Use the
metricoption on important client calls so integrations can be tracked and monitored at the client layer, not only at the handler layer. - Keep error normalization close to the client boundary, but avoid hiding relevant HTTP status codes or transport failures that are important for observability and debugging.
- When integrating with external services, confirm that the required outbound policies are declared in the app contract, but keep the detailed policy modeling in auth or app-contract skills.
- In rare migration or legacy scenarios,
ExternalClientmay temporarily be used against VTEX-hosted endpoints, but treat this as an exception. The long-term goal should be to move toward native clients or the proper documented VTEX client abstractions so routing, authentication, and observability stay consistent.
Client selection guide:
| Client type | Use when | Avoid when |
|---|---|---|
ExternalClient |
calling non-VTEX external APIs | VTEX-hosted APIs that already have a native client or Janus-based abstraction |
JanusClient |
calling VTEX Core Commerce APIs not yet wrapped by @vtex/clients |
any VTEX service that already has a native client such as Catalog, Checkout, Logistics, or OMS |
InfraClient |
implementing advanced infra-style clients only under explicit documented guidance | general VTEX or external APIs in partner apps |
InstanceOptions heuristics:
- Start with small, explicit client defaults such as
retries: 2and a requesttimeoutbetween1000and3000milliseconds. - Use small finite retry values such as
1to3for idempotent operations. - Avoid automatic retries on non-idempotent operations unless the upstream API explicitly documents safe idempotency behavior.
- Do not use high retry counts to hide upstream instability. Surface repeated failures clearly and handle them intentionally in the business layer.
- Prefer per-client headers and metrics instead of scattering header definitions through handlers.
- Use memory or disk cache options only when repeated reads justify it and the response can be safely reused.
- Keep auth setup inside the client constructor or factory configuration, not duplicated across handlers.
Hard constraints
Constraint: All service-to-service HTTP calls must go t
Установить vtex-io-client-integration в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл vtex-io-client-integration?
Apply when designing or implementing how a VTEX IO backend app integrates with VTEX services or external APIs through @vtex/api and @vtex/clients. Covers choosing the correct client type, registering clients in IOClients, configuring InstanceOptions, and consuming integrations through ctx.clients. Use for custom client design, VTEX Core Commerce integrations, or reviewing backend code that should use VTEX IO client patterns instead of raw HTTP libraries.
Как установить скилл vtex-io-client-integration?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vtex-io-client-integration запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic