CtrlK
BlogDocsLog inGet started
Tessl Logo

netlify-ai-gateway

Use Netlify AI Gateway to call OpenAI, Anthropic Claude, Google Gemini, TypeSafe (Jev), or OpenRouter-hosted models (xAI/DeepSeek/Meta/Mistral/Qwen) from Netlify Functions or Edge Functions without managing provider accounts or API keys. Reach for this when adding an AI feature to a Netlify app — a chatbot, text summarizer, image generator, joke/content generator, form-submission routing or analysis, or any LLM call — or when wiring the OpenAI/Anthropic/Gemini/TypeSafe/OpenRouter SDK into a Netlify Function, choosing which env vars to use, streaming long generations, or debugging why gateway calls fail at build time or return 401.

70

Quality

85%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

71%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A highly actionable body with complete executable code for all five providers, precise env-var guidance, and a genuinely useful footguns section. Its weaknesses are token efficiency — the duplicated house-rules section and the generic React client code — and a monolithic structure where provider examples and billing details would be better split into reference files.

Suggestions

Remove or collapse the merged 'Netlify house rules' section: rules 1–6 duplicate the 'Footguns' and env-var sections almost verbatim, costing ~35 lines of tokens for no new information.

Split the per-provider SDK examples and the 'Billing, limits, constraints' section into separate reference files (e.g. references/providers.md, references/billing.md) and keep SKILL.md as a concise overview, which would also shorten the body below monolithic length.

Drop the full `src/App.jsx` fetch-button component (or reduce it to one line describing the client fetch) — writing a React fetch handler is knowledge Claude already has; keep the Function-side code that is Netlify-specific.

DimensionReasoningScore

Conciseness

The body is dense and fact-rich (no padding explaining what LLMs or Netlify are), but the merged 'Netlify house rules' section at the end restates the footguns section nearly verbatim (SDK-not-fetch, browser-callability, runtime-only credentials, 60s timeout, live providers endpoint), and the full React `App.jsx` fetch-button component is boilerplate Claude already knows. This is more than 'minor instances of over-explanation', so it sits at 3 rather than 4.

3 / 5

Actionability

Every provider has complete, copy-paste-ready code ('new Anthropic()', 'new GoogleGenAI({})', the TypeSafe choice() routing example, the OpenRouter chat.send example), plus an install command, a full Vite function with an availability guard ('if (!process.env.OPENAI_BASE_URL)') and try/catch error responses, and exact env-var pairs. Fully executable and covers the common cases.

5 / 5

Workflow Clarity

The setup flow is clearly sequenced ('netlify login → netlify init → netlify deploy --prod # required: activates the gateway') and the footguns plus the example's availability check and error handling act as checkpoints. However, streaming long generations is directed ('Stream long generations (SDK streaming + ReadableStream)') without any example, and there is no validate/retry feedback loop for the debug path — clear sequence with most checkpoints, hence 4 rather than 5.

4 / 5

Progressive Disclosure

No bundle files exist (references/, scripts/, assets/ are absent), and the 234-line body holds everything inline: five provider SDK examples, a full-stack app example, local-dev setup, a detailed billing/limits section, and the appended house rules. Sections are well-headed and external doc links are one level deep, but content that clearly belongs in separate reference files (per-provider examples, billing details) is inlined in a single monolithic file — matching the 'some structure but could be better organized; content that should be separate is inline' anchor rather than 4.

3 / 5

Total

15

/

20

Passed

Description

100%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

An excellent description: it states concretely what the skill does, enumerates natural trigger scenarios a user would actually verbalize (chatbot, summarizer, image generator, form routing, 401 debugging), and is unmistakably scoped to Netlify. Both the 'what' and 'when' clauses are explicit and complete.

DimensionReasoningScore

Specificity

The description lists multiple concrete actions — 'call OpenAI, Anthropic Claude, Google Gemini, TypeSafe (Jev), or OpenRouter-hosted models... from Netlify Functions or Edge Functions without managing provider accounts or API keys', 'wiring the... SDK into a Netlify Function', 'choosing which env vars to use', 'streaming long generations', and 'debugging why gateway calls fail at build time or return 401'. This is comprehensive coverage of the skill's capabilities, matching the anchor 'Lists multiple specific concrete actions; comprehensive coverage' rather than the level below ('minor gaps in coverage').

5 / 5

Completeness

It explicitly answers both questions: the 'what' ('Use Netlify AI Gateway to call... models... without managing provider accounts or API keys') and the 'when' ('Reach for this when adding an AI feature to a Netlify app — ... or when wiring the... SDK into a Netlify Function, choosing which env vars to use, streaming long generations, or debugging why gateway calls fail'). Both are concrete and explicit, matching the top anchor.

5 / 5

Trigger Term Quality

Natural user-facing phrases are covered comprehensively: 'a chatbot, text summarizer, image generator, joke/content generator, form-submission routing or analysis, or any LLM call', plus concrete debugging triggers like 'return 401' and provider/SDK names users would actually say. No technical-only jargon or missing common synonyms — clearly the top anchor.

5 / 5

Distinctiveness Conflict Risk

The description is tightly scoped to 'Netlify AI Gateway', 'Netlify Functions or Edge Functions', and specific provider SDKs — a clear niche with distinct triggers (Netlify-deployed AI features, env var selection, gateway 401s). It would not plausibly fire for a non-Netlify LLM task.

5 / 5

Total

20

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository
netlify/context-and-tools
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.