[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69B467A7CDMFQ0T6Q0ZA12Q":3,"skill-same:01M69B467A7CDMFQ0T6Q0ZA12Q":112},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":34,"publishedAt":57,"linkOnly":58,"markdownContent":59,"markdownBody":60,"frontMatter":61,"refName":62,"commitSha":63,"skillDirectory":64,"forksCount":65,"repositoryHtmlUrl":66,"repositoryHomepageUrl":67,"ownerHtmlUrl":68,"ownerBlogUrl":69,"ownerDescription":70,"updatedAt":71,"install":72,"resources":85},"01M69B467A7CDMFQ0T6Q0ZA12Q","kql",null,"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 analysis, data exploration, time series, anomaly detection, summarize, where clause, join, extend, project, let statement, parse operator, extract function, any mention of pipe-forward query syntax.","microsoft\u002Fskills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69AJYYW4E1RMSYCQDJ4FJSH",3204,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fkql\u002FSKILL.md",[18,23,26,31],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",{"categoryNo":32,"categoryName":33,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000036","内容创作者",[5,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56],"geo","parse","anomaly","section","for","datetime","join","regex","project","time","pipe","exploration","writing","log","discipline","tool","time series","vector","azure","analytics","memory","summarize","2026-11-10 10:12:30",false,"---\nname: kql\ndescription: \"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 analysis, data exploration, time series, anomaly detection, summarize, where clause, join, extend, project, let statement, parse operator, extract function, any mention of pipe-forward query syntax.\"\n---\n\n# KQL Mastery\n\n> **Try it yourself**: All `✅` examples in this skill can be run against the public help cluster:\n> `https:\u002F\u002Fhelp.kusto.windows.net`, database `Samples` (contains `StormEvents`, `SimpleGraph_Nodes`\u002F`Edges`, `nyc_taxi`, and more).\n\n## 1. KQL Basics\n\nKusto Query Language (KQL) is a pipe-forward query language for exploring data. It is the native query language for Azure Data Explorer (ADX), Microsoft Fabric Real-Time Intelligence (EventHouse), Azure Monitor Log Analytics, Microsoft Sentinel, and other Microsoft data services.\n\n### Pipe-forward syntax\n\nKQL queries are a chain of operators separated by `|`. Data flows left to right:\n\n```kql\nStormEvents                          \u002F\u002F start with a table\n| where State == \"TEXAS\"             \u002F\u002F filter rows\n| summarize count() by EventType     \u002F\u002F aggregate\n| top 5 by count_ desc              \u002F\u002F limit results\n```\n\n### Query vs management commands\n\nKQL has two execution planes:\n\n| Plane | Starts with | Examples |\n|-------|-------------|----------|\n| **Query** | Table name, `let`, `print`, `datatable` | `StormEvents \\| where State == \"TEXAS\"` |\n| **Management** | `.show`, `.create`, `.set`, `.drop`, `.alter` | `.show tables`, `.show table T schema` |\n\nManagement commands can be followed by query operators (the output is tabular), but the entire request runs on the management plane. You cannot start with a query and pipe into a management command.\n\n```kql\n\u002F\u002F ✅ WORKS — management command piped to query operators\n.show tables | project TableName | where TableName has \"Events\"\n\n\u002F\u002F ❌ WRONG — query piped into management command\nStormEvents | take 5 | .show tables\n```\n\nWhen in doubt: if the first token starts with `.`, it's a management command. For a full catalog of schema exploration commands, see `references\u002Fdiscovery-queries.md`.\n\n## 2. Dynamic Type Discipline\n\nKQL's `dynamic` type is flexible but strict in certain contexts. A common mistake is using a dynamic column in `summarize by`, `order by`, or `join on` without casting.\n\n**The rule**: Any time you use a dynamic-typed column in `by`, `on`, or `order by`, wrap it in an explicit cast.\n\n```kql\n\u002F\u002F ❌ ERROR: \"Summarize group key ... is of a 'dynamic' type\"\nStormEvents | summarize count() by StormSummary.Details.Location\n\n\u002F\u002F ✅ FIX\nStormEvents | summarize count() by tostring(StormSummary.Details.Location)\n```\n\n```kql\n\u002F\u002F ❌ ERROR: \"order operator: key can't be of dynamic type\"\nStormEvents | order by StormSummary.TotalDamages desc\n\n\u002F\u002F ✅ FIX\nStormEvents | order by tolong(StormSummary.TotalDamages) desc\n```\n\n```kql\n\u002F\u002F ❌ ERROR in join: dynamic join key\nStormEvents | join kind=inner (PopulationData) on $left.StormSummary == $right.State\n\n\u002F\u002F ✅ FIX — cast both sides\nStormEvents\n| extend State_str = tostring(StormSummary.Details.Location)\n| join kind=inner (PopulationData) on $left.State_str == $right.State\n```\n\n**Self-correction**: When you see \"is of a 'dynamic' type\" in an error, add `tostring()`, `tolong()`, or `todouble()`.\n\n## 3. Join Patterns & Pitfalls\n\nKQL joins have constraints that differ from SQL.\n\n### Equality only\nKQL join conditions support **only `==`**. No `\u003C`, `>`, `!=`, or function calls in join predicates.\n\n```kql\n\u002F\u002F ❌ ERROR: \"Only equality is allowed in this context\"\nStormEvents | join (nyc_taxi) on geo_distance_2points(BeginLon, BeginLat, pickup_longitude, pickup_latitude) \u003C 1000\n\n\u002F\u002F ✅ WORKAROUND — pre-bucket into spatial cells, then join on cell ID\nStormEvents\n| extend cell = geo_point_to_s2cell(BeginLon, BeginLat, 8)\n| join kind=inner (nyc_taxi | extend cell = geo_point_to_s2cell(pickup_longitude, pickup_latitude, 8)) on cell\n```\n\nFor range joins, pre-bin values: `| extend bin_val = bin(Value, 100)`, then join on `bin_val`. Note: values near bin boundaries may land in adjacent bins — consider checking neighboring bins or overlapping the range for precision.\n\n### Left\u002Fright attribute matching\nBoth sides of a join `on` clause must reference **column entities only** — not expressions, not aggregates.\n\n```kql\n\u002F\u002F ❌ ERROR: \"for each left attribute, right attribute should be selected\"\nStormEvents | join kind=inner (PopulationData) on $left.State\n\n\u002F\u002F ✅ FIX — specify both sides explicitly\nStormEvents | join kind=inner (PopulationData) on $left.State == $right.State\n```\n\n### Cardinality check before large joins\n**Always** check cardinality before joining tables with >10K rows. A cross-join explosion was the source of the single `E_RUNAWAY_QUERY` error (25K × 195 = potential 4.8M rows).\n\n```kql\n\u002F\u002F Before joining, check how many rows each side contributes\nStormEvents | summarize dcount(State)        \u002F\u002F → 67 distinct states\nPopulationData | summarize dcount(State)     \u002F\u002F → 52 — safe to join\n```\n\n## 4. Regex in KQL\n\nKQL handles regex natively — no need for Python.\n\n### The `extract_all` gotcha\nUnlike Python's `re.findall()`, KQL's `extract_all` **requires capturing groups** in the regex:\n\n```kql\n\u002F\u002F ❌ ERROR: \"extractall(): argument 2 must be a valid regex with [1..16] matching groups\"\nStormEvents | extend words = extract_all(@\"[a-zA-Z]{3,}\", EventNarrative)\n\n\u002F\u002F ✅ FIX — add parentheses around the pattern\nStormEvents | extend words = extract_all(@\"([a-zA-Z]{3,})\", EventNarrative)\n```\n\n### Regex toolkit — don't fall back to Python\n| Function | Use case | Example |\n|----------|----------|---------|\n| `extract(regex, group, source)` | Single match | `extract(@\"User '([^']+)'\", 1, Msg)` |\n| `extract_all(regex, source)` | All matches (needs `()`) | `extract_all(@\"(\\w+)\", Text)` |\n| `parse` | Structured extraction | `parse Msg with * \"User '\" Sender \"' sent\" *` |\n| `matches regex` | Boolean filter | `where Url matches regex @\"^https?:\u002F\u002F\"` |\n| `replace_regex` | Find and replace | `replace_regex(Text, @\"\\s+\", \" \")` |\n\n## 5. Serialization Requirements\n\nWindow functions need serialized (ordered) input.\n\n```kql\n\u002F\u002F ❌ ERROR: \"Function 'row_cumsum' cannot be invoked. The row set must be serialized.\"\nStormEvents\n| where State == \"TEXAS\"\n| summarize DailyCount = count() by bin(StartTime, 1d)\n| extend CumulativeCount = row_cumsum(DailyCount)\n\n\u002F\u002F ✅ FIX — add | serialize (or | order by, which implicitly serializes)\nStormEvents\n| where State == \"TEXAS\"\n| summarize DailyCount = count() by bin(StartTime, 1d)\n| order by StartTime asc\n| extend CumulativeCount = row_cumsum(DailyCount)\n```\n\nFunctions requiring serialization: `row_number()`, `row_cumsum()`, `prev()`, `next()`, `row_window_session()`.\n\n## 6. Memory-Safe Query Patterns\n\nThe most common memory error. Caused by scanning too much data without pre-filtering.\n\n### The progression of safety\n```\nSafest ──────────────────────────────────────────────── Most dangerous\n| count    | take 10    | where + summarize    | summarize (no filter)    | full scan\n```\n\n### Rules for large tables (>1M rows)\n\n1. **Always start with `| count`** to understand table size\n2. **Always `| where` before `| summarize`** — filter time range, partition key, or category first\n3. **Never `dcount()` on high-cardinality columns** without pre-filtering\n4. **Check join cardinality** before executing (see Section 3)\n5. **Use `materialize()`** for subqueries referenced multiple times\n\n```kql\n\u002F\u002F ❌ OUT OF MEMORY — large table, no filter, many group-by columns\nStormEvents\n| summarize dcount(EventType), count() by StartTime, State, Source\n| where dcount_EventType > 1\n\n\u002F\u002F ✅ SAFE — filter first, then aggregate\nStormEvents\n| where StartTime between (datetime(2007-04-15) .. datetime(2007-04-16))\n| summarize dcount(EventType) by State, Source\n| where dcount_EventType > 1\n```\n\n### When you see `E_LOW_MEMORY_CONDITION`\nThe query touched too much data. Your options:\n- Add `| where` filters (time range, partition key)\n- Reduce the number of `by` columns in `summarize`\n- Break into smaller time windows and union results\n- Use `| sample 10000` for exploratory work instead of full scans\n\n### When you see `E_RUNAWAY_QUERY`\nA join or aggregation produced too many output rows. Check join cardinality — one or both sides is too large.\n\n## 7. Result Size Discipline\n\nLarge results slow down analysis. Prevention:\n\n| Query type | Safeguard |\n|-----------|-----------|\n| Exploratory | Always end with `\\| take 10` or `\\| take 20` |\n| Aggregation | Use `\\| top 20 by ...` not unbounded `summarize` |\n| Wide rows (vectors, JSON) | `\\| project` only needed columns |\n| `make_list()` \u002F `make_set()` | Avoid on high-cardinality groups (produces huge cells) |\n| Unknown size | Run `\\| count` first |\n\n**The vector trap**: Tables with embedding columns (1536-dim float arrays) produce ~30KB per row. Even `| take 20` yields 600KB. Always `| project` away vector columns unless you specifically need them.\n\n## 8. String Comparison Strictness\n\nKQL sometimes requires explicit casts when comparing computed string values — even when both sides are already strings.\n\n```kql\n\u002F\u002F ❌ ERROR: \"Cannot compare values of types string and string. Try adding explicit casts\"\nStormEvents | where geo_point_to_s2cell(BeginLon, BeginLat, 16) == other_cell\n\n\u002F\u002F ✅ FIX — wrap both sides in tostring()\nStormEvents | where tostring(geo_point_to_s2cell(BeginLon, BeginLat, 16)) == tostring(other_cell)\n```\n\nThis is most common with computed values from `geo_point_to_s2cell()` and `strcat()` comparisons. When in doubt, cast with `tostring()`.\n\n## 9. Advanced Functions\n\nKQL handles these natively — no need for Python:\n\n### Vector similarity\n```kql\n\u002F\u002F try it! — cosine similarity on Iris feature vectors\nlet target = pack_array(5.1, 3.5, 1.4, 0.2);\nIris\n| extend Vec = pack_array(SepalLength, SepalWidth, PetalLength, PetalWidth)\n| extend sim = series_cosine_similarity(Vec, target)\n| top 5 by sim desc\n```\n\n### Geo operations\n```kql\n\u002F\u002F Distance between two points (meters)\nStormEvents | extend dist = geo_distance_2points(BeginLon, BeginLat, EndLon, EndLat)\n\n\u002F\u002F Spatial bucketing for joins\nStormEvents | extend cell = geo_point_to_s2cell(BeginLon, BeginLat, 8)\n```\n\n### Graph queries\n```kql\n\u002F\u002F Persistent graph model — try it on the help cluster!\ngraph(\"Simple\")\n| graph-match (src)-[e*1..3]->(dst)\n  where src.name == \"Alice\"\n  project src.name, dst.name, path_length = array_length(e)\n\n\u002F\u002F Transient graph — build inline with make-graph\nSimpleGraph_Edges\n| make-graph source --> target with SimpleGraph_Nodes on id\n| graph-match (src)-[e*1..5]->(dst)\n  where src.name == \"Alice\"\n  project src.name, dst.name, path_length = array_length(e)\n```\n\n### Time series\n```kql\n\u002F\u002F try it! — create a time series and detect anomalies\nStormEvents\n| make-series count() default=0 on StartTime step 1d\n| extend anomalies = series_decompose_anomalies(count_)\n```\n\nFor detailed examples and patterns, consult `references\u002Fadvanced-patterns.md`.\n\n## 10. Self-Correction Lookup Table\n\nWhen you encounter an error, look it up here before retrying:\n\n| Error message contains | Likely cause | Fix |\n|---|---|---|\n| `is of a 'dynamic' type` | Dynamic column in `by`\u002F`on`\u002F`order by` | Wrap in `tostring()`\u002F`tolong()` |\n| `Only equality is allowed` | Range predicate in join condition | Pre-bucket with S2\u002FH3 cells or `bin()` |\n| `extractall(): matching groups` | Missing `()` in regex | Add `()`: `@\"(\\w+)\"` not `@\"\\w+\"` |\n| `row set must be serialized` | Window function on unsorted data | Add `\\| serialize` or `\\| order by` before it |\n| `Cannot compare values of types string and string` | Computed string comparison | Add `tostring()` on both sides |\n| `Failed to resolve column named 'X'` | Wrong column name or wrong table | Run `.show table T schema` to check column names |\n| `E_LOW_MEMORY_CONDITION` | Query touched too much data | Add `\\| where` filters, reduce time range, break into steps |\n| `E_RUNAWAY_QUERY` | Join\u002Faggregation produced too many rows | Check cardinality before joining; add pre-filters |\n| `for each left attribute, right attribute` | Join `on` clause incomplete | Use explicit form: `on $left.X == $right.Y` |\n| `needs to be bracketed` | Reserved word used as identifier | Use `['keyword']` syntax |\n| `plugin doesn't exist` | Unavailable plugin on this cluster | Fall back to equivalent function or Python |\n| `Expected string literal in datetime()` | Bare integer in datetime literal | Use `datetime(2024-01-01)` not `datetime(2024)` |\n| `Unexpected token` after `by` | Complex expression in summarize by-clause | `extend` the expression first, then `summarize by` the column |\n| `not recognized` \u002F `unknown operator` | Operator not available on this engine | Check operator support; try equivalent (`order by` = `sort by`) |\n\n## 11. Datetime Pitfalls\n\nDatetime literals are a common source of errors. A wrong literal format can cascade into completely different approaches instead of fixing the small issue.\n\n### Literal format\n```kql\n\u002F\u002F ❌ WRONG — bare year is not a valid datetime\nStormEvents | where StartTime > datetime(2007)\n\n\u002F\u002F ✅ RIGHT — always use full date format\nStormEvents | where StartTime > datetime(2007-01-01)\n```\n\n### Filtering by year, month, or hour\n```kql\n\u002F\u002F ❌ WRONG — comparing datetime column to integer\nStormEvents | where StartTime == 2007\n\n\u002F\u002F ✅ RIGHT — use datetime_part() to extract components\nStormEvents | where datetime_part(\"year\", StartTime) == 2007\n\n\u002F\u002F ✅ ALSO RIGHT — use between with datetime range\nStormEvents | where StartTime between (datetime(2007-01-01) .. datetime(2007-12-31T23:59:59))\n```\n\n### Time bucketing in summarize\n```kql\n\u002F\u002F This works, but can be harder to read and reuse in complex queries\nStormEvents | summarize count() by startofmonth(StartTime)\n\n\u002F\u002F Clearer — extend first, then summarize by the computed column\nStormEvents\n| extend Month = startofmonth(StartTime)\n| summarize count() by Month\n| order by Month asc\n```\n\n### Useful datetime functions\n| Function | Purpose | Example |\n|----------|---------|---------|\n| `bin(ts, 1h)` | Round down to bucket boundary | `bin(Timestamp, 1d)` |\n| `startofmonth(ts)` | First day of month | `startofmonth(Timestamp)` |\n| `datetime_part(\"hour\", ts)` | Extract component | `datetime_part(\"year\", Timestamp)` |\n| `format_datetime(ts, fmt)` | Format as string | `format_datetime(Timestamp, \"yyyy-MM\")` |\n| `ago(1d)` | Relative time | `where Timestamp > ago(1d)` |\n| `between(a .. b)` | Range filter (inclusive) | `where Timestamp between (datetime(2024-01-01) .. datetime(2024-01-31T23:59:59))` |\n| `todatetime(str)` | Parse string → datetime | `todatetime(\"2024-01-15T10:30:00Z\")` |\n| `totimespan(str)` | Parse string → timespan | `totimespan(\"01:30:00\")` |\n\n## 12. Operator Naming & Equality\n\nKQL has subtle differences from SQL syntax.\n\n### Naming conventions\n\n| Entity | Convention | Example |\n|--------|-----------|---------|\n| Tables | UpperCamelCase | `StormEvents`, `NetworkLogs` |\n| Columns | UpperCamelCase | `StartTime`, `EventType` |\n| Variables (`let`) | snake_case | `let filtered_events = ...` |\n| Built-in functions | snake_case | `format_bytes()`, `geo_distance_2points()` |\n| Stored functions | UpperCamelCase | `.create function GetTopUsers` |\n\n### Equality operators\n```kql\n\u002F\u002F In where clauses, == is case-sensitive, =~ is case-insensitive\nStormEvents | where State == \"TEXAS\" | count        \u002F\u002F exact match\nStormEvents | where State =~ \"texas\" | count        \u002F\u002F case-insensitive\n\n\u002F\u002F In joins, use == only\nStormEvents | join kind=inner (PopulationData) on State\n```\n\n### sort vs order\nBoth `sort by` and `order by` work identically in KQL — they are aliases. Use whichever you prefer, but be consistent.\n\n### contains vs has\n```kql\n\u002F\u002F contains: substring match (slower)\nStormEvents | where EventNarrative contains \"tree\"   \u002F\u002F finds \"trees\", \"treetop\" too\n\n\u002F\u002F has: term\u002Fword match (faster, uses index)\nStormEvents | where EventNarrative has \"tree\"        \u002F\u002F matches word boundaries only\n\n\u002F\u002F For exact prefix\u002Fsuffix\nStormEvents | where EventType startswith \"Thunder\"\nStormEvents | where Source endswith \"Spotter\"\n```\n\n## 13. Error Recovery Strategy\n\nWhen a first KQL query fails, the temptation is to abandon the entire approach and try something completely different. The correct response is almost always to **fix the specific error**, not change strategy.\n\n### The pattern to avoid\n```\nQuery 1: extract(@\"pattern\", 1, col)  → Parse error\nQuery 2: todynamic(col)               → Different error  \nQuery 3: parse_json(col)              → Another error\nQuery 4: Python script                → Works but 10x tokens\n```\n\n### The correct pattern\n```\nQuery 1: extract(@\"pattern\", 1, col)  → Parse error (bad escaping)\nQuery 2: extract(@\"pattern\", 1, col)  → Fix the specific escaping issue → Success\n```\n\n**Rules for error recovery:**\n1. Read the error message carefully — it almost always tells you exactly what's wrong\n2. Fix the **specific** syntax\u002Fescaping issue, don't switch approaches\n3. Use the self-correction table (Section 10) to map errors to fixes\n4. Only switch approaches after 2 failed fixes of the same query\n5. The `parse` operator is often simpler than `extract()` for structured text:\n\n```kql\n\u002F\u002F Instead of complex regex on TraceLogs:\n\u002F\u002F extract(@\"file path: \\\"\\\"([^\\\"]+)\\\"\\\"\", 1, Message)\n\n\u002F\u002F Use parse for structured extraction (try it on help cluster, SampleLogs db):\ncluster(\"help\").database(\"SampleLogs\").TraceLogs\n| where Message has \"file path\"\n| parse Message with * \"file path: \\\"\\\"\" FilePath \"\\\"\\\"\" *\n| project Timestamp, FilePath\n| take 5\n```\n\n## 14. Query Writing Checklist\n\nBefore running any KQL query, mentally check:\n\n1. **Pre-filtered?** Large tables have a `| where` before any `| summarize`\n2. **Result bounded?** Exploratory queries end with `| take N` or `| top N`\n3. **Dynamic columns cast?** Any dynamic column in `by`\u002F`on`\u002F`order by` is wrapped\n4. **Regex has groups?** `extract_all` patterns have `()` around what you want to capture\n5. **Join cardinality safe?** Both sides checked with `dcount()` before joining\n6. **Needed columns only?** Wide tables get `| project` to drop unneeded columns\n7. **Datetime literals valid?** Using `datetime(2024-01-01)` not `datetime(2024)` or bare integers\n8. **Complex by-expressions?** Use `| extend` first, then `| summarize by` the computed column\n9. **Error recovery plan?** If a query fails, fix the specific error — don't change strategy\n","# KQL Mastery\n\n> **Try it yourself**: All `✅` examples in this skill can be run against the public help cluster:\n> `https:\u002F\u002Fhelp.kusto.windows.net`, database `Samples` (contains `StormEvents`, `SimpleGraph_Nodes`\u002F`Edges`, `nyc_taxi`, and more).\n\n## 1. KQL Basics\n\nKusto Query Language (KQL) is a pipe-forward query language for exploring data. It is the native query language for Azure Data Explorer (ADX), Microsoft Fabric Real-Time Intelligence (EventHouse), Azure Monitor Log Analytics, Microsoft Sentinel, and other Microsoft data services.\n\n### Pipe-forward syntax\n\nKQL queries are a chain of operators separated by `|`. Data flows left to right:\n\n```kql\nStormEvents                          \u002F\u002F start with a table\n| where State == \"TEXAS\"             \u002F\u002F filter rows\n| summarize count() by EventType     \u002F\u002F aggregate\n| top 5 by count_ desc              \u002F\u002F limit results\n```\n\n### Query vs management commands\n\nKQL has two execution planes:\n\n| Plane | Starts with | Examples |\n|-------|-------------|----------|\n| **Query** | Table name, `let`, `print`, `datatable` | `StormEvents \\| where State == \"TEXAS\"` |\n| **Management** | `.show`, `.create`, `.set`, `.drop`, `.alter` | `.show tables`, `.show table T schema` |\n\nManagement commands can be followed by query operators (the output is tabular), but the entire request runs on the management plane. You cannot start with a query and pipe into a management command.\n\n```kql\n\u002F\u002F ✅ WORKS — management command piped to query operators\n.show tables | project TableName | where TableName has \"Events\"\n\n\u002F\u002F ❌ WRONG — query piped into management command\nStormEvents | take 5 | .show tables\n```\n\nWhen in doubt: if the first token starts with `.`, it's a management command. For a full catalog of schema exploration commands, see `references\u002Fdiscovery-queries.md`.\n\n## 2. Dynamic Type Discipline\n\nKQL's `dynamic` type is flexible but strict in certain contexts. A common mistake is using a dynamic column in `summarize by`, `order by`, or `join on` without casting.\n\n**The rule**: Any time you use a dynamic-typed column in `by`, `on`, or `order by`, wrap it in an explicit cast.\n\n```kql\n\u002F\u002F ❌ ERROR: \"Summarize group key ... is of a 'dynamic' type\"\nStormEvents | summarize count() by StormSummary.Details.Location\n\n\u002F\u002F ✅ FIX\nStormEvents | summarize count() by tostring(StormSummary.Details.Location)\n```\n\n```kql\n\u002F\u002F ❌ ERROR: \"order operator: key can't be of dynamic type\"\nStormEvents | order by StormSummary.TotalDamages desc\n\n\u002F\u002F ✅ FIX\nStormEvents | order by tolong(StormSummary.TotalDamages) desc\n```\n\n```kql\n\u002F\u002F ❌ ERROR in join: dynamic join key\nStormEvents | join kind=inner (PopulationData) on $left.StormSummary == $right.State\n\n\u002F\u002F ✅ FIX — cast both sides\nStormEvents\n| extend State_str = tostring(StormSummary.Details.Location)\n| join kind=inner (PopulationData) on $left.State_str == $right.State\n```\n\n**Self-correction**: When you see \"is of a 'dynamic' type\" in an error, add `tostring()`, `tolong()`, or `todouble()`.\n\n## 3. Join Patterns & Pitfalls\n\nKQL joins have constraints that differ from SQL.\n\n### Equality only\nKQL join conditions support **only `==`**. No `\u003C`, `>`, `!=`, or function calls in join predicates.\n\n```kql\n\u002F\u002F ❌ ERROR: \"Only equality is allowed in this context\"\nStormEvents | join (nyc_taxi) on geo_distance_2points(BeginLon, BeginLat, pickup_longitude, pickup_latitude) \u003C 1000\n\n\u002F\u002F ✅ WORKAROUND — pre-bucket into spatial cells, then join on cell ID\nStormEvents\n| extend cell = geo_point_to_s2cell(BeginLon, BeginLat, 8)\n| join kind=inner (nyc_taxi | extend cell = geo_point_to_s2cell(pickup_longitude, pickup_latitude, 8)) on cell\n```\n\nFor range joins, pre-bin values: `| extend bin_val = bin(Value, 100)`, then join on `bin_val`. Note: values near bin boundaries may land in adjacent bins — consider checking neighboring bins or overlapping the range for precision.\n\n### Left\u002Fright attribute matching\nBoth sides of a join `on` clause must reference **column entities only** — not expressions, not aggregates.\n\n```kql\n\u002F\u002F ❌ ERROR: \"for each left attribute, right attribute should be selected\"\nStormEvents | join kind=inner (PopulationData) on $left.State\n\n\u002F\u002F ✅ FIX — specify both sides explicitly\nStormEvents | join kind=inner (PopulationData) on $left.State == $right.State\n```\n\n### Cardinality check before large joins\n**Always** check cardinality before joining tables with >10K rows. A cross-join explosion was the source of the single `E_RUNAWAY_QUERY` error (25K × 195 = potential 4.8M rows).\n\n```kql\n\u002F\u002F Before joining, check how many rows each side contributes\nStormEvents | summarize dcount(State)        \u002F\u002F → 67 distinct states\nPopulationData | summarize dcount(State)     \u002F\u002F → 52 — safe to join\n```\n\n## 4. Regex in KQL\n\nKQL handles regex natively — no need for Python.\n\n### The `extract_all` gotcha\nUnlike Python's `re.findall()`, KQL's `extract_all` **requires capturing groups** in the regex:\n\n```kql\n\u002F\u002F ❌ ERROR: \"extractall(): argument 2 must be a valid regex with [1..16] matching groups\"\nStormEvents | extend words = extract_all(@\"[a-zA-Z]{3,}\", EventNarrative)\n\n\u002F\u002F ✅ FIX — add parentheses around the pattern\nStormEvents | extend words = extract_all(@\"([a-zA-Z]{3,})\", EventNarrative)\n```\n\n### Regex toolkit — don't fall back to Python\n| Function | Use case | Example |\n|----------|----------|---------|\n| `extract(regex, group, source)` | Single match | `extract(@\"User '([^']+)'\", 1, Msg)` |\n| `extract_all(regex, source)` | All matches (needs `()`) | `extract_all(@\"(\\w+)\", Text)` |\n| `parse` | Structured extraction | `parse Msg with * \"User '\" Sender \"' sent\" *` |\n| `matches regex` | Boolean filter | `where Url matches regex @\"^https?:\u002F\u002F\"` |\n| `replace_regex` | Find and replace | `replace_regex(Text, @\"\\s+\", \" \")` |\n\n## 5. Serialization Requirements\n\nWindow functions need serialized (ordered) input.\n\n```kql\n\u002F\u002F ❌ ERROR: \"Function 'row_cumsum' cannot be invoked. The row set must be serialized.\"\nStormEvents\n| where State == \"TEXAS\"\n| summarize DailyCount = count() by bin(StartTime, 1d)\n| extend CumulativeCount = row_cumsum(DailyCount)\n\n\u002F\u002F ✅ FIX — add | serialize (or | order by, which implicitly serializes)\nStormEvents\n| where State == \"TEXAS\"\n| summarize DailyCount = count() by bin(StartTime, 1d)\n| order by StartTime asc\n| extend CumulativeCount = row_cumsum(DailyCount)\n```\n\nFunctions requiring serialization: `row_number()`, `row_cumsum()`, `prev()`, `next()`, `row_window_session()`.\n\n## 6. Memory-Safe Query Patterns\n\nThe most common memory error. Caused by scanning too much data without pre-filtering.\n\n### The progression of safety\n```\nSafest ──────────────────────────────────────────────── Most dangerous\n| count    | take 10    | where + summarize    | summarize (no filter)    | full scan\n```\n\n### Rules for large tables (>1M rows)\n\n1. **Always start with `| count`** to understand table size\n2. **Always `| where` before `| summarize`** — filter time range, partition key, or category first\n3. **Never `dcount()` on high-cardinality columns** without pre-filtering\n4. **Check join cardinality** before executing (see Section 3)\n5. **Use `materialize()`** for subqueries referenced multiple times\n\n```kql\n\u002F\u002F ❌ OUT OF MEMORY — large table, no filter, many group-by columns\nStormEvents\n| summarize dcount(EventType), count() by StartTime, State, Source\n| where dcount_EventType > 1\n\n\u002F\u002F ✅ SAFE — filter first, then aggregate\nStormEvents\n| where StartTime between (datetime(2007-04-15) .. datetime(2007-04-16))\n| summarize dcount(EventType) by State, Source\n| where dcount_EventType > 1\n```\n\n### When you see `E_LOW_MEMORY_CONDITION`\nThe query touched too much data. Your options:\n- Add `| where` filters (time range, partition key)\n- Reduce the number of `by` columns in `summarize`\n- Break into smaller time windows and union results\n- Use `| sample 10000` for exploratory work instead of full scans\n\n### When you see `E_RUNAWAY_QUERY`\nA join or aggregation produced too many output rows. Check join cardinality — one or both sides is too large.\n\n## 7. Result Size Discipline\n\nLarge results slow down analysis. Prevention:\n\n| Query type | Safeguard |\n|-----------|-----------|\n| Exploratory | Always end with `\\| take 10` or `\\| take 20` |\n| Aggregation | Use `\\| top 20 by ...` not unbounded `summarize` |\n| Wide rows (vectors, JSON) | `\\| project` only needed columns |\n| `make_list()` \u002F `make_set()` | Avoid on high-cardinality groups (produces huge cells) |\n| Unknown size | Run `\\| count` first |\n\n**The vector trap**: Tables with embedding columns (1536-dim float arrays) produce ~30KB per row. Even `| take 20` yields 600KB. Always `| project` away vector columns unless you specifically need them.\n\n## 8. String Comparison Strictness\n\nKQL sometimes requires explicit casts when comparing computed string values — even when both sides are already strings.\n\n```kql\n\u002F\u002F ❌ ERROR: \"Cannot compare values of types string and string. Try adding explicit casts\"\nStormEvents | where geo_point_to_s2cell(BeginLon, BeginLat, 16) == other_cell\n\n\u002F\u002F ✅ FIX — wrap both sides in tostring()\nStormEvents | where tostring(geo_point_to_s2cell(BeginLon, BeginLat, 16)) == tostring(other_cell)\n```\n\nThis is most common with computed values from `geo_point_to_s2cell()` and `strcat()` comparisons. When in doubt, cast with `tostring()`.\n\n## 9. Advanced Functions\n\nKQL handles these natively — no need for Python:\n\n### Vector similarity\n```kql\n\u002F\u002F try it! — cosine similarity on Iris feature vectors\nlet target = pack_array(5.1, 3.5, 1.4, 0.2);\nIris\n| extend Vec = pack_array(SepalLength, SepalWidth, PetalLength, PetalWidth)\n| extend sim = series_cosine_similarity(Vec, target)\n| top 5 by sim desc\n```\n\n### Geo operations\n```kql\n\u002F\u002F Distance between two points (meters)\nStormEvents | extend dist = geo_distance_2points(BeginLon, BeginLat, EndLon, EndLat)\n\n\u002F\u002F Spatial bucketing for joins\nStormEvents | extend cell = geo_point_to_s2cell(BeginLon, BeginLat, 8)\n```\n\n### Graph queries\n```kql\n\u002F\u002F Persistent graph model — try it on the help cluster!\ngraph(\"Simple\")\n| graph-match (src)-[e*1..3]->(dst)\n  where src.name == \"Alice\"\n  project src.name, dst.name, path_length = array_length(e)\n\n\u002F\u002F Transient graph — build inline with make-graph\nSimpleGraph_Edges\n| make-graph source --> target with SimpleGraph_Nodes on id\n| graph-match (src)-[e*1..5]->(dst)\n  where src.name == \"Alice\"\n  project src.name, dst.name, path_length = array_length(e)\n```\n\n### Time series\n```kql\n\u002F\u002F try it! — create a time series and detect anomalies\nStormEvents\n| make-series count() default=0 on StartTime step 1d\n| extend anomalies = series_decompose_anomalies(count_)\n```\n\nFor detailed examples and patterns, consult `references\u002Fadvanced-patterns.md`.\n\n## 10. Self-Correction Lookup Table\n\nWhen you encounter an error, look it up here before retrying:\n\n| Error message contains | Likely cause | Fix |\n|---|---|---|\n| `is of a 'dynamic' type` | Dynamic column in `by`\u002F`on`\u002F`order by` | Wrap in `tostring()`\u002F`tolong()` |\n| `Only equality is allowed` | Range predicate in join condition | Pre-bucket with S2\u002FH3 cells or `bin()` |\n| `extractall(): matching groups` | Missing `()` in regex | Add `()`: `@\"(\\w+)\"` not `@\"\\w+\"` |\n| `row set must be serialized` | Window function on unsorted data | Add `\\| serialize` or `\\| order by` before it |\n| `Cannot compare values of types string and string` | Computed string comparison | Add `tostring()` on both sides |\n| `Failed to resolve column named 'X'` | Wrong column name or wrong table | Run `.show table T schema` to check column names |\n| `E_LOW_MEMORY_CONDITION` | Query touched too much data | Add `\\| where` filters, reduce time range, break into steps |\n| `E_RUNAWAY_QUERY` | Join\u002Faggregation produced too many rows | Check cardinality before joining; add pre-filters |\n| `for each left attribute, right attribute` | Join `on` clause incomplete | Use explicit form: `on $left.X == $right.Y` |\n| `needs to be bracketed` | Reserved word used as identifier | Use `['keyword']` syntax |\n| `plugin doesn't exist` | Unavailable plugin on this cluster | Fall back to equivalent function or Python |\n| `Expected string literal in datetime()` | Bare integer in datetime literal | Use `datetime(2024-01-01)` not `datetime(2024)` |\n| `Unexpected token` after `by` | Complex expression in summarize by-clause | `extend` the expression first, then `summarize by` the column |\n| `not recognized` \u002F `unknown operator` | Operator not available on this engine | Check operator support; try equivalent (`order by` = `sort by`) |\n\n## 11. Datetime Pitfalls\n\nDatetime literals are a common source of errors. A wrong literal format can cascade into completely different approaches instead of fixing the small issue.\n\n### Literal format\n```kql\n\u002F\u002F ❌ WRONG — bare year is not a valid datetime\nStormEvents | where StartTime > datetime(2007)\n\n\u002F\u002F ✅ RIGHT — always use full date format\nStormEvents | where StartTime > datetime(2007-01-01)\n```\n\n### Filtering by year, month, or hour\n```kql\n\u002F\u002F ❌ WRONG — comparing datetime column to integer\nStormEvents | where StartTime == 2007\n\n\u002F\u002F ✅ RIGHT — use datetime_part() to extract components\nStormEvents | where datetime_part(\"year\", StartTime) == 2007\n\n\u002F\u002F ✅ ALSO RIGHT — use between with datetime range\nStormEvents | where StartTime between (datetime(2007-01-01) .. datetime(2007-12-31T23:59:59))\n```\n\n### Time bucketing in summarize\n```kql\n\u002F\u002F This works, but can be harder to read and reuse in complex queries\nStormEvents | summarize count() by startofmonth(StartTime)\n\n\u002F\u002F Clearer — extend first, then summarize by the computed column\nStormEvents\n| extend Month = startofmonth(StartTime)\n| summarize count() by Month\n| order by Month asc\n```\n\n### Useful datetime functions\n| Function | Purpose | Example |\n|----------|---------|---------|\n| `bin(ts, 1h)` | Round down to bucket boundary | `bin(Timestamp, 1d)` |\n| `startofmonth(ts)` | First day of month | `startofmonth(Timestamp)` |\n| `datetime_part(\"hour\", ts)` | Extract component | `datetime_part(\"year\", Timestamp)` |\n| `format_datetime(ts, fmt)` | Format as string | `format_datetime(Timestamp, \"yyyy-MM\")` |\n| `ago(1d)` | Relative time | `where Timestamp > ago(1d)` |\n| `between(a .. b)` | Range filter (inclusive) | `where Timestamp between (datetime(2024-01-01) .. datetime(2024-01-31T23:59:59))` |\n| `todatetime(str)` | Parse string → datetime | `todatetime(\"2024-01-15T10:30:00Z\")` |\n| `totimespan(str)` | Parse string → timespan | `totimespan(\"01:30:00\")` |\n\n## 12. Operator Naming & Equality\n\nKQL has subtle differences from SQL syntax.\n\n### Naming conventions\n\n| Entity | Convention | Example |\n|--------|-----------|---------|\n| Tables | UpperCamelCase | `StormEvents`, `NetworkLogs` |\n| Columns | UpperCamelCase | `StartTime`, `EventType` |\n| Variables (`let`) | snake_case | `let filtered_events = ...` |\n| Built-in functions | snake_case | `format_bytes()`, `geo_distance_2points()` |\n| Stored functions | UpperCamelCase | `.create function GetTopUsers` |\n\n### Equality operators\n```kql\n\u002F\u002F In where clauses, == is case-sensitive, =~ is case-insensitive\nStormEvents | where State == \"TEXAS\" | count        \u002F\u002F exact match\nStormEvents | where State =~ \"texas\" | count        \u002F\u002F case-insensitive\n\n\u002F\u002F In joins, use == only\nStormEvents | join kind=inner (PopulationData) on State\n```\n\n### sort vs order\nBoth `sort by` and `order by` work identically in KQL — they are aliases. Use whichever you prefer, but be consistent.\n\n### contains vs has\n```kql\n\u002F\u002F contains: substring match (slower)\nStormEvents | where EventNarrative contains \"tree\"   \u002F\u002F finds \"trees\", \"treetop\" too\n\n\u002F\u002F has: term\u002Fword match (faster, uses index)\nStormEvents | where EventNarrative has \"tree\"        \u002F\u002F matches word boundaries only\n\n\u002F\u002F For exact prefix\u002Fsuffix\nStormEvents | where EventType startswith \"Thunder\"\nStormEvents | where Source endswith \"Spotter\"\n```\n\n## 13. Error Recovery Strategy\n\nWhen a first KQL query fails, the temptation is to abandon the entire approach and try something completely different. The correct response is almost always to **fix the specific error**, not change strategy.\n\n### The pattern to avoid\n```\nQuery 1: extract(@\"pattern\", 1, col)  → Parse error\nQuery 2: todynamic(col)               → Different error  \nQuery 3: parse_json(col)              → Another error\nQuery 4: Python script                → Works but 10x tokens\n```\n\n### The correct pattern\n```\nQuery 1: extract(@\"pattern\", 1, col)  → Parse error (bad escaping)\nQuery 2: extract(@\"pattern\", 1, col)  → Fix the specific escaping issue → Success\n```\n\n**Rules for error recovery:**\n1. Read the error message carefully — it almost always tells you exactly what's wrong\n2. Fix the **specific** syntax\u002Fescaping issue, don't switch approaches\n3. Use the self-correction table (Section 10) to map errors to fixes\n4. Only switch approaches after 2 failed fixes of the same query\n5. The `parse` operator is often simpler than `extract()` for structured text:\n\n```kql\n\u002F\u002F Instead of complex regex on TraceLogs:\n\u002F\u002F extract(@\"file path: \\\"\\\"([^\\\"]+)\\\"\\\"\", 1, Message)\n\n\u002F\u002F Use parse for structured extraction (try it on help cluster, SampleLogs db):\ncluster(\"help\").database(\"SampleLogs\").TraceLogs\n| where Message has \"file path\"\n| parse Message with * \"file path: \\\"\\\"\" FilePath \"\\\"\\\"\" *\n| project Timestamp, FilePath\n| take 5\n```\n\n## 14. Query Writing Checklist\n\nBefore running any KQL query, mentally check:\n\n1. **Pre-filtered?** Large tables have a `| where` before any `| summarize`\n2. **Result bounded?** Exploratory queries end with `| take N` or `| top N`\n3. **Dynamic columns cast?** Any dynamic column in `by`\u002F`on`\u002F`order by` is wrapped\n4. **Regex has groups?** `extract_all` patterns have `()` around what you want to capture\n5. **Join cardinality safe?** Both sides checked with `dcount()` before joining\n6. **Needed columns only?** Wide tables get `| project` to drop unneeded columns\n7. **Datetime literals valid?** Using `datetime(2024-01-01)` not `datetime(2024)` or bare integers\n8. **Complex by-expressions?** Use `| extend` first, then `| summarize by` the computed column\n9. **Error recovery plan?** If a query fails, fix the specific error — don't change strategy\n",{"name":5,"description":7},"main","3f5b461b2314e01c400564051e92469114c5b68f",".github\u002Fskills\u002Fkql",368,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills","https:\u002F\u002Fmicrosoft.github.io\u002Fskills\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 06:48:25",{"source":8,"skillName":5,"commands":73,"prompt":83,"zipAvailable":84},[74,77,80],{"tool":75,"command":76},"npx","npx skills add microsoft\u002Fskills --skill kql",{"tool":78,"command":79},"bunx","bunx skills add microsoft\u002Fskills --skill kql",{"tool":81,"command":82},"pnpm","pnpm dlx skills add microsoft\u002Fskills --skill kql","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fkql\u002FSKILL.md",true,[86,92,96,100,104,108],{"path":87,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fadvanced-patterns.md","REFERENCE","参考文档",20504,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fkql\u002Freferences\u002Fadvanced-patterns.md",{"path":93,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Fanalysis_framework.md",10123,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fcassandra\u002Fblob\u002Ftrunk\u002F.claude\u002Fskills\u002Fpatch-explainer\u002Freferences\u002Fanalysis_framework.md",{"path":97,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":98,"sourceHtmlUrl":99},"references\u002Fascii_patterns.md",14418,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fcassandra\u002Fblob\u002Ftrunk\u002F.claude\u002Fskills\u002Fpatch-explainer\u002Freferences\u002Fascii_patterns.md",{"path":101,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":102,"sourceHtmlUrl":103},"references\u002Fdiscovery-queries.md",6978,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fkql\u002Freferences\u002Fdiscovery-queries.md",{"path":105,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":106,"sourceHtmlUrl":107},"references\u002Ferror-recovery.md",11123,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fkql\u002Freferences\u002Ferror-recovery.md",{"path":109,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":110,"sourceHtmlUrl":111},"references\u002Fquery-templates.md",7716,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fkql\u002Freferences\u002Fquery-templates.md",[113,121,145,183,209,230],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":120},"01M741JBE1VH8A2Y3FXX2P7386","azure-advisor-cost-optimization","Analyze Azure Advisor Cost\u002FIdleResources findings and prevalidate deletion safety, including Service Groups. WHEN: \"find unused Azure resources\", \"what resources am I paying for but no longer using\", \"idle-resource savings\", \"historical idle-resource savings\", \"are these idle resources safe to delete\". Generic Cost, other subcategories, and cross-category requests use azure-advisor.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-advisor\u002Fskills\u002Fazure-advisor-cost-optimization\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":128,"publishedAt":57},"01M69B4JCRQV5SPXAFCKXQRV0H","skill-creator","Guide for creating effective skills for AI coding agents working with Azure SDKs and Microsoft Foundry services. Use when creating new skills or updating existing skills.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fskill-creator\u002FSKILL.md",[127],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[129,130,131,132,9,53,133,134,135,136,39,137,138,139,140,141,142,143,144],"skill creator","creator","ai coding agents","coding agents","foundry","microsoft foundry","coding","guide","use","Existing","services","new","when","sdks","with","ai coding",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":161,"publishedAt":57},"01M69B4FD57V1MYKRWAJJECTZ7","podcast-generation","Generate AI-powered podcast-style audio narratives using Azure OpenAI's GPT Realtime Mini model via WebSocket. Use when building text-to-speech features, audio narrative generation, podcast creation from content, or integrating with Azure OpenAI Realtime API for real audio output. Covers full-stack implementation from React frontend to Python FastAPI backend with WebSocket streaming.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpodcast-generation\u002FSKILL.md",[151,154,157,160],{"categoryNo":152,"categoryName":153,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":155,"categoryName":156,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":158,"categoryName":159,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[162,163,164,165,53,166,167,168,169,170,171,172,173,174,175,141,176,177,178,179,180,181,182],"podcast generation","generation","podcast","frontend","azure openai","realtime","react","python","Audio","creation","model","fastapi backend","python fastapi","fastapi","api","streaming","text","narrative","stack","generate","features",{"skillNo":184,"name":185,"nameZh":6,"description":186,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":190,"publishedAt":57},"01M69B4CYPM5SESY5ZWEFDXEQZ","microsoft-docs","Understand Microsoft technologies by querying official documentation. Use whenever the user asks how something works, wants tutorials, needs configuration options, limits, quotas, or best practices for any Microsoft technology (Azure, .NET, M365, Windows, Power Platform, etc.)—even if they don't mention \"docs.\" If the question is about understanding a concept rather than writing code, this is the right skill.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmicrosoft-docs\u002FSKILL.md",[189],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[191,9,192,193,194,195,196,53,197,47,198,199,200,201,202,203,39,204,75,205,137,206,207,208],"microsoft docs","docs","documentation","windows","official","cli","MCP","power platform","mcp server","back","concept","power","platform","technology","question","learn mcp","learn","best practices",{"skillNo":210,"name":211,"nameZh":6,"description":212,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":213,"categories":214,"keywords":216,"publishedAt":57},"01M69B49C3YPD1ZJ3NC0HPCY58","mcp-builder","Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP), Node\u002FTypeScript (MCP SDK), or C#\u002F.NET (Microsoft MCP SDK).","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmcp-builder\u002FSKILL.md",[215],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[217,197,218,219,220,9,169,221,222,172,223,141,224,225,226,136,227,228,39,229,137,143],"mcp builder","builder","llms","sdk","typescript","model context protocol","building mcp servers","node","integrate","Tools","context","fastmcp","mcp sdk",{"skillNo":231,"name":232,"nameZh":6,"description":233,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":234,"categories":235,"keywords":236,"publishedAt":57},"01M69B44HJQ7897EZ7NE7DWQX3","github-issue-creator","Convert raw notes, error logs, voice dictation, or screenshots into crisp GitHub-flavored markdown issue reports. Use when the user pastes bug info, error messages, or informal descriptions and wants a structured GitHub issue. Supports images\u002FGIFs for visual evidence.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgithub-issue-creator\u002FSKILL.md",[],[237,238,239,240,241,130,242,243,244,245,246,247,39,248,137,141,249,250,251,252,253],"github","github issue creator","issue creator","github issue","issue","notes","screenshots","images","error","evidence","error messages","messages","visual","convert","logs","reports","info"]