Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/tray-tecnologia/tray-api-ai-pluginnpx agentmods add rules/tray-tecnologia/tray-api-ai-plugin/tray-apiWrote 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.
[](https://agentmods.dev/rules/tray-tecnologia/tray-api-ai-plugin/tray-api)<a href="https://agentmods.dev/rules/tray-tecnologia/tray-api-ai-plugin/tray-api"><img src="https://agentmods.dev/badge/rules/tray-tecnologia/tray-api-ai-plugin/tray-api/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.
<a href="https://agentmods.dev/rules/tray-tecnologia/tray-api-ai-plugin/tray-api"><img src="https://agentmods.dev/badge/rules/tray-tecnologia/tray-api-ai-plugin/tray-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00070 | $0.01641 |
| Opus 5.5 | $0.00028 | $0.00656 |
| Sonnet 5.5 | $0.00014 | $0.00328 |
| Haiku 4.5 | $0.00007 | $0.00164 |
Grade A, and why
tray-api 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Tray API — Regras do projeto
Convenções obrigatórias
access_tokencomo query parameter em toda chamada:?access_token={token}.- URL base:
https://{api_address}/(retornada no callback OAuth, varia por loja). access_tokenexpira em 3 h;refresh_tokenexpira em 30 dias.- Payload JSON envolto na chave do recurso:
{"Product": {...}},{"Order": {...}}. - Rate limit: 180 req/min e 10.000 req/dia — tratar HTTP 429 com retry exponencial.
- Paginação máxima: 50 itens por requisição.
- Nunca escrever
access_token,consumer_keyouconsumer_secretcomo literais.
Bloco MANDATORY e lint de skills
- Toda skill nova deve ter
## MANDATORY: Tool Call(s) Required Before Answeringimediatamente após o frontmatter. - O bloco deve incluir chamada OBRIGATÓRIA(S) a
node skills/tray-dev/scripts/search_docs.mjs(sempre). - Skills com schema local (categoria A:
autorizacao,produtos,pedidos,clientes,webhooks,variacoes,categorias,marcas) devem incluir também chamada OBRIGATÓRIA(S) anode skills/<recurso>/scripts/validate.mjs. - Validar com
npm run lint:skills. O CI rodanpm run lint:skillsantes do smoke.
Validação local
- 8 skills têm
scripts/validate.mjs:autorizacao,produtos,pedidos,clientes,webhooks,variacoes,categorias,marcas. - Skills com múltiplos schemas exigem
--schema=<op>. Use--list-schemaspara descobrir os disponíveis. - Output humano por default;
--jsonpara programático. Exit codes:0válido ·1inválido ·2erro de uso. - Formats BR custom:
cpf,cnpj,cep,ean,ncm,date,datetime,email,uri. Detalhes emscripts/lib/SUBSET.md.
Busca em docs
Para confirmar comportamento da API antes de gerar código, use a skill tray-dev:
node skills/tray-dev/scripts/search_docs.mjs "<termo>"
node skills/tray-dev/scripts/search_docs.mjs --topic=<slug> "<termo>"
node skills/tray-dev/scripts/search_docs.mjs --json "<termo>"
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.
- 2mo ago First seen · 118 lines · 70 tokens per session scan A e22c29d5b725
tray-api is a cursor rule published in the GitHub repository tray-tecnologia/tray-api-ai-plugin (15 stars, last pushed 2mo ago), licensed MIT. It adds 70 tokens to every session and 1,641 once invoked, about $0.0003 per session on Opus 5.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.
Other cursor rules, from other repositories
cursor
You are working on the checkout service. Preserve transaction integrity and auditability.
medusa-cursorrules
You are an expert senior software engineer specializing in modern web development, with deep expertise in TypeScript, Medusa, React.js, and TailwindCSS.
cursorrules
You are assisting the Orbital engineering team — 5 backend engineers building a multi-tenant SaaS for logistics operations. TypeScript monorepo using NestJS, PostgreSQL (drizzle-orm), and BullMQ. All engineers use shared conventions.
medusa
Medusa rules and best practices. These rules should be used when building applications with Medusa.
mcp-server
This rule explains how to create a remote MCP server on Cloudflare with both free and paid tools (using Stripe).
templates-extended
Additional specialized templates for specific contexts.