Borrowing it
Nothing to install: this file belongs to Azure-Samples/AI-Gateway. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Azure-Samples/AI-Gateway/main/.github/skills/apim-kql/SKILL.mdgit clone --depth 1 https://github.com/Azure-Samples/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/skills/azure-samples/ai-gateway/apim-kql)<a href="https://agentmods.dev/skills/azure-samples/ai-gateway/apim-kql"><img src="https://agentmods.dev/badge/skills/azure-samples/ai-gateway/apim-kql/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/azure-samples/ai-gateway/apim-kql"><img src="https://agentmods.dev/badge/skills/azure-samples/ai-gateway/apim-kql.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00085 | $0.02024 |
| Opus 5 | $0.00043 | $0.01012 |
| Sonnet 5 | $0.00017 | $0.00405 |
| Haiku 4.5 | $0.00009 | $0.00202 |
Grade A, and why
apim-kql 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 9d 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 — 307 lines — stays where its author put it; the contents beside it link to each section on GitHub.
APIM KQL Skill
Guide for creating Kusto Query Language (KQL) queries for Azure API Management monitoring data in Azure Monitor.
Quick Start
Basic Gateway Logs Query
ApiManagementGatewayLogs
| where TimeGenerated > ago(1h)
| project TimeGenerated, Method, Url, ResponseCode, TotalTime, BackendTime, CallerIpAddress
| order by TimeGenerated desc
| take 100
LLM Token Usage Query
ApiManagementGatewayLlmLog
| where TimeGenerated > ago(24h)
| summarize
TotalPromptTokens = sum(PromptTokens),
TotalCompletionTokens = sum(CompletionTokens),
TotalTokens = sum(TotalTokens)
by DeploymentName, ModelName
Tables Overview
| Table | Description | Use Case |
|---|---|---|
ApiManagementGatewayLogs |
Gateway request/response logs | API traffic analysis, errors, latency |
ApiManagementGatewayLlmLog |
LLM/AI model usage logs | Token usage, model performance |
ApiManagementGatewayMCPLog |
MCP server logs | MCP tool calls, sessions |
ApiManagementWebSocketConnectionLogs |
WebSocket connection events | Real-time API monitoring |
AppRequests |
Application Insights requests | End-to-end request tracking |
AppMetrics |
Application Insights metrics | Custom metrics analysis |
AppTraces |
Application Insights traces | Debug and diagnostic traces |
For complete table schemas, see references/table-schemas.md.
Essential Query Patterns
Joining LLM Logs with Gateway Logs
let llmLogs = ApiManagementGatewayLlmLog
| where DeploymentName != '';
let logsWithSubscription = llmLogs
| join kind=leftouter ApiManagementGatewayLogs on CorrelationId
| project
SubscriptionId = ApimSubscriptionId,
DeploymentName,
ModelName,
PromptTokens,
CompletionTokens,
TotalTokens;
logsWithSubscription
| summarize
SumPromptTokens = sum(PromptTokens),
SumCompletionTokens = sum(CompletionTokens),
SumTotalTokens = sum(TotalTokens)
by SubscriptionId, DeploymentName
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 9d ago First seen · 307 lines · 85 tokens per session scan A 11939ec48055
apim-kql is a skill published in the GitHub repository Azure-Samples/AI-Gateway (983 stars, last pushed 1mo ago), licensed MIT. It adds 85 tokens to every session and 2,024 once invoked, about $0.0004 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-30.
Other skills, from other repositories
azure-maps-search-dotnet
Azure Maps SDK for .NET. Location-based services including geocoding, routing, rendering, geolocation, and weather. Use for address search, directions, map tiles, IP geolocation, and weather data. Triggers: "Azure Maps", "MapsSearchClient", "MapsRoutingClient", "MapsRenderingClient", "geocoding .NET", "route…
azure-eventgrid-dotnet
Azure Event Grid SDK for .NET. Client library for publishing and consuming events with Azure Event Grid. Use for event-driven architectures, pub/sub messaging, CloudEvents, and EventGridEvents. Triggers: "Event Grid", "EventGridPublisherClient", "CloudEvent", "EventGridEvent", "publish events .NET", "event-driven"…
azure-mgmt-apicenter-dotnet
Azure API Center SDK for .NET. Centralized API inventory management with governance, versioning, and discovery. Use for creating API services, workspaces, APIs, versions, definitions, environments, deployments, and metadata schemas. Triggers: "API Center", "ApiCenterService", "ApiCenterWorkspace", "ApiCenterApi", "API…
microsoft-azure-webjobs-extensions-authentication-events-dotnet
Microsoft Entra Authentication Events SDK for .NET. Azure Functions triggers for custom authentication extensions. Use for token enrichment, custom claims, attribute collection, and OTP customization in Entra ID. Triggers: "Authentication Events", "WebJobsAuthenticationEventsTrigger", "OnTokenIssuanceStart"…
azure-appconfiguration-java
Azure App Configuration SDK for Java. Centralized application configuration management with key-value settings, feature flags, and snapshots. Triggers: "ConfigurationClient java", "app configuration java", "feature flag java", "configuration setting java", "azure config java".
azure-speech-to-text-rest-py
Azure Speech to Text REST API for short audio (Python). Use for simple speech recognition of audio files up to 60 seconds without the Speech SDK. Triggers: "speech to text REST", "short audio transcription", "speech recognition REST API", "STT REST", "recognize speech REST". DO NOT USE FOR: Long audio (>60 seconds)…