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★ 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.tsas the service entrypoint - Defining typed
Context,State, and params contracts for handlers - Configuring
service.jsonfor 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.tsas the runtime composition root of the backend app. - Use the
Servicedefinition 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.jsonto declare the runtime parameters the platform uses to execute the service, especiallymemory,timeout,ttl,minReplicas,maxReplicas,workers,routes,events, andrateLimitPerReplica. - Use
routesinservice.jsonto expose HTTP entrypoints. Routes are private by default, so setpublic: trueexplicitly for routes that must be externally reachable. - Use
smartcache: trueonly 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
eventsinservice.jsonto 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
rateLimitPerReplicato 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
rateLimitPerReplicaas 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 typedContextandStateto middlewares so they can safely manipulatectx.state,ctx.vtex, and params without falling back toany. - 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.accessorroutes.policiesmay live inservice.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
timeoutbetween 10 and 30 seconds. For UX-facing routes, prefer 5 to 15 seconds. - Start
memoryat 256 MB. - Start
workersat 1. - Use
minReplicas: 2as the default for installed apps, and reserveminReplicas: 1for linked-app development contexts where the platform allows it. - Use
maxReplicas: 5as the lowest practical starting point, since the documented minimum is5. - Use
ttlintentionally. In VTEX IO,ttlis measured in minutes, with platform defaults and limits that differ fromtimeout. For partner apps, start from the default10minutes and increase intentionally up to60only 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
workersto 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
maxReplicasfrom5toward10only when public traffic or pred
Установить 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), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic