integrate-ai-gateway

integrate-ai-gateway is a skill for Claude Code, Codex from MacPaw/ai-sdk-typescript. It costs 96 tokens per session (1,417 once invoked), scanned A, original, MIT.

Instructions for connecting applications to MacPaw's AI Gateway through its software library. The gateway provides an application path to AI services and video generation.

In plain words
What is it for?
It is for integrating NestJS, Next.js, Vercel AI SDK, or fetch-based applications with AI Gateway and its video client.
Why use it?
It helps developers choose the right integration method and handle authentication and errors without exposing access tokens in browser code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for integrating NestJS, Next.js, Vercel AI SDK, or fetch-based applications with AI Gateway and its video client.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/macpaw/ai-sdk-typescript/integrate-ai-gateway
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.

Any agent
npx skills add MacPaw/ai-sdk-typescript --skill integrate-ai-gateway
Clone the repo
git clone --depth 1 https://github.com/MacPaw/ai-sdk-typescript

Made for: Claude Code, Codex.

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 integrate-ai-gateway

README.md
[![agentmods](https://agentmods.dev/badge/skills/macpaw/ai-sdk-typescript/integrate-ai-gateway/github.svg)](https://agentmods.dev/skills/macpaw/ai-sdk-typescript/integrate-ai-gateway)
Your own site
<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.

agentmods 80×15 button for integrate-ai-gateway

Your own site · 80×15
<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>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,417 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
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.
How audits are shown
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.00096 $0.01417
Opus 5.5 $0.00038 $0.00567
Sonnet 5.5 $0.00019 $0.00283
Haiku 4.5 $0.00010 $0.00142

Measured 1mo ago against content hash 862d4291e5d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

templates/cursor/skills/integrate-ai-gateway/SKILL.md · 133 lines

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-sdk for createAIGatewayProvider, createGatewayProvider, createGatewayFetch, createVideoClient, createVoiceClient, createSpeechClient, createCreditBalanceClient, GATEWAY_PROVIDERS, errors, and GatewayProviderSettings.
  • Use @macpaw/ai-sdk/provider only as a compatibility alias.
  • Use @macpaw/ai-sdk/nestjs for AIGatewayModule, @InjectAIGateway(), and AIGatewayExceptionFilter.
  • Do not use createAIGatewayClient, @macpaw/ai-sdk/client, runtime, types, or testing; they do not exist.
  • For UI hooks or schema helpers, follow the versioned upstream docs for the installed ai / @ai-sdk/react major 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 baseURL for staging/custom hosts. env supports only 'production'.
  • createGatewayFetch requires a resolved baseURL; do not pass only env. Prefer resolveGatewayBaseURL() 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 on ai, swap only the model provider.
  • Express/Fastify/Hono/server scripts -> use createGatewayFetch, or ai + provider if already Vercel-shaped.
  • Video generation (create job, poll status, fetch content) -> use createVideoClient.
  • Voice listing (paginated GET /v1/voices) -> use createVoiceClient.
  • Speech generation (streaming text-to-speech, POST /v1/audio/speech) -> use createSpeechClient.
  • Credit balance queries (active balances, totals) -> use createCreditBalanceClient.
  • Existing openai, @ai-sdk/openai, or @anthropic-ai/sdk usage -> treat as migration, not greenfield.

Read the full file on GitHub · 133 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. 1mo ago Changed · +31 lines · +25 tokens per session 862d4291e5d8
  2. 1mo ago First seen · 102 lines · 71 tokens per session scan A 966d9eaaa35e

Subscribe to this mod's changes

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.

Related

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.

xberg-io/liter-llm · 45 tokens

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.

futuregerald/futuregerald-claude-plugin · 60 tokens

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…

ihatesea69/HieuNghi-AI-Skills · 63 tokens

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.

davila7/claude-code-templates · 61 tokens

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…

browser-use/browser-use · 137 tokens

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…

NVIDIA/skills · 219 tokens