vtex-io-application-performance
БесплатноБез исполняемых скриптовНе проверенApply when improving VTEX IO Node or .NET services for latency, throughput, and resilience: in-process LRU, VBase, stale-while-revalidate, AppSettings…
от vtex★ 47 звёзд на GitHubОб этом скилле
VTEX IO application performance
When this skill applies
Use this skill when you optimize VTEX IO backends (typically Node with @vtex/api / Koa-style middleware, or .NET services) for performance and resilience: caching, deduplicating work, parallel I/O, and efficient configuration loading—not only “add a cache.”
- Adding an in-memory LRU (per pod) for hot keys
- Adding VBase persistence for shared cache across pods, optionally with stale-while-revalidate (return stale, refresh in background)
- Loading AppSettings (or similar) once at startup or on a TTL refresh vs every request
- Parallelizing independent client calls (
Promise.all) instead of serial waterfalls - Passing
ctx.clients(e.g.vbase) into client helpers or resolvers so caches are testable and explicit
Do not use this skill for:
- Choosing
/_v/privatevs public paths orCache-Controlat the edge → vtex-io-service-paths-and-cdn - GraphQL
@cacheControlfield semantics only → vtex-io-graphql-api
Decision rules
- Layer 1 — LRU (in-process) — Fastest; lost on cold start and not shared across replicas. Use bounded size + TTL for hot keys (organization, cost center, small config slices).
- Layer 2 — VBase — Shared across pods; platform data is partitioned by account / workspace like other IO resources. Pair with hash or
trySaveIfhashMatcheswhen the client supports concurrency-safe updates (see Clients). - Stale-while-revalidate — On VBase hit with expired freshness, return stale immediately and revalidate asynchronously (fetch origin → write VBase + LRU). Reduces tail latency vs blocking on origin every time.
- TTL-only — Simpler: cache until TTL expires, then blocking fetch. Prefer when staleness is unacceptable or origin is cheap.
- AppSettings — If values are account-wide and rarely change, load once (or refresh on interval) and hold in module memory; if workspace-dependent or must reflect admin changes quickly, use per-request read or short TTL cache. Never cache secrets in logs or global state without guardrails.
- Context — Use
ctx.statefor per-request deduplication (e.g. “already loaded org for this request”). Use global module cache only for immutable or TTL-refreshed app data; account and workspace live onctx.vtex—always include them in in-memory cache keys when the same pod serves multiple tenants. - Parallel requests — When resolvers need independent upstream calls, run them in parallel; combine only when outputs depend on each other.
- Timeouts on every outbound call — Every
ctx.clientscall and external HTTP request must have an explicit timeout. Use@vtex/apiclient options (timeout,retries,exponentialTimeoutCoefficient) to tune per-client behavior. Unbounded waits are the top cause of cascading failures in distributed systems. - Graceful degradation — When an upstream is slow or down, fail open where the business allows (return cached/default data, skip optional enrichment) rather than blocking the response. Consider circuit breaker patterns for chronically failing dependencies.
- Be deliberate with transactional data caching — Payment responses and active transaction state must never be cached. For other transactional data (order forms, cart simulations, session state), the default is no cache, but short-lived caches (TTL < 5 min) can be acceptable when the consumer tolerates brief staleness. Confirm the use case explicitly before caching—long TTLs on transactional data create stale prices, phantom inventory, or inconsistent state.
- Resolver chain deduplication — When a resolver chain calls the same client method multiple times (e.g.
getCostCenterin the resolver and again inside a helper), deduplicate: call once, pass the result through, or stash inctx.state. Serial waterfalls of 7+ calls that could be 3 parallel + 1 sequential are the top performance sink. - Phased
Promise.all— Group independent calls into parallel phases. Phase 1:Promise.all([getOrderForm(), getCostCenter(), getSession()]). Phase 2 (depends on Phase 1):getSkuMetadata(). Phase 3 (depends on Phase 2):generatePrice(). Neverawaitsix calls sequentially when only two depend on each other. - Batch mutations — When setting multiple values (e.g.
setManualPriceper cart item), usePromise.allinstead of a sequential loop. Eachawaitin a loop adds a full round-trip.
VBase deep patterns
- Per-entity keys, not blob keys — Cache individual entities (e.g.
sku:{region}:{skuId}) instead of composite blobs (e.g.allSkus:{sortedCartSkuIds}). Per-entity keys dramatically incre
Установить vtex-io-application-performance в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл vtex-io-application-performance?
Apply when improving VTEX IO Node or .NET services for latency, throughput, and resilience: in-process LRU, VBase, stale-while-revalidate, AppSettings loading, request context, parallel client calls, and avoiding duplicate work. Covers application-level performance patterns that complement edge/CDN caching. Use when optimizing backends beyond route-level Cache-Control.
Как установить скилл vtex-io-application-performance?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vtex-io-application-performance запускает скрипты?
Нет, скилл состоит только из инструкций (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