Agent skill · DevOps & Cloud

kql

KQL language expertise for writing correct, efficient Kusto Query Language queries. Covers syntax gotchas, join patterns, dynamic types, datetime pitfalls, regex patterns, serialization, memory management, result-size discipline, and advanced functions (geo, vector, graph). USE THIS SKILL whenever writing, debugging, or reviewing KQL queries — even simple ones — because the gotchas section prevents the most common errors that waste tool calls and cause expensive retry cascades. Trigger on: KQL, Kusto, ADX, Azure Data Explorer, Fabric Real-Time Intelligence, EventHouse, Log Analytics, log analy

Microsoft293,217★ · +1,988/wk · 14 repos on radarProfile →
copilotMIT
Install
npx skills add microsoft/skills --skill kql --agent copilot

Same command for any agent — swap --agent for claude-code, codex, cursor.

Facts
Files in the skill folder: 5
SKILL.md size: 18 KB
Bundled scripts: none
Path: .github/skills/kql/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 2,860
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

The skill teaches correct, efficient Kusto Query Language (KQL) query construction and troubleshooting. It stresses avoiding common gotchas, especially around dynamic types, join patterns, serialization, memory usage, and result-size discipline. It also covers advanced functions (geo, vector, graph) and regex-related patterns, with emphasis on when to apply specific casts, pre-filtering, and careful handling of pipe-forward syntax.

How it works

The content explains KQL as a pipe-forward language and distinguishes between Query and Management planes. It details:

  • Dynamic Type Discipline: casting dynamic columns in by, on, or order by using explicit casts like tostring(), tolong(), or todouble().
  • Join Patterns & Pitfalls: only equality in join predicates, explicit left/right attribute references, and cardinality checks before large joins; guidance on pre-binning ranges.
  • Regex in KQL: proper use of extract_all with capturing groups and various regex functions.
  • Serialization Requirements: serialize or order by before windowing functions such as row_cumsum(), row_number(), etc.
  • Memory-Safe Query Patterns: steps to reduce memory usage (count, where first, avoid high-cardinality dcount, check join cardinality, materialize for reused subqueries).
  • Result Size Discipline: end exploratory queries with take, top, or project only essential columns; caution with large vectors.
  • String Comparison Strictness: casting both sides for computed strings.
  • Advanced Functions: examples for vector similarity, geo operations, graph queries, and time series.
  • Self-Correction Lookup Table: mapping common errors to fixes like dynamic casting, pre-binning, or serialization.

When to use it

Use this skill whenever writing, debugging, or reviewing KQL queries to prevent common errors and avoid expensive retries.

What it can touch

The skill references KQL operators, functions, and patterns, including dynamic casting and serialization strategies, but does not specify external tools beyond KQL context. It does not enumerate executable tool invocations beyond the examples provided within the KQL context.

Caveats

The material focuses on recommended practices and common error messages (e.g., dynamic type issues, exclusive join predicates, serialization requirements) but does not guarantee specific outcomes. It adheres to KQL syntax rules and demonstrates fixes rather than asserting end-to-end results.

From the SKILL.md

# KQL Mastery > **Try it yourself**: All `✅` examples in this skill can be run against the public help cluster: > `https://help.kusto.windows.net`, database `Samples` (contains `StormEvents`, `SimpleGraph_Nodes`/`Edges`, `nyc_taxi`, and more). ## 1. KQL Basics Kusto Query Language (KQL) is a pipe-forward query language for exploring data. It is the native query language for Azure Data Explorer (AD

More from skills
All skills →
About this skill
What does the kql skill do?

KQL language expertise for writing correct, efficient Kusto Query Language queries. Covers syntax gotchas, join patterns, dynamic types, datetime pitfalls, regex patterns, serialization, memory management, result-size discipline, and advanced functions (geo, vector, graph). USE THIS SKILL whenever writing, debugging, or reviewing KQL queries — even simple ones — because the gotchas section prevents the most common errors that waste tool calls and cause expensive retry cascades. Trigger on: KQL, Kusto, ADX, Azure Data Explorer, Fabric Real-Time Intelligence, EventHouse, Log Analytics, log analy

How do I install it?

Run `npx skills add microsoft/skills --skill kql --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From microsoft/skills, a repository with 2,860 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going