Token导航 LogoToken导航

Agent Skill · 前端设计

vtex-io-auth-tokens-and-context(vtex io 身份验证令牌和上下文)

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

vtex-io-auth-tokens-and-context 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 1,912。

总安装 3,336周安装 139GitHub Stars 25下载 1,112核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:vtex-io-auth-tokens-and-context(vtex io 身份验证令牌和上下文)
来源仓库:https://github.com/vtex/skills
仓库路径:skills/vtex-io-auth-tokens-and-context
安装命令:
npx skills add https://github.com/vtex/skills --skill vtex-io-auth-tokens-and-context
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/vtex/skills --skill vtex-io-auth-tokens-and-context

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于辅助安全审计、权限检查和认证流程分析。vtex-io-auth-tokens-and-context 属于前端设计类 Skill,可作为该场景下的辅助能力补充。适合梳理敏感配置、检查依赖风险或生成安全复核清单。通过 npx skills add 命令从指定仓库安装并使用该技能。

不能将工具输出直接作为最终结论,涉及密钥或生产系统时需确认最小权限。建议结合项目实际环境评估操作边界和脱敏方式。

来源仓库内路径:skills/vtex-io-auth-tokens-and-context

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/vtex/skills --skill vtex-io-auth-tokens-and-co…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

vtex-io-auth-tokens-and-context 怎么安装?

在终端执行 npx skills add https://github.com/vtex/skills --skill vtex-io-auth-tokens-and-context。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

vtex-io-auth-tokens-and-context 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

vtex-io-auth-tokens-and-context 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

vtex-io-auth-tokens-and-context 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

vtex-io-auth-tokens-and-context 用的人多吗?

公开数据是累计安装 3,336 次,近一周安装 139 次,下载 1,112 次,GitHub 25 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

vtex-io-auth-tokens-and-context 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
vtex-io-auth-tokens-and-context

vtex io 身份验证令牌和上下文 · 本页

3,33625接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Auth Tokens & Request Context

When this skill applies

Use this skill when the main decision is which VTEX IO identity should authenticate a backend request to VTEX services.

  • Choosing between ctx.authToken, ctx.storeUserAuthToken, and ctx.adminUserAuthToken
  • Deciding whether a VTEX client call should use AUTH_TOKEN, STORE_TOKEN, or ADMIN_TOKEN
  • Reviewing storefront and Admin integrations that should respect the current user identity
  • Replacing hardcoded appKey and appToken usage inside a VTEX IO app

Do not use this skill for:

  • deciding which policies belong in manifest.json
  • modeling route-level authorization or resource-based policies
  • choosing between ExternalClient, JanusClient, and other client abstractions
  • browser-side login or session UX flows
  • validating route input or deciding what data may cross the app boundary

Decision rules

  • Use this skill to decide which identity talks to VTEX endpoints, not what that identity is authorized to do.
  • Use AUTH_TOKEN with ctx.authToken only for app-level operations that are not tied to a current shopper or Admin user.
  • Use STORE_TOKEN with ctx.storeUserAuthToken whenever the action comes from storefront browsing or a shopper-triggered flow and the integration should respect shopper permissions.
  • Use ADMIN_TOKEN with ctx.adminUserAuthToken whenever the action comes from an Admin interface and the integration should respect the logged-in Admin user's License Manager permissions.
  • Prefer user tokens whenever they are available. The official guidance is to avoid app-token authentication when a store or Admin user token can represent the requester more accurately.
  • If the corresponding user token is not present, fall back to AUTH_TOKEN only when the operation is truly app-scoped and does not depend on a current shopper or Admin identity.
  • When using VTEX IO clients that accept authMethod, pass the token choice explicitly when the default app identity is not the right one for the request.
  • When wrapping custom VTEX clients, propagate the matching auth token from IOContext at the client boundary instead of hardcoding credentials in handlers.
  • Keep token choice aligned with the user journey: storefront flows should not silently escalate to app-level permissions, and Admin flows should not bypass the current Admin role context.
  • ADMIN_TOKEN with ctx.adminUserAuthToken must remain server-side only and must never be exposed or proxied to browser clients.
  • Treat token choice and policy design as separate concerns: this skill decides which identity is making the call, while auth-and-policies decides what that identity is allowed to do.
  • Do not use appKey and appToken inside a VTEX IO app unless there is a documented exception outside the normal VTEX IO auth-token model.
  • Never log raw tokens or return them in responses. Tokens are request secrets, and downstream callers should receive only business data.

Token selection at a glance:

TokenContext fieldUse whenAvoid when
AUTH_TOKENctx.authTokenapp-level jobs, service-to-service work, or operations not linked to a current usera shopper or Admin user is already driving the action
STORE_TOKENctx.storeUserAuthTokenstorefront and shopper-triggered operationsbackend jobs or Admin-only operations
ADMIN_TOKENctx.adminUserAuthTokenAdmin requests that must respect the current user's LM rolestorefront flows or background app tasks

Hard constraints

Constraint: User-driven requests must prefer user tokens over the app token

If a request is initiated by a current shopper or Admin user, the VTEX integration MUST use the corresponding user token instead of defaulting to the app token.

Why this matters

Using the app token for user-driven work widens permissions unnecessarily and disconnects the request from the real user context that should govern access.

Detection

If the code runs in a storefront or Admin request path and still uses ctx.authToken or implicit app-token behavior, STOP and verify whether ctx.storeUserAuthToken or ctx.adminUserAuthToken should be used instead.

Correct

export class OmsClient extends JanusClient {
  constructor(ctx: IOContext, options?: InstanceOptions) {
    super(ctx, {
      ...options,
      headers: {
        ...options?.headers,
        VtexIdclientAutCookie: ctx.storeUserAuthToken,
      },
    })
  }
}

Wrong

export class OmsClient extends JanusClient {
  constructor(ctx: IOContext, options?: InstanceOptions) {
    super(ctx, {
      ...options,
      headers: {
        ...options?.headers,
        VtexIdclientAutCookie: ctx.authToken,
      },
    })
  }
}

Constraint: App tokens must be reserved for app-level operations that are not tied to a user

Use ctx.authToken only when the request is genuinely app-scoped and no current shopper or Admin identity should govern the action.

Why this matters

The app token carries the permissions declared in the app manifest. Using it for user-triggered actions can bypass the narrower shopper or Admin permission model that the platform expects.

Detection

If a request originates from an Admin page, storefront interaction, or another user-facing workflow, STOP before using ctx.authToken and confirm that the action is truly app-level rather than user-scoped.

Correct

export class RatesAndBenefitsClient extends JanusClient {
  constructor(ctx: IOContext, options?: InstanceOptions) {
    super(ctx, {
      ...options,
      headers: {
        ...options?.headers,
        VtexIdclientAutCookie: ctx.authToken,
      },
    })
  }
}

Wrong

export class AdminOrdersClient extends JanusClient {
  constructor(ctx: IOContext, options?: InstanceOptions) {
    super(ctx, {
      ...options,
      headers: {
        ...options?.headers,
        VtexIdclientAutCookie: ctx.authToken,
      },
    })
  }
}

This is wrong when the client is used from an Admin flow that should respect the logged-in user's role.

Constraint: VTEX IO apps must not hardcode VTEX API credentials when auth tokens are available

A VTEX IO app MUST use tokens from IOContext or authMethod instead of embedding appKey, appToken, or static VTEX credentials in source code or routine runtime configuration.

Why this matters

Hardcoded VTEX credentials are harder to rotate, easier to leak, and bypass the request-context model that VTEX IO clients already support.

Detection

If you see X-VTEX-API-AppKey, X-VTEX-API-AppToken, raw VTEX API credentials, or environment variables carrying permanent VTEX credentials inside a normal IO app integration, STOP and replace them with the correct auth-token flow unless there is a documented exception.

Correct

await ctx.clients.catalog.getSkuById(id, {
  authMethod: 'ADMIN_TOKEN',
})

Wrong

await fetch(`https://${ctx.vtex.account}.myvtex.com/api/catalog/pvt/stockkeepingunit/${id}`, {
  headers: {
    'X-VTEX-API-AppKey': process.env.VTEX_APP_KEY!,
    'X-VTEX-API-AppToken': process.env.VTEX_APP_TOKEN!,
  },
})

Preferred pattern

Start from the requester context, choose the token identity that matches that requester, and keep the token propagation inside the client layer.

Minimal selection guide:

storefront request -> STORE_TOKEN / ctx.storeUserAuthToken
admin request -> ADMIN_TOKEN / ctx.adminUserAuthToken
background app work -> AUTH_TOKEN / ctx.authToken

Pass the token explicitly when the client supports authMethod:

await ctx.clients.orders.listOrders({
  authMethod: 'ADMIN_TOKEN',
})
await ctx.clients.orders.listOrders({
  authMethod: 'STORE_TOKEN',
})

Or inject the matching token in a custom VTEX client:

import type { IOContext, InstanceOptions } from '@vtex/api'
import { JanusClient } from '@vtex/api'

export class OmsClient extends JanusClient {
  constructor(ctx: IOContext, options?: InstanceOptions) {
    super(ctx, {
      ...options,
      headers: {
        ...options?.headers,
        VtexIdclientAutCookie: ctx.adminUserAuthToken,
      },
    })
  }
}

Keep the decision close to the request boundary, then let downstream handlers and services depend on the correctly configured client rather than choosing tokens ad hoc in many places.

Common failure modes

  • Defaulting every VTEX request to ctx.authToken, even when a shopper or Admin user initiated the action.
  • Using ctx.authToken in Admin pages and accidentally bypassing the current Admin user's License Manager role context.
  • Using ctx.authToken in storefront flows that should be limited by shopper permissions.
  • Hardcoding appKey and appToken in an IO app instead of using auth tokens from IOContext.
  • Choosing the right token in one client method but forgetting to apply the same identity consistently across related calls.
  • Mixing token choice with policy modeling and treating them as the same decision.
  • Logging ctx.authToken, ctx.storeUserAuthToken, or ctx.adminUserAuthToken in plain text, or forwarding raw tokens to downstream services that do not need them.

Review checklist

  • Does each VTEX integration use the correct requester identity: shopper, Admin user, or app?
  • Are ctx.storeUserAuthToken and ctx.adminUserAuthToken preferred when a user is actually driving the action?
  • Is ctx.authToken used only for app-level operations that are not tied to a current user?
  • Are hardcoded VTEX credentials absent from normal IO app integrations?
  • Is token propagation centralized in the client layer or explicit authMethod usage rather than scattered across handlers?

Related skills

Reference

平台分布

Codex

35.77%
按下载量换算398

Claude

32.4%
按下载量换算360

Cursor

18.01%
按下载量换算200

Gemini CLI

10.17%
按下载量换算113

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills