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.
npx skills add MacPaw/ai-sdk-typescript --skill integrate-ai-gatewaygit clone --depth 1 https://github.com/MacPaw/ai-sdk-typescriptWrote 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/skills/macpaw/ai-sdk-typescript/integrate-ai-gateway)<a href="https://agentmods.dev/skills/macpaw/ai-sdk-typescript/integrate-ai-gateway"><img src="https://agentmods.dev/badge/skills/macpaw/ai-sdk-typescript/integrate-ai-gateway/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/skills/macpaw/ai-sdk-typescript/integrate-ai-gateway"><img src="https://agentmods.dev/badge/skills/macpaw/ai-sdk-typescript/integrate-ai-gateway.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Data Exfiltration · line 60 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
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.00096 | $0.01417 |
| Opus 5.5 | $0.00038 | $0.00567 |
| Sonnet 5.5 | $0.00019 | $0.00283 |
| Haiku 4.5 | $0.00010 | $0.00142 |
Grade A, and why
integrate-ai-gateway 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 1mo 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 — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AI Gateway Integration (@macpaw/ai-sdk)
Goal
Detect the app shape, choose one integration path, apply the smallest correct patch, add safe auth/error handling, run verification, and report exact changes.
Package surface
- Use
@macpaw/ai-sdkforcreateAIGatewayProvider,createGatewayProvider,createGatewayFetch,createVideoClient,createVoiceClient,createSpeechClient,createCreditBalanceClient,GATEWAY_PROVIDERS, errors, andGatewayProviderSettings. - Use
@macpaw/ai-sdk/provideronly as a compatibility alias. - Use
@macpaw/ai-sdk/nestjsforAIGatewayModule,@InjectAIGateway(), andAIGatewayExceptionFilter. - Do not use
createAIGatewayClient,@macpaw/ai-sdk/client,runtime,types, ortesting; they do not exist. - For UI hooks or schema helpers, follow the versioned upstream docs for the installed
ai/@ai-sdk/reactmajor version; this package does not redefine those APIs.
Guardrails
- Do not invent a token source. If server-side token retrieval is unclear, ask one question.
- Do not place real tokens in browser-only code. Frontend-only apps need a backend/BFF token source.
- Do not remove direct OpenAI/Anthropic paths unless all usages are migrated or the user asked for it.
- Use
baseURLfor staging/custom hosts.envsupports only'production'. createGatewayFetchrequires a resolvedbaseURL; do not pass onlyenv. PreferresolveGatewayBaseURL()when you want the default production host.
Choose one path
- NestJS markers:
@nestjs/common,*.module.ts, decorators -> use@macpaw/ai-sdk/nestjs+@macpaw/ai-sdk. - Next.js / Vercel markers:
next,ai,@ai-sdk/*-> keep generation onai, swap only the model provider. - Express/Fastify/Hono/server scripts -> use
createGatewayFetch, orai+ provider if already Vercel-shaped. - Video generation (create job, poll status, fetch content) -> use
createVideoClient. - Voice listing (paginated
GET /v1/voices) -> usecreateVoiceClient. - Speech generation (streaming text-to-speech,
POST /v1/audio/speech) -> usecreateSpeechClient. - Credit balance queries (active balances, totals) -> use
createCreditBalanceClient. - Existing
openai,@ai-sdk/openai, or@anthropic-ai/sdkusage -> treat as migration, not greenfield.
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.
- 1mo ago Changed · +31 lines · +25 tokens per session 862d4291e5d8
- 1mo ago First seen · 102 lines · 71 tokens per session scan A 966d9eaaa35e
integrate-ai-gateway is a skill published in the GitHub repository MacPaw/ai-sdk-typescript (58 stars, last pushed 5d ago), licensed MIT. It adds 96 tokens to every session and 1,417 once invoked, about $0.0004 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 skills, from other repositories
liter-llm-running-the-proxy
Use when running the liter-llm api OpenAI-compatible gateway — virtual keys, per-key rate limits, budgets, cost tracking, and model routing. Covers the TOML config and the 22 REST endpoints.
review-lens
Retrieve relevant past review situations from a corpus of PR review comments. Use when reviewing code, authoring PRs, writing plans, or investigating what reviewers historically flag. Surfaces the most similar past objections ranked by usefulness — no API tokens, no LLM calls at query time.
chroma
Open-source embedding database for AI applications. Store embeddings and metadata, perform vector and full-text search, filter by metadata. Simple 4-function API. Scales from notebooks to production clusters. Use for semantic search, RAG applications, or document retrieval. Best for local development and open-source…
gemini-api-agent-platform
Guides the usage of the Gemini API on Agent Platform with the Google Gen AI SDK for enterprise AI applications. Covers SDK usage (Python, JS/TS, Go, Java, C#), capabilities like Live API, tools, multimedia generation, caching, and batch prediction.
open-source
Documentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or Tools configuration, is writing code that imports from browseruse, asks about @sandbox deployment, supported LLM models, Actor API, custom tools, lifecycle…
deepstream-sop
Use this skill when building, deploying, evaluating, debugging, or measuring latency for the DeepStream SOP Inference Microservice — a GPU-accelerated FastAPI service that detects whether operators perform assembly-line steps in order via event boundary detection (GEBD) plus VLM classification. Trigger even if the…