kql-grounded-queries

kql-grounded-queries is a skill for Claude Code, Codex from microsoft/cat-agent-skills. It costs 108 tokens per session (4,246 once invoked), scanned A, original, MIT.

A set of rules for writing Kusto Query Language (KQL) queries for Microsoft Sentinel, Log Analytics, and Defender XDR. KQL is Microsoft's language for searching security and monitoring data.

In plain words
What is it for?
It helps write, fix, change, or explain security searches and detection queries while checking that their data fields exist.
Why use it?
It prevents queries from using unverified table or column names and makes the target Microsoft service explicit.

Skill for Claude CodeCodex ✓ vendor

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

Good fit It helps write, fix, change, or explain security searches and detection queries while checking that their data fields exist.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/microsoft/cat-agent-skills/kql-grounded-queries
About the project

microsoft/cat-agent-skills is a static website that catalogs reusable instruction sets and related packages for AI agents. People use it to search, filter, rate, and download skills for Cowork, Copilot Studio, and Scout, along with Copilot plugins and Scout automations. The catalogue entries are the skills, instructions, plugins, and settings displayed by the site.

microsoft/cat-agent-skills · 93 stars · on GitHub

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 microsoft/cat-agent-skills --skill kql-grounded-queries
Clone the repo
git clone --depth 1 https://github.com/microsoft/cat-agent-skills

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 kql-grounded-queries

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/cat-agent-skills/kql-grounded-queries/github.svg)](https://agentmods.dev/skills/microsoft/cat-agent-skills/kql-grounded-queries)
Your own site
<a href="https://agentmods.dev/skills/microsoft/cat-agent-skills/kql-grounded-queries"><img src="https://agentmods.dev/badge/skills/microsoft/cat-agent-skills/kql-grounded-queries/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 kql-grounded-queries

Your own site · 80×15
<a href="https://agentmods.dev/skills/microsoft/cat-agent-skills/kql-grounded-queries"><img src="https://agentmods.dev/badge/skills/microsoft/cat-agent-skills/kql-grounded-queries.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,246 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.
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.00108 $0.04246
Opus 5.5 $0.00043 $0.01698
Sonnet 5.5 $0.00022 $0.00849
Haiku 4.5 $0.00011 $0.00425

Measured 8d ago against content hash dfe8c7c077a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kql-grounded-queries 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 8d 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.

submissions/kql-grounded-queries/SKILL.md · 294 lines

How it starts

The opening of the file, as written. The whole thing — 294 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Never emit a table or column name you have not verified in this session. One exception exists, and it is opt-in, separately labelled and shaped differently from an ordinary answer: the unverified-schema diagnostic described under Guardrails and Output format. It is never produced unless the user asks for it by name. What you know about these schemas from training is a starting guess, not a fact: Microsoft security tables are renamed regularly, retired names appear more often in training data than the names that replaced them, and some preview tables ship with no published column reference at all.

Instructions

  1. Confirm the surface. Sentinel / Log Analytics workspace, Defender XDR Advanced Hunting, or the Sentinel data lake. This decides which documentation is authoritative, which timestamp column is correct, and which operators exist. If the user did not say, state the assumption you are making.

  2. Keep candidate table names inside the tenant until their public status is established. Read the surface's index first — that sends nothing of the user's — and check every candidate against it. Presence in the index is the whole test, and it is the only one.

    A table the index lists is published. It goes out to its reference page and into searches normally, and it makes no difference whether you proposed the name or the user did: SigninLogs is SigninLogs either way, and asking someone for a schema they could read off a public page would be absurd.

    A table the index does not list is not published, and that settles exactly one thing: it does not leave. It does not make the table the user's own. A name absent from the index may be a typo, a custom table or a preview with nothing published yet, and which of those it is belongs to step 3, on the evidence. Until then it is unclassified — not assumed custom, not sent anywhere.

    The cheapest evidence is already in your hands. You have just read the index, so compare against it locally: a name one character away from something listed is a typo long before it is a custom table, and offering the correction costs nothing and sends nothing. Asking someone for a getschema run on a misspelled public table wastes their time and tells them the wrong thing about their tenant.

    This is about table names, because a table name is what goes into a URL or a search string. Column names never leave in the first place: a column is verified by looking for it in the schema you already fetched for its table, which is a comparison you make locally and sends nothing. So a column the user pasted is checked against the published page like any other, and there is no reason to ask them for a schema they can read off a reference you are already holding. The columns that do need the tenant are the ones belonging to a table that turned out to be custom or preview, and they arrive with that table's schema.

    Unpublished names never leave, whatever they later turn out to be. No lookup, no search, not even to find out whether they are documented, because the name is sent either way. Once step 3 settles that one is custom or an unpublished preview, it goes to the portal's schema tab or a getschema run, and a redacted name is fine where the real one is sensitive. Where no documentation tool exists at all, nothing can be established as published, so nothing goes out and step 3's stop applies. Published or not, every name is unproven until verified.

  3. Verify every published candidate against its reference page before writing anything — names the index did not carry are not on this path. These templates are a shortcut, not the authority — the index pages below carry the real link for every table, so when a template does not land, take the URL from the index rather than trying another spelling:

    • Log Analytics / Sentinel: https://learn.microsoft.com/azure/azure-monitor/reference/tables/{tablename} (lowercase)
    • Defender XDR: https://learn.microsoft.com/defender-xdr/advanced-hunting-{tablename}-table (lowercase)
    • Log Analytics index: https://learn.microsoft.com/azure/azure-monitor/reference/tables-index
    • Defender XDR index: https://learn.microsoft.com/defender-xdr/advanced-hunting-schema-tables
    • Sentinel data lake asset tables: https://learn.microsoft.com/azure/sentinel/datalake/asset-data-tables

Read the full file on GitHub · 294 lines

Files

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.

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. 8d ago First seen · 294 lines · 108 tokens per session scan A dfe8c7c077a2

Subscribe to this mod's changes

kql-grounded-queries is a skill published in the GitHub repository microsoft/cat-agent-skills (93 stars, last pushed today), licensed MIT. It adds 108 tokens to every session and 4,246 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-10-20.

Related

Other skills, from other repositories

agent-platform-model-registry

Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.

google/skills · 60 tokens

foundry-config-setup

Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.

microsoft/agent-framework · 65 tokens

google-cloud-solution-agentic-analytics-spark-knowledge-catalog

Discovers requirements and designs an end-to-end governed agentic analytics solution using Knowledge Catalog and Managed Service for Apache Spark (Lightning Engine). Use when designing data science and analytics workflows across structured and unstructured distributed data (including in S3, Azure Blob, AlloyDB, and…

google/skills · 132 tokens

training-check

Interactively monitor training metrics from the current Codex session, periodically checking WandB or fallback logs for NaN, divergence, plateaus, and broken runs.

wanshuiyin/Auto-claude-code-research-in-sleep · 35 tokens

nemo-automodel-launcher-config

Configure NeMo AutoModel job launches for interactive runs, Slurm clusters, and SkyPilot cloud execution.

NVIDIA/skills · 30 tokens

finetuning

Fine-tune models on Microsoft Foundry using SFT (supervised), DPO (preference), or RFT (reinforcement with graders). Covers dataset preparation, training job submission, deployment, and evaluation. USE FOR: fine-tune, SFT, DPO, RFT, training data, grader, distillation, fine-tuned model, training job, large file…

microsoft/skills · 132 tokens