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 agentmods add commands/azure/ai-gateway/buildgit clone --depth 1 https://github.com/Azure/ai-gatewayWrote 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/commands/azure/ai-gateway/build)<a href="https://agentmods.dev/commands/azure/ai-gateway/build"><img src="https://agentmods.dev/badge/commands/azure/ai-gateway/build.svg" alt="Measured on agentmods" 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 | $0.00035 | $0.00814 |
| Opus 5 | $0.00017 | $0.00407 |
| Sonnet 5 | $0.00007 | $0.00163 |
| Haiku 4.5 | $0.00003 | $0.00081 |
Grade A, and why
build 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 3d 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 — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/ai-gateway:build
Take the user all the way from discovery to working code that uses an existing
AI Gateway's models and/or MCP tools — in whatever they're building. This command runs
the full workflow in the bundled skill skills/use-ai-gateway/SKILL.md end to end:
- Discover & select the models and MCP tool servers in the gateway
(Part 1 of the skill). Use
$ARGUMENTSfor the target gateway (ARMgatewayResourceId— required to list assets; a host alone is not enough, so resolve or ask for the id if only a host is given) and, if present, the desired use case. Ask the user to confirm the selected assets before continuing. - Retrieve a credential — list the gateway API keys and read the secret of the
chosen key. The same gateway key authenticates both the model passthrough and the
MCP tool servers, passed in the
Api-Keyheader. - Integrate (Part 2 of the skill). Ask what the user is building and pick the path:
- Call a model over the gateway's OpenAI-compatible passthrough (any language or raw HTTP).
- Connect MCP tools from an MCP-capable client/app.
- Scaffold a standalone agent with the GitHub Copilot SDK
(
github-copilot-sdk >= 1.0.0) if the user wants a ready-to-run agent project — default to Python unless they ask for TypeScript. Produce a complete, self-contained project: agent code,.env/.env.example,.gitignore(must ignore.env),requirements.txt(orpackage.json), and aREADME.md. Integrate into the user's existing project when they have one, respecting its language and conventions.
- Run and verify the integration once and report the outcome, distinguishing genuine
wiring bugs (
unknown_model,401/403, missing env var) from benign backend conditions (429/quota).
Guardrails
- Consumption only. This is strictly read-only against the gateway. Never issue ARM
PUT/PATCH/DELETEcalls and never create, provision, or delete gateways, models, tools, connections, or products. If the user asks to provision anything, tell them that is an administrator task done in the AI Gateway Portal. - Never hardcode secrets. Read the gateway key from an environment variable and keep
.envout of source control. Warn the user that the written.envholds a live key and to rotate it in the portal if it is ever exposed. - Use
properties.deployment.modelName(exact dots/casing) as the model identifier — prefer it over the ARMnameordisplayName(which some gateways reject withunknown_model). Runtime calls use the gateway'sproperties.gatewayUrlhost and the/default/workspace segment:<host>/default/models/openai/v1/...and<host>/default/toolservers/<name>/mcp(omitting/default/returns404). - Authenticate models and MCP tool servers with the
Api-Keyheader — notAuthorization: Bearer(bearer-only auth is rejected, typically with a401or a misleadingunknown_model).
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.
- 3d ago First seen · 53 lines · 0 tokens per session scan A 6e3033a55215
build is a command published in the GitHub repository Azure/ai-gateway (2 stars, last pushed 7d ago), licensed MIT. It adds 35 tokens to every session and 814 once invoked, about $0.0002 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-31.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.