Command Palette

Search for a command to run...

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

vtex-io-service-runtime

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

Apply when designing or implementing the runtime structure of a VTEX IO backend app under node/. Covers the Service entrypoint, typed context and state…

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

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

Service Runtime & Execution Model

When this skill applies

Use this skill when the main decision is how a VTEX IO backend app runs inside the node builder: how the Service entrypoint is structured, how runtime configuration is declared, and how routes, events, or GraphQL handlers are registered into the service.

  • Creating a new backend app under node/
  • Structuring node/index.ts as the service entrypoint
  • Defining typed Context, State, and params contracts for handlers
  • Configuring service.json for timeout, memory, workers, and replicas
  • Troubleshooting runtime issues caused by service registration or execution model mismatches
  • Registering GraphQL handlers at the runtime level, while keeping schema and resolver design in a separate skill

Do not use this skill for:

  • deciding the app contract in manifest.json
  • designing custom clients or integration transport layers
  • detailed HTTP route handler behavior
  • event-specific business workflows
  • GraphQL schema or resolver modeling beyond runtime registration

Decision rules

  • Treat node/index.ts as the runtime composition root of the backend app.
  • Use the Service definition to register runtime surfaces such as routes, events, and GraphQL handlers, not to hold business logic directly.
  • Keep runtime wiring explicit: context typing, client typing, route registration, and event registration should be visible at the service boundary.
  • Put execution knobs such as timeout, ttl, memory, workers, and replica limits in service.json, not inside handler code.
  • Use service.json to declare the runtime parameters the platform uses to execute the service, especially memory, timeout, ttl, minReplicas, maxReplicas, workers, routes, events, and rateLimitPerReplica.
  • Use routes in service.json to expose HTTP entrypoints. Routes are private by default, so set public: true explicitly for routes that must be externally reachable.
  • Use smartcache: true only on idempotent, cacheable routes where the same response can be safely reused across repeated requests. Avoid it on personalized, authenticated, or write-oriented endpoints.
  • Use events in service.json to declare which event sources and handlers are part of the service runtime. Keep event registration in the runtime layer and event-specific business rules in dedicated event modules.
  • Use rateLimitPerReplica to shape throughput per replica for requests and events. Set a global baseline only when the service needs it, then add small explicit overrides only for expensive routes or noisy event sources.
  • Do not use rateLimitPerReplica as a substitute for redesigning expensive routes, queueing work, or moving slow operations to async processing.
  • Keep handlers focused on request or event behavior; keep runtime structure focused on bootstrapping and registration.
  • Model Context, State, and params types deliberately so middlewares and handlers share a stable contract. Apply the same typed Context and State to middlewares so they can safely manipulate ctx.state, ctx.vtex, and params without falling back to any.
  • If a backend app starts mixing runtime wiring, client implementation, and business rules in the same file, split those concerns before expanding the service further.
  • Although some authorization fields such as routes.access or routes.policies may live in service.json, they are primarily authorization concerns and belong in auth or security-focused skills rather than this runtime skill.

Runtime sizing heuristics:

  • These ranges are intended for partner and account-level apps. Native VTEX core services may legitimately use much higher values such as thousands of MB of memory or hundreds of replicas, but those values should not be used as defaults for custom apps.

Suggested defaults:

  • Start synchronous HTTP services with timeout between 10 and 30 seconds. For UX-facing routes, prefer 5 to 15 seconds.
  • Start memory at 256 MB.
  • Start workers at 1.
  • Use minReplicas: 2 as the default for installed apps, and reserve minReplicas: 1 for linked-app development contexts where the platform allows it.
  • Use maxReplicas: 5 as the lowest practical starting point, since the documented minimum is 5.
  • Use ttl intentionally. In VTEX IO, ttl is measured in minutes, with platform defaults and limits that differ from timeout. For partner apps, start from the default 10 minutes and increase intentionally up to 60 only when reducing cold starts matters more than allowing idle instances to sleep sooner.

Scaling ranges and exceptions:

  • Use 128 to 256 MB for simpler IO-bound services, and move to 512 MB only when there is evidence of OOM, large payload processing, or heavier libraries.
  • Increase workers to 2 to 4 only for high-throughput IO-bound workloads after measuring benefit. Avoid using more than 4 workers per instance as a default.
  • Increase maxReplicas from 5 toward 10 only when public traffic or pred
Полный SKILL.md на GitHub

Установить vtex-io-service-runtime в Claude Code и Claude Desktop

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

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

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

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

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

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

FAQ

Что делает скилл vtex-io-service-runtime?

Apply when designing or implementing the runtime structure of a VTEX IO backend app under node/. Covers the Service entrypoint, typed context and state, service.json runtime configuration, and how routes, events, and GraphQL handlers are registered and executed. Use for structuring backend apps, defining runtime boundaries, or fixing execution-model issues in VTEX IO services.

Как установить скилл vtex-io-service-runtime?

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

Скилл vtex-io-service-runtime запускает скрипты?

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

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

Сравнить vtex-io-service-runtime с