tray-validar-integracao

tray-validar-integracao is a command for Claude Code from tray-tecnologia/tray-api-ai-plugin. It costs 22 tokens per session (674 once invoked), scanned A, original, MIT.

A command that checks code integrating with Tray, an e-commerce platform, for authentication, token renewal, error handling, request limits, and related practices.

In plain words
What is it for?
Use it to review OAuth flows, secure token storage, automatic token renewal, Tray error responses, request-rate controls, and handling of missing or inactive stores.
Why use it?
Tray integrations can fail when tokens expire, stores change status, fields are invalid, or the API receives too many requests. The validation checklist helps find these issues in the code.

Command for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the tray-api plugin — 36 skills, 3 commands, 5 agents, 1 MCP server shipped together

Good fit Use it to review OAuth flows, secure token storage, automatic token renewal, Tray error responses, request-rate controls, and handling of missing or inactive stores.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/tray-tecnologia/tray-api-ai-plugin/validar-integracao
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/tray-tecnologia/tray-api-ai-plugin

Made for: Claude Code.

Or install tray-api, the plugin that ships this one along with the rest of its 36 skills, 3 commands, 5 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tray-validar-integracao

README.md
[![agentmods](https://agentmods.dev/badge/commands/tray-tecnologia/tray-api-ai-plugin/validar-integracao/github.svg)](https://agentmods.dev/commands/tray-tecnologia/tray-api-ai-plugin/validar-integracao)
Your own site
<a href="https://agentmods.dev/commands/tray-tecnologia/tray-api-ai-plugin/validar-integracao"><img src="https://agentmods.dev/badge/commands/tray-tecnologia/tray-api-ai-plugin/validar-integracao/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tray-validar-integracao

Your own site · 80×15
<a href="https://agentmods.dev/commands/tray-tecnologia/tray-api-ai-plugin/validar-integracao"><img src="https://agentmods.dev/badge/commands/tray-tecnologia/tray-api-ai-plugin/validar-integracao.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 674 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00674
Opus 5 $0.00011 $0.00337
Sonnet 5 $0.00004 $0.00135
Haiku 4.5 $0.00002 $0.00067

Measured 9d ago against content hash bec39592cf83, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

tray-validar-integracao scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/validar-integracao.md · 64 lines

How it starts

The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Validação de Integração — Tray

Analise o código do projeto atual e verifique os itens abaixo:

Checklist de Validação

1. Autenticação OAuth

  • Fluxo de 3 etapas implementado (redirecionamento → callback → troca de token)
  • consumer_key e consumer_secret em variáveis de ambiente (nunca hardcoded)
  • access_token armazenado de forma segura

2. Renovação de Token

  • Renovação automática antes de 3 horas (ex: a cada 2h30)
  • Uso de GET /auth?refresh_token={token} para renovar
  • Tratamento de refresh_token expirado (30 dias → nova autorização completa)

3. Tratamento de Erros

  • Código 1000 — token expirado, loja ativa → renovar automaticamente
  • Código 1001 — loja bloqueada → notificar administrador
  • Código 1002 — loja inativa → verificar ativação
  • Código 1003 — loja cancelada → suspender operações
  • Código 1004 — loja suspensa → verificar com suporte
  • Código 400 — validação de campos antes do envio
  • Código 401 — renovação automática de token
  • Código 404 — tratamento de recurso não encontrado
  • Código 429 — backoff exponencial para rate limit

4. Limites de Requisições

  • Controle de 180 requisições por minuto
  • Controle de 10.000 requisições diárias (50.000 corporate)
  • Backoff exponencial implementado (1s → 2s → 4s → 8s...)
  • Operações em lote com intervalos

5. Paginação

  • Parâmetro limit definido (máximo 50, padrão 30)
  • Iteração correta por todas as páginas quando necessário
  • Uso do campo total da resposta para controle

6. Formato de Dados

  • Body JSON envolvido na chave do recurso ({"Product": {...}})
  • Datas no formato YYYY-MM-DD
  • Timestamps no formato YYYY-MM-DD HH:MM:SS
  • CPF/CNPJ validados antes do envio

7. Segurança

  • Tokens em variáveis de ambiente (não no código-fonte)
  • consumer_secret protegido
  • HTTPS em todas as chamadas
  • Webhook validando seller_id recebido

8. Webhooks (se aplicável)

  • Endpoint retornando HTTP 200 rapidamente
  • Processamento assíncrono (fila)
  • Idempotência (tratar duplicatas)
  • Logs de webhooks recebidos

Read the full file on GitHub · 64 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 64 lines · 22 tokens per session scan A bec39592cf83

Subscribe to this mod's changes

tray-validar-integracao is a command published in the GitHub repository tray-tecnologia/tray-api-ai-plugin (15 stars, last pushed 27d ago), licensed MIT. It adds 22 tokens to every session and 674 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other commands, from other repositories