/vtex-ai-skills:vtex-io-auth-and-policiesfrom vtex-ai-skills
Guides VTEX IO app developers in declaring manifest policies, outbound-access rules, and least-privilege permissions for integrations and protected routes.
Ships in vtex-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill when a VTEX IO app needs explicit permissions to call external services, consume VTEX resources, or expose access-controlled behavior.
Do not use this skill for:
AUTH_TOKEN, STORE_TOKEN, and ADMIN_TOKENmanifest.json policies as explicit declarations of what the app is allowed to access."vendor.app-name:policy-name" when the app consumes resources or operations exposed by another VTEX IO app through role-based policies.outbound-access when the app needs to call external HTTP services or URLs that are not covered by License Manager or app policies.resources expressed as VRNs, and resource-based policies use principals expressed as VRNs.service.json resource-based policies or when interpreting authorization errors. Do not generate VRNs in manifest.json for consumer-side policy declarations.principals are evaluated as alternatives, and explicit deny rules override allow rules.Policy types at a glance:
{
"policies": [
{ "name": "Sku.aspx" }
]
}
{
"policies": [
{ "name": "vtex.messages:graphql-translate-messages" }
]
}
{
"policies": [
{
"name": "outbound-access",
"attrs": {
"host": "partner.example.com",
"path": "/api/*"
}
}
]
}
{
"routes": {
"privateStatus": {
"path": "/_v/private/status/:code",
"public": false,
"policies": [
{
"effect": "allow",
"actions": ["POST"],
"principals": [
"vrn:apps:*:my-sponsor-account:*:app/[email protected]"
]
}
]
}
}
}
This route allows a specific IO app principal. Other apps remain denied by default because they do not match any allow rule.
{
"routes": {
"status": {
"path": "/_v/status/:code",
"public": false,
"policies": [
{
"effect": "allow",
"actions": ["POST"],
"principals": [
"vrn:vtex.vtex-id:-:bibi:-:user/vtexappkey-mcc77-HBXYAE"
]
},
{
"effect": "deny",
"actions": ["POST"],
"principals": [
"vrn:vtex.vtex-id:-:bibi:-:user/*@vtex.com"
]
}
]
}
}
}
This is an advanced pattern for integrations that identify callers through a specific VTEX ID principal, including appkey-based contracts. Prefer app VRNs for IO-to-IO access when the caller is another VTEX IO app. VTEX IO auth tokens such as AUTH_TOKEN, STORE_TOKEN, and ADMIN_TOKEN play a different role: they authenticate requests to VTEX services and help preserve requester context, but they do not automatically replace route-level resource policies based on VRN principals.
If a client or route depends on access controlled by License Manager policies, role-based app policies, or outbound-access, the app MUST declare the corresponding permission explicitly in manifest.json. Resources protected by resource-based policies define access on the server side and do not require consumer apps to declare additional policies just for that server-side enforcement.
Why this matters
Without the required policy, the code may be correct but the platform will still block the access at runtime, leading to failures that are hard to debug from handler code alone.
Detection
If you see a new external host, VTEX resource, or protected capability being consumed, STOP and verify that the required consumer-side policy exists before merging the code. If the app is exposing a protected route or operation, STOP and confirm that the access rule is also enforced on the server side.
Correct
{
"policies": [
{
"name": "outbound-access",
"attrs": {
"host": "partner.example.com",
"path": "/api/*"
}
}
]
}
Wrong
{
"policies": []
}
Outbound-access policies MUST be scoped as narrowly as practical for the target host and path.
Why this matters
Broad outbound rules increase risk, make reviews harder, and allow integrations to expand silently beyond their intended surface.
Detection
If you see wildcard hosts or overly broad paths when the integration uses a much smaller surface, STOP and narrow the declaration.
Correct
{
"name": "outbound-access",
"attrs": {
"host": "partner.example.com",
"path": "/orders/*"
}
}
Wrong
{
"name": "outbound-access",
"attrs": {
"host": "*",
"path": "/*"
}
}
When a policy is added or widened, the route or integration behavior that depends on it MUST be reviewed in the same change.
Why this matters
Permissions are meaningful only in context. Reviewing a policy change without the code that consumes it makes overreach and hidden side effects easier to miss.
Detection
If a PR changes manifest.json permissions without showing the relevant route, client, or integration code, STOP and request the linked behavior before approving.
Correct
{
"policies": [
{
"name": "outbound-access",
"attrs": {
"host": "partner.example.com",
"path": "/orders/*"
}
}
]
}
Wrong
{
"policies": [
{
"name": "outbound-access",
"attrs": {
"host": "partner.example.com",
"path": "/api/*"
}
}
]
}
This broader policy alone does not explain why the app needs the expanded access.
Start from the client or route behavior, identify the minimal access needed, and declare only that permission in manifest.json. When the app exposes protected routes or operations, define the resource-based access rule on the server side as part of the same review.
Example pattern:
{
"policies": [
{
"name": "outbound-access",
"attrs": {
"host": "partner.example.com",
"path": "/orders/*"
}
}
]
}
Review permissions whenever integrations change, not only when policy errors appear in runtime.
403 that names a VRN resource or principal as a handler bug instead of an authorization or policy-mapping problem.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
vtex-io, authorization, policies, permissions, least-privilege
npx claudepluginhub vtex/skills --plugin vtex-ai-skills46 skills in this plugin
/architecture-well-architected-commerceApply when scoping, reviewing, or documenting cross-cutting VTEX commerce architecture across storefront, IO, headless, marketplace, payments, or any other VTEX module. Grounds work in the Well-Architected Commerce framework—Technical Foundation (reliability, trust, integrity; security, infrastructure, compliance), Future-proof (innovation, simplicity, efficiency; scalable and adaptable solutions), and Operational Excellence (accuracy, accountability, data-driven improvement; process and customer experience). Routes implementation detail to product tracks (IO caching and paths, Master Data strategy, marketplace integrations). Use for solution design, architecture reviews, and RFP-level technical structure./faststore-storefrontCore coding rules and workflow for developing VTEX FastStore storefronts. Use when starting any FastStore development task, writing TypeScript/React components, creating section overrides, extending the BFF, or styling. Covers all primary conventions, safety rules, and the development workflow used across every FastStore project./headless-bff-architectureApply when designing or modifying a BFF (Backend-for-Frontend) layer, middleware, or API proxy for a headless VTEX storefront. Covers BFF middleware architecture, public vs private API classification, VtexIdclientAutCookie management, API key protection, and secure request proxying. Use for any headless commerce project that must never expose VTEX_APP_KEY or call private VTEX APIs from the browser./headless-caching-strategyApply when implementing caching logic, CDN configuration, or performance optimization for a headless VTEX storefront. Covers which VTEX APIs can be cached (Intelligent Search, Catalog) versus which must never be cached (Checkout, Profile, OMS), stale-while-revalidate patterns, cache invalidation, and BFF-level caching. Use for any headless project that needs TTL rules and caching strategy guidance./headless-checkout-proxyApply when implementing cart, checkout, or order placement logic proxied through a BFF for headless VTEX storefronts. Covers OrderForm lifecycle, cart creation, item management, profile/shipping/payment attachments, orderFormId management, and secure checkout flows. Use for any headless frontend that needs to proxy VTEX Checkout API calls through a server-side layer with proper session cookie handling./headless-intelligent-searchApply when implementing search functionality, faceted navigation, or autocomplete in a headless VTEX storefront. Covers product_search, autocomplete_suggestions, facets, banners, correction_search, and top_searches endpoints, plus analytics event collection. Use for any custom frontend that integrates VTEX Intelligent Search API for product discovery and search result rendering.Other plugins' skills for the same job