Skip to main content
skill CX Codex

vtex-io-auth-tokens-and-context — Claude Code skill for VTEX IO tokens

Decides which VTEX IO token should back a backend request: the app itself, a shopper, or an Admin user.

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

What vtex-io-auth-tokens-and-context does

The skill applies when the open question is which identity authenticates a call to VTEX services. It covers three options: ctx.authToken for app-level work, ctx.storeUserAuthToken for storefront and shopper-triggered flows, and ctx.adminUserAuthToken for Admin requests that must respect the logged-in user's License Manager role.

Inside are decision rules, a token-to-context table, and hard constraints with TypeScript examples. If a shopper or Admin user started the request, the skill pushes for the user token instead of the app token. Clients that accept authMethod get the token choice passed explicitly. When you wrap a custom VTEX client, the matching token travels from IOContext at the client boundary rather than being hardcoded in handlers.

ADMIN_TOKEN with ctx.adminUserAuthToken stays server-side: never expose it or proxy it to a browser client. Raw tokens should not be logged or returned in responses either. Policy design in manifest.json, route-level authorization, and the choice between ExternalClient and JanusClient sit outside this skill.

What it helps with

  • pick a token for a storefront request without escalating to app permissions
  • decide which identity an Admin-triggered VTEX client call should use
  • strip hardcoded appKey and appToken from a VTEX IO app
  • check whether an Admin token leaks into a browser client
  • propagate the right token from IOContext when wrapping a client

Example prompts for the agent

  • Which token goes in the client header for a request that came from the storefront?
  • Review my OmsClient: should this be ctx.storeUserAuthToken or ctx.authToken?
  • Replace the hardcoded appKey and appToken with the token from IOContext

How to install vtex-io-auth-tokens-and-context

1Skills CLI (Vercel)

npx skills add vtex/skills --skill vtex-io-auth-tokens-and-context -a claude-code

2Manually: put the files in place

~/.claude/skills/vtex-io-auth-tokens-and-context/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/vtex-io-auth-tokens-and-context/

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

Questions about vtex-io-auth-tokens-and-context

How do I install vtex-io-auth-tokens-and-context in Claude?

Run npx skills add vtex/skills --skill vtex-io-auth-tokens-and-context -a claude-code. The skill file then lands at ~/.claude/skills/vtex-io-auth-tokens-and-context/SKILL.md.

What does vtex-io-auth-tokens-and-context do?

It helps you choose between ctx.authToken, ctx.storeUserAuthToken, and ctx.adminUserAuthToken for a request from a VTEX IO backend app. It also covers authMethod and passing the token at the client boundary.

What is out of scope for this skill?

Policies in manifest.json, route-level authorization, and picking between ExternalClient and JanusClient. Those belong to other skills.

Similar skills

Everything for Backend and APIs →

From the same set8

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