KQL Lens — review, optimize or explain a Kusto query before you run it

kql-lens.skillsafe.ai

Clean

Paste one KQL query — from Azure Monitor / Log Analytics, Application Insights, Azure Data Explorer, Microsoft Sentinel or Azure Resource Graph — and pick what you need from it. Review: what is wrong, stage by stage, with the exact fix for each. Optimize: the query to run instead, written out in full, with one note per change saying what it buys. Explain: what an inherited query actually answers, one entry per pipeline stage, with the traps named. A real KQL reader runs first in your browser for free — string-aware and comment-aware pipeline splitting that resolves your let bindings — and raises up to twenty-four deterministic findings, each quoting its stage: the missing time filter, the filter that runs after the join, contains where has would use the term index, join with no kind= and the innerunique it silently inherits, take before sort, and more. Nine checks come back pass, fail, partial or unknown, and unknown is reserved for what only a table schema can settle. GUIDs, emails, IP addresses, resource ids and cluster URIs are masked in the browser before the query is even read, and the run is blocked if any raw value survives into the request. Derived from and crediting the Microsoft agent skill @microsoft/azure-kusto. Not affiliated with or endorsed by Microsoft or Azure.

kql-lens.skillsafe.ai
KQL Lens — review, optimize or explain a Kusto query before you run it on a computer KQL Lens — review, optimize or explain a Kusto query before you run it on a phone
PricingUsage-based + 10% creator margin
Billed model rate$1.10 in / $5.50 out per 1M tokens
Creator margin+10%
Effective rate$1.20 in / $6.00 out per 1M tokens
Security scanClean — skill and frontend scanned
Model gpt-terra
Created2026-08-14
Updated2026-10-17

Every public app is built from a security-scanned skill and must pass a clean scan — skill and frontend — before it can be listed. Have a skill of your own? Turn it into an app — or read the step-by-step walkthrough.

About KQL Lens

KQL Lens takes a single Kusto Query Language query and gives you one of three outputs: a stage-by-stage review of what is wrong, a complete rewritten query with a note for each change, or a plain explanation of what an inherited query answers. It is meant for people writing or maintaining queries in Log Analytics, Application Insights, Azure Data Explorer, Microsoft Sentinel or Azure Resource Graph.

Before any model runs, a free reader in the browser splits the query into pipeline stages while respecting strings, comments and let bindings, and flags issues such as a time filter applied after a join or a join with no kind=. Identifiers like GUIDs, emails, IP addresses and resource ids are masked first. The tool only reads the query text: it never connects to your cluster or sees your data, and a rewrite should be read before it is run.

How it works

  1. Paste one KQL query, drag in a .kql or .csl file, or load one of the two bundled example queries.
  2. Choose where the query runs and optionally add what it should answer, a table schema and extra context.
  3. Read the free instant read, which lists the pipeline stages and the deterministic findings without signing in.
  4. Run the Review, Optimize or Explain lane to get the model's findings, rewrite or stage-by-stage explanation, along with nine pass, fail, partial or unknown checks.
  5. Copy the fixes or rewritten query, or download the results as .kql, .md, .json or CSV.

What people use it for

  • Checking a Log Analytics query for a missing or late time filter before it scans a whole workspace.
  • Getting a rewritten dashboard query that filters and projects columns before joining.
  • Understanding an inherited Sentinel or Azure Data Explorer query one stage at a time.
  • Spotting contains predicates that could use has and the term index.
  • Calling the same review, optimize and explain lanes from your own code through the documented HTTP API.

Questions

Is KQL Lens free?
The instant read in the browser is free and needs no account, and the two bundled examples replay saved runs for every lane at no cost. Running a review, optimize or explain lane on your own query is metered in SkillSafe credits and requires signing in.
Does my query or data leave my browser?
Nothing uploads until you run a lane. GUIDs, email addresses, IP addresses, Azure resource ids, cluster URIs and credential-shaped values are masked first, and the run is blocked if any raw value would survive into the request. The tool never connects to your cluster or reads your data.
Why do some checks come back unknown?
Schema grounding and scan volume can only be settled with a table schema, so they return unknown when no schema is provided. Checks that depend only on the query text, such as a missing time filter, can fail definitively.
Which Kusto platforms does it support?
You can mark a query as Azure Monitor / Log Analytics, Application Insights, Azure Data Explorer, Microsoft Sentinel, Azure Resource Graph or not sure, which changes the conventions applied; for example, Resource Graph has no time column.
Is it a Microsoft product?
No. It is derived from the Microsoft agent skill @microsoft/azure-kusto and is not affiliated with or endorsed by Microsoft or Azure.
Share
View source frontend files — the agent prompt and server code stay private

Frontend files (files)