vtex-io-service-paths-and-cdn — Claude Code skill for routes and CDN
Picks the right path prefix in service.json and matches Cache-Control to the data, so edge caching does not serve one shopper's payload to another.
npx skills add vtex/skills --skill vtex-io-service-paths-and-cdn -a claude-codeWhat vtex-io-service-paths-and-cdn does
The skill walks through three prefix options for VTEX IO routes: public, /_v/segment/ and /_v/private/. The choice decides which cookies reach your service and whether VTEX caches the response at the edge. Public paths give no guarantee of request cookies, segment paths receive vtex_segment and cache per segment, private paths add vtex_session and skip edge caching entirely.
Inside are decision rules, a list of common failure modes and a review checklist. Classify the response first — anonymous, segment-scoped or authenticated — then assign the path and headers. A route returning order history, addresses or tokens on a public path with a long max-age leaks data between shoppers. One trap worth knowing: the path prefix and the "public": true field in service.json control different things, and they get mixed up often.
Field-level GraphQL caching lives in vtex-io-graphql-api; LRU, VBase and stale-while-revalidate belong to vtex-io-application-performance. This one stays on routes and response headers.
What it helps with
- pick a path prefix that fits the data in the response
- explain why a route never receives
vtex_session - align
Cache-Controlwith how sensitive the payload is - split public catalog and private account data into separate endpoints
- catch personalized JSON being cached at the edge
Example prompts for the agent
- Check the routes in
service.jsonand flag any that return personal data on a public path - Help me choose between
/_v/segment/and/_v/private/for an endpoint with region-based pricing - Review the
Cache-Controlheaders against what these endpoints actually return
How to install vtex-io-service-paths-and-cdn
1Skills CLI (Vercel)
npx skills add vtex/skills --skill vtex-io-service-paths-and-cdn -a claude-code2Manually: put the files in place
~/.claude/skills/vtex-io-service-paths-and-cdn/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/vtex-io-service-paths-and-cdn/
1Skills CLI (Vercel)
npx skills add vtex/skills --skill vtex-io-service-paths-and-cdn -a codex2Manually: put the files in place
.agents/skills/vtex-io-service-paths-and-cdn/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add vtex/skills --skill vtex-io-service-paths-and-cdn -a cursor2Manually: put the files in place
.cursor/skills/vtex-io-service-paths-and-cdn/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install vtex/skills vtex-io-service-paths-and-cdn2Manually: put the files in place
.github/skills/vtex-io-service-paths-and-cdn/SKILL.md1Skills CLI (Vercel)
npx skills add vtex/skills --skill vtex-io-service-paths-and-cdn -a gemini-cli2Platform CLI
gemini skills install https://github.com/vtex/skills --path skills/vtex-io-service-paths-and-cdnManually: put the files in place
.devin/skills/vtex-io-service-paths-and-cdn/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add vtex/skills --skill vtex-io-service-paths-and-cdn -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about vtex-io-service-paths-and-cdn
How do I install vtex-io-service-paths-and-cdn in Claude?
Run npx skills add vtex/skills --skill vtex-io-service-paths-and-cdn -a claude-code. The skill file lands at ~/.claude/skills/vtex-io-service-paths-and-cdn/SKILL.md.
What does vtex-io-service-paths-and-cdn do?
It covers VTEX IO path prefixes, how they relate to cookies and edge caching, and how to set Cache-Control to match the access level of the data.
How is it different from vtex-io-graphql-api?
This skill is about service.json routes and response headers. Field-level GraphQL caching with @cacheControl is handled by the other skill.