Community寫作與編輯github.com

microsoft/azure-kusto-irql-graph

將 IRQL 圖形函數應用於 KQL 或 IRQL 查詢結果,以在 Kusto Explorer 中進行視覺化。產生 Lift_To_Graph 對應,並組合 Graph_Render_View、Graph_Fold_By_Property、Extract_Node_*、Enrich_Node_* 和 Enrich_Graph_* 呼叫。接受提供的查詢或有限的基礎自然語言來源請求;它不是一般的自然語言轉 KQL/IRQL 技能。

azure-kusto-irql-graph 是什麼?

此技能專門用於將現有的 KQL 或 IRQL 查詢結果轉換為 Kusto Explorer 中的互動式圖形視覺化。它透過一組強型別的 IRQL 圖形函數運作:首先使用 `Lift_To_Graph` 將表格資料對應到節點和邊,然後可以使用 `Extract_Node_*` 或 `Enrich_Node_*` 等函數進行可選的萃取或豐富化,並使用 `Graph_Fold_By_Property` 摺疊節點,最後使用 `Graph_Render_View` 呈現。主要支援平台包括 Kusto Explorer 桌面應用程式和 `kusto_query` 工具,並連線到如 `ValdyTimes` 和 `JoJosHospital` 等預先部署這些圖形函數的資料庫。此技能尤其適用於安全調查,例如將失敗的登入事件視覺化為 IP → 使用者 → 主機圖表,或將電子郵件流程視覺化為寄件者 → 郵件 → 收件者資料流。對於原生圖形分析運算,如 `make-graph`、`graph-match` 或最短路徑,應使用 `azure-kusto-graph` 技能。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/microsoft/agent-skills/tree/main/.github/plugins/azure-kusto-graph-skills/skills/azure-kusto-irql-graph

Installed? Explore more 寫作與編輯 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

IRQL 圖形函數 -- 查詢結果到視覺化

將 IRQL 圖形函數系列應用於表格結果。給定一個 KQL 或 IRQL 查詢以及使用者的圖形描述,產生一個 Lift_To_Graph 對應,並僅組合在 Kusto Explorer 中視覺化、摺疊、萃取或豐富圖形所需的儲存函數。來源查詢不需要使用 IRQL。

範圍與路由

請求使用方式
將提供的 KQL/IRQL 資料列轉換為帶有圖示裝飾的視覺圖形此技能:Lift_To_Graph + Graph_Render_View
摺疊節點或應用 Extract_Node_*、Enrich_Node_* 或 Enrich_Graph_*此技能
使用 make-graph、graph-match、最短路徑、連通元件、圖形模型或快照azure-kusto-graph
從自然語言編寫非平凡的 KQL/IRQL 調查一個 Kusto 或 IRQL 查詢生成技能,然後是此技能

如果請求混合了視覺化和原生圖形分析,則對此技能的升力/呈現部分使用此技能,並對操作員語義使用 azure-kusto-graph。除非使用者要求原生圖形運算符,否則不要用自建的邊優先圖形取代圖形升力函數。

輸入合約

  • 偏好輸入:一個能產生表格結果的工作 KQL/IRQL 查詢,加上關於所需節點、邊、標籤、圖示、萃取、豐富化或摺疊的自然語言描述。
  • 此技能不是自然語言轉 KQL 或 NL 轉 IRQL 轉換器。它將現有的查詢結果轉換為圖形視覺化。對於一般的 NL 轉 KQL 或 NL 轉 IRQL,請使用專用的查詢生成技能(可另行取得)。
  • 保留所提供查詢的檢索、聯結、篩選器和彙總。僅新增圖形對應所需的投影或合成 ID。
  • 僅在基礎自然語言來源請求直接對應到一個已知表格或 IRQL Get_* 選取器,且具有明顯的資料行和簡單的篩選器時,才支援此類請求。請說明假定的來源,並且不要發明聯結、結構描述或調查邏輯。
  • 對於非平凡的查詢建構,請先使用單獨的 Kusto/IRQL 查詢生成技能,然後再將此技能應用於其輸出。
  • 如果沒有可用的查詢或輸出結構描述,且來源並非微不足道,請在產生對應之前要求提供 KQL 查詢或其結果資料行。

觸發條件

當使用者符合以下條件時使用此技能:

  • 提供 KQL/IRQL 結果並要求 IRQL 圖形視覺化或對應
  • 提及 Lift_To_Graph、Graph_Render_View 或 Graph_Fold_By_Property
  • 要求在 Kusto Explorer 中使用圖示裝飾的節點/邊對應
  • 想要根據共享屬性摺疊/折疊節點
  • 透過 Extract_Node_*、Enrich_Node_* 或 Enrich_Graph_* 請求圖形萃取或豐富化

請勿僅因 graph-match、圖形路徑/元件、持久性圖形或通用 make-graph 建構而啟動此技能;這些屬於 azure-kusto-graph。

不是自然語言轉 KQL/IRQL 轉換器。 輸入通常應該是一個需要圖形視覺化其結果的工作 KQL 或 IRQL 查詢。基礎 NL 來源請求僅適用於簡單的單一表格/選取器案例。對於一般的 NL 轉 KQL 或 NL 轉 IRQL,請使用專用的查詢生成技能(可另行取得)。

環境

  • 叢集:https://kc7001.eastus.kusto.windows.net
  • 資料庫:ValdyTimes、JoJosHospital(已預先部署圖形函數)
  • 呈現:Kusto Explorer 桌面應用程式(make-graph 視覺化視窗)
  • 工具:kusto_query(透過 Azure MCP Server)

函數預檢

Lift_To_Graph 和 Graph_Render_View 是儲存函數,而非內建的 Kusto 運算符。在針對目標資料庫產生或執行升力管線之前,請檢查部署了哪些函數:

.show functions
| where Name in~ ("Lift_To_Graph", "Graph_Render_View", "Graph_Fold_By_Property")
| project Name
  • Lift_To_Graph 和 Graph_Render_View 是必要的。
  • Graph_Fold_By_Property 僅在要求摺疊時是必要的。
  • 在使用任何 Extract_Node_*、Enrich_Node_* 或 Enrich_Graph_* 函數之前請先檢查;當無法使用時省略可選的豐富化,除非使用者希望部署它。
  • 如果缺少必要的函數,且您有權修改資料庫,請在使用者確認後再進行部署。然後使用 references/DEPLOY_IRQL_FUNCTIONS.md 中的 .create-or-alter function 定義。執行相關的 .create-or-alter 區塊,然後重新執行預檢檢查以確認。
  • 如果您沒有修改權限,請告知使用者缺少哪些函數,並引導他們前往 references/DEPLOY_IRQL_FUNCTIONS.md 進行手動部署。

IRQL 圖形函數系列

Lift_To_Graph(T, mappingJson)

將任何表格 KQL 結果轉換為統一的節點 + 邊表格。

輸入:任何表格 T + 一個 JSON 對應字串。 輸出:EntityType = "node" 或 "edge" 的資料列,準備好供 make-graph 使用。

Graph_Render_View(T)

接收 Lift_To_Graph 輸出,分割節點/邊,並呼叫 make-graph 以開啟 Kusto Explorer 的圖形視窗。

Graph_Fold_By_Property(T, NodeType, PropertyName)

將共用屬性值的特定類型節點摺疊為單一節點。自動重新接線邊緣。

圖形萃取與豐富化函數

這些是必須已部署在目標資料庫上的額外儲存函數。它們未包含在 references/DEPLOY_IRQL_FUNCTIONS.md 中。在將其納入管線之前,請使用 .show functions 驗證可用性。

函數操作關鍵屬性
Extract_Node_Email_Sender_Domain(T, displayName)將 Domain 新增到節點屬性EmailSender
Extract_Node_Employee_Firstname(T, displayName)將 Firstname 新增到節點屬性Name
Extract_Node_Event_Network_Domain(T, displayName)將 DomainName 新增到節點屬性Url
Enrich_Node_Ip_Employee(T, displayName)將員工資訊新增到 IP 節點ClientIp
Enrich_Node_Username_Employee(T, displayName)將員工資訊新增到使用者節點Username
Enrich_Node_Event_Authentication_Username(T, displayName)新增驗證上下文Username
Enrich_Node_Ip_Domain(T, displayName)新增 DNS 網域ClientIp
Enrich_Node_Ip_Event_NetworkOutbound(T, displayName)新增傳出事件ClientIp
Enrich_Graph_Ip_Employee(T, mappingJson)使用員工節點擴展圖形ClientIp
Enrich_Graph_Username_Employee(T, mappingJson)使用員工節點擴展圖形Username
Enrich_Graph_Event_Authentication_Username(T, mappingJson)使用驗證節點擴展Username

對應 JSON 結構描述

JSON 對應有兩個陣列:node_types 和 edges。

node_types[]

欄位必要描述
type是節點類型標籤(例如 "User"、"Host"、"IP")
id是節點 ID 的前綴;通常與類型相同
key是其值成為節點身分識別的資料行名稱
props是要作為節點屬性攜帶的資料行陣列
defaults否為空值/空屬性提供備用值的物件
defIcon否此節點類型的預設圖示 URL
displayName否用於顯示標籤的資料行(預設為 id)
color否從中取得顏色的資料行
size否從中取得大小的資料行

edges[]

欄位必要描述
type是邊類型標籤(例如 "AuthenticatesTo"、"SentEmail")
source是{"id": "<前綴>", "type": "<NodeType>"}
target是{"id": "<前綴>", "type": "<NodeType>"}
props否要作為邊屬性攜帶的資料行陣列
displayName否邊標籤的資料行
color否邊顏色的資料行

圖示儲存庫

使用來自 https://raw.githubusercontent.com/benc-uk/icon-collection/master/azure-icons/ 的圖示:

  • IP:Public-IP-Addresses-(Classic).svg
  • 主機/VM:Virtual-Machine.svg
  • 使用者:Users.svg
  • 電子郵件:Mailbox.svg(或 azure-cds/command-1070-Mail.svg)
  • 程序:App-Services.svg
  • 檔案:Storage-Accounts.svg
  • 警示:Activity-Log.svg
  • 網域:DNS-Zones.svg

對應產生規則

根據提供的查詢資料列和使用者的圖形描述,依以下步驟產生對應 JSON:

  1. 識別實體 -> 每個不同的名詞變成一個 node_type
  2. 識別關係 -> 每個動詞/介係詞變成一個 edge
  3. 對應到資料行 -> 使用所提供查詢產生的實際資料行;切勿假設不可用的資料行
  4. 設定方向 -> 來源是行動者,目標是被行動者
  5. 新增屬性 -> 包含與調查相關的資料行(時間戳記、結果、雜湊值)
  6. 指派圖示 -> 根據實體類型從上述圖示集中選取

資料行參考(IRQL 統一結構描述)

實體關鍵資料行可用屬性
使用者UsernameUsername、Name、Role、Email
主機HostnameHostname
IPClientIpClientIp
電子郵件訊息SubjectEnvTime、Subject、Verdict、Url
寄件者EmailSenderEmailSender、Domain
收件者EmailRecipientEmailRecipient
程序ProcessNameEnvTime、ProcessName、ProcessCommandLine、ProcessHash
檔案FilenameEnvTime、Filename、Path、Sha256
網域DomainNameDomainName
驗證事件(合成 ID)EnvTime、UserAgent、Result、Description

函數選擇

  1. 從提供的 KQL/IRQL 表格管線開始。
  2. 使用 Lift_To_Graph(mapping) 建立圖形實體。
  3. 僅在請求且與對應的索引鍵相容時,新增 Extract_Node_*、Enrich_Node_* 或 Enrich_Graph_*。
  4. 僅在請求分組/摺疊時,新增 Graph_Fold_By_Property()。
  5. 以 Graph_Render_View() 結束視覺輸出。
  6. 預檢為管線選取的精確儲存函數。

管線模式

// 1. 保留提供的 KQL 或 IRQL 查詢
<輸入查詢>
// 2. 升力到圖形
| invoke Lift_To_Graph(<mapping_json>)
// 3. 選擇性地萃取或豐富化圖形實體
| invoke <Extract_Node_* | Enrich_Node_* | Enrich_Graph_*>()
// 4. 選擇性地在請求時摺疊節點
| invoke Graph_Fold_By_Property("<NodeType>", "<PropertyName>")
// 5. 呈現
| invoke Graph_Render_View()

範例

有關其他提示和實作範例,請參閱 references/EXAMPLES.md。

驗證圖形:IP -> AuthEvent -> User -> Host

輸入查詢:Get_Event_Authentication_All | where Result == "Failed Login" | take 200

圖形請求:「顯示 IP、驗證事件、使用者和主機;依結果摺疊事件。」

let auth_mapping = '{"node_types":[{"type":"SrcIp","id":"SrcIp","key":"ClientIp","props":["ClientIp"],"defaults":{},"defIcon":"https://raw.githubusercontent.com/benc-uk/icon-collection/master/azure-icons/Public-IP-Addresses-(Classic).svg"},{"type":"Host","id":"Host","key":"Hostname","props":["Hostname"],"defaults":{},"defIcon":"https://raw.githubusercontent.com/benc-uk/icon-collection/master/azure-icons/Virtual-Machine.svg"},{"type":"User","id":"User","key":"Username","props":["Username"],"defaults":{},"defIcon":"https://raw.githubusercontent.com/benc-uk/icon-collection/master/azure-icons/Users.svg"},{"type":"AuthEvent","id":"AuthEvent","key":"AuthEventId","props":["AuthEventId","EnvTime","UserAgent","Result","Description"],"defaults":{"Result":"unknown"},"defIcon":"https://raw.githubusercontent.com/benc-uk/icon-collection/master/azure-icons/Activity-Log.svg"}],"edges":[{"type":"RequestsAuth","source":{"id":"SrcIp","type":"SrcIp"},"target":{"id":"AuthEvent","type":"AuthEvent"},"props":["EnvTime"]},{"type":"TargetsUser","source":{"id":"AuthEvent","type":"AuthEvent"},"target":{"id":"User","type":"User"},"props":["EnvTime"]},{"type":"AgainstHost","source":{"id":"AuthEvent","type":"AuthEvent"},"target":{"id":"Host","type":"Host"},"props":["EnvTime"]}]}';
Get_Event_Authentication_All
| extend AuthEventId = strcat(Username, "_", Hostname, "_", EnvTime)
| where Result == "Failed Login"
| take 200
| invoke Lift_To_Graph(auth_mapping)
| invoke Graph_Fold_By_Property("AuthEvent", "Result")
| invoke Graph_Render_View()

電子郵件圖形:寄件者 -> 郵件 -> 收件者

輸入查詢:Get_Email_All | take 400

圖形請求:「視覺化寄件者到郵件到收件者的流程,並依判決摺疊郵件。」

let mail_mapping = '{"node_types":[{"type":"EmailMessage","id":"Message","key":"Subject","props":["EnvTime","Subject","Verdict"],"defaults":{},"defIcon":"https://raw.githubusercontent.com/benc-uk/icon-collection/master/azure-icons/Media-File.svg"},{"type":"Sender","id":"Email","key":"EmailSender","props":["EmailSender"],"defaults":{},"defIcon":"https://raw.githubusercontent.com/benc-uk/icon-collection/master/azure-cds/command-1070-Mail.svg"},{"type":"Recipient","id":"Email","key":"EmailRecipient","props":["EmailRecipient"],"defaults":{},"defIcon":"https://raw.githubusercontent.com/benc-uk/icon-collection/master/azure-cds/command-1070-Mail.svg"}],"edges":[{"type":"SentBy","source":{"id":"Message","type":"EmailMessage"},"target":{"id":"Email","type":"Sender"},"props":["EnvTime","Verdict"]},{"type":"DeliveredTo","source":{"id":"Message","type":"EmailMessage"},"target":{"id":"Email","type":"Recipient"},"props":["EnvTime","Verdict"]}]}';
Get_Email_All
| take 400
| invoke Lift_To_Graph(mail_mapping)
| invoke Graph_Fold_By_Property("EmailMessage", "Verdict")
| invoke Graph_Render_View()

可疑網域調查(端到端)

基礎來源請求:「使用這些可疑網域的傳出網路事件,並繪製以員工姓名豐富化的 IP 對網域連線圖形。」

這是有限的備用方案:一個已知的選取器、一個萃取器和一個直接篩選器。

let suspicious_domain_mapping = '{"node_types":[{"type":"IP","id":"IP","key":"ClientIp","props":["ClientIp"],"defaults":{},"defIcon":"https://raw

…

[已截斷以進行翻譯]

Individual skills in this repo

This repo contains 12 individual skills — each has its own dedicated page.

microsoft/azure-ai-agents-persistent-dotnet

Azure AI Agents Persistent SDK for .NET. Low-level SDK for creating and managing AI agents with threads, messages, runs, and tools. Use for agent CRUD, conversation threads, streaming responses, function calling, file search, and code interpreter. Triggers: "PersistentAgentsClient", "persistent agents", "agent threads", "agent runs", "streaming agents", "function calling agents .NET".

microsoft/azure-ai-document-intelligence-dotnet

Azure AI Document Intelligence SDK for .NET. Extract text, tables, and structured data from documents using prebuilt and custom models. Use for invoice processing, receipt extraction, ID document analysis, and custom document models. Triggers: "Document Intelligence", "DocumentIntelligenceClient", "form recognizer", "invoice extraction", "receipt OCR", "document analysis .NET".

microsoft/azure-ai-openai-dotnet

Azure OpenAI SDK for .NET. Client library for Azure OpenAI and OpenAI services. Use for chat completions, embeddings, image generation, audio transcription, and assistants. Triggers: "Azure OpenAI", "AzureOpenAIClient", "ChatClient", "chat completions .NET", "GPT-4", "embeddings", "DALL-E", "Whisper", "OpenAI .NET".

microsoft/azure-ai-projects-dotnet

Azure AI Projects SDK for .NET. High-level client for Azure AI Foundry projects including agents, connections, datasets, deployments, evaluations, and indexes. Use for AI Foundry project management, versioned agents, and orchestration. Triggers: "AI Projects", "AIProjectClient", "Foundry project", "versioned agents", "evaluations", "datasets", "connections", "deployments .NET".

microsoft/azure-ai-voicelive-dotnet

Azure AI Voice Live SDK for .NET. Build real-time voice AI applications with bidirectional WebSocket communication. Use for voice assistants, conversational AI, real-time speech-to-speech, and voice-enabled chatbots. Triggers: "voice live", "real-time voice", "VoiceLiveClient", "VoiceLiveSession", "voice assistant .NET", "bidirectional audio", "speech-to-speech".

microsoft/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", "pub/sub".

microsoft/azure-eventhub-dotnet

Azure Event Hubs SDK for .NET. Use for high-throughput event streaming: sending events (EventHubProducerClient, EventHubBufferedProducerClient), receiving events (EventProcessorClient with checkpointing), partition management, and real-time data ingestion. Triggers: "Event Hubs", "event streaming", "EventHubProducerClient", "EventProcessorClient", "send events", "receive events", "checkpointing", "partition".

microsoft/azure-identity-dotnet

Azure Identity library for .NET. Authentication library for Azure SDK clients using Microsoft Entra ID. Use for DefaultAzureCredential, managed identity, service principals, and developer credentials. Triggers: "Azure Identity", "DefaultAzureCredential", "ManagedIdentityCredential", "ClientSecretCredential", "authentication .NET", "Azure auth", "credential chain".

microsoft/azure-kusto-graph

Build and query Kusto graphs from natural language. Covers transient graphs (make-graph), persistent graph models/snapshots, pattern matching (graph-match), shortest paths, connected components, and graph-to-table export. Generates the edges-first thinking: define edges, define node lookups, union, make-graph. WHEN: make-graph, graph-match, graph-shortest-paths, graph-to-table, graph-mark-components, persistent graph, graph model, graph snapshot, build a graph from data, find paths between nodes, pattern matching in graph, connected components, transient graph, Kusto graph, KQL graph.

microsoft/azure-kusto-irql

Compose IRQL (Incident Response Query Language) queries for Kusto cybersecurity investigations. Translates natural language hunting questions into composable IRQL pipelines using Get_*, Extract_*, and Enrich_* functions. WHEN: IRQL query, security hunt, threat hunting KQL, incident response query, compose hunting pipeline, failed logins, phishing investigation, lateral movement, process execution, file creation events.

microsoft/azure-local

Plan, deploy, operate, and troubleshoot Azure Local (formerly Azure Stack HCI): sizing and prerequisites, Arc registration, lifecycle updates, workloads (Azure Local VMs, AKS on Azure Local, images, disks, logical networks), SDN and network security, and failure triage — starting read-only and confirming before risky changes. WHEN: Azure Local, Azure Stack HCI, Arc resource bridge, custom location, Azure Local VM, Arc VM, AKS on Azure Local, AKS hybrid, SDN, Lifecycle Manager, Azure Local update, disconnected site.

microsoft/azure-local-multi-rack

Plan, deploy, operate, and troubleshoot multi-rack (rack scale) deployments of Azure Local — preintegrated racks scaling to hundreds of machines, built on Network Fabric Controller, Cluster Manager, SAN storage, and managed network fabric. Use for the Microsoft.NetworkCloud and Microsoft.ManagedNetworkFabric control plane. NOT for standard 1-16 node Azure Local, and NOT for rack-aware clusters (two racks as availability zones, up to 8 nodes, synchronous replication) — those are standard scale. WHEN: multi-rack, rack scale Azure Local, aggregation rack, compute rack, Network Fabric Controller, NFC, Cluster Manager, network fabric, isolation domain, az networkcloud, az networkfabric, multi-rack logical network, multi-rack Arc VM.

相關技能