Skip to main content
skill CX Codex

headless-caching-strategy — Claude Code skill: setup and caching

Sets caching rules and TTL values for headless VTEX storefronts. Keeps public endpoints fast while preventing accidental caching of sensitive shopper data.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add vtex/skills --skill headless-caching-strategy -a claude-code
Open on GitHub

What headless-caching-strategy does

This skill governs caching across headless VTEX stores. It isolates public catalog traffic from transactional shopper requests. Without caching, API rate limits trigger 429 errors. Keeping search responses and category trees at the edge or within a BFF cache drops latency by 200–500ms.

The logic relies on stale-while-revalidate alongside moderate TTLs between 2 and 15 minutes. It sets explicit windows: category trees persist up to 15 minutes, while search autocomplete entries refresh after one or two minutes. Invalidation should follow catalog update events rather than multi-hour expiration windows.

Sensitive shopper routes must stay uncached. Storing checkout or customer details creates compliance liabilities and corrupts carts. Because of this, the skill forbids caching Checkout, Profile, OMS, and Payments on any tier, including Redis and browser storage.

What it helps with

  • prevent VTEX API rate limit errors caused by repetitive search queries
  • implement stale-while-revalidate patterns inside an Express BFF layer
  • assign suitable TTL values for public catalog endpoints
  • block checkout and personal customer records from being cached

Example prompts for the agent

  • Set up an in-memory stale-while-revalidate cache for my VTEX category tree in Express.
  • What TTL values and headers should I configure for Intelligent Search endpoints?
  • Review my storefront API proxy to ensure Checkout and Profile routes stay uncached.

How to install headless-caching-strategy

1Skills CLI (Vercel)

npx skills add vtex/skills --skill headless-caching-strategy -a claude-code

2Manually: put the files in place

~/.claude/skills/headless-caching-strategy/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/headless-caching-strategy/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about headless-caching-strategy

How to install headless-caching-strategy in Claude Code?

Run npx skills add vtex/skills --skill headless-caching-strategy -a claude-code. The tool places the skill definition into ~/.claude/skills/headless-caching-strategy/SKILL.md.

Which VTEX endpoints must never be cached?

Never cache Checkout (/api/checkout/), Profile (/api/profile-system/pvt/), OMS (/api/oms/pvt/orders), Payments (/api/payments/), or private pricing routes. Caching them exposes personal identity details and breaks checkout sessions.

When should you skip this skill?

Do not use it for broad BFF routing structure or query construction for Intelligent Search. VTEX provides dedicated skills like headless-bff-architecture and headless-intelligent-search for those areas.

Similar skills

All skills for Backend and APIs →

From the same set38

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor