[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KKZM422BMRVVNET794JMMS":3,"skill-same:01M6KKZM422BMRVVNET794JMMS":63},{"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":18,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":47,"ownerDescription":6,"updatedAt":48,"install":49,"resources":62},"01M6KKZM422BMRVVNET794JMMS","tools-spin-sync",null,"Synchronize Spin\u002FPromela models with current source code and re-verify","AI-native-Systems-Research\u002Fai-native-storage-certus","AI-native-Systems-Research","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F270755458?v=4","01M6KKQWSJX0D4X33E0KKSR4WM","AI-native Systems Research","01M6KKQWXTKR6MYVQMPKVJ5WD5",3,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FAI-native-Systems-Research\u002Fai-native-storage-certus\u002Fblob\u002Funstable\u002F.claude\u002Fskills\u002Ftools-spin-sync\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30],"sync","Tools","tools spin sync","code","verify","model","models","name","with","re","source","source code","2026-11-10 10:12:30",false,"---\nname: azure-eventgrid-dotnet\ndescription: Azure Event Grid SDK for .NET. Client library for publishing and consuming events with Azure Event Grid. Use for event-driven architectures, pub\u002Fsub messaging, CloudEvents, and EventGridEvents.\nrisk: unknown\nsource: community\ndate_added: '2026-02-27'\n---\n\n# Azure.Messaging.EventGrid (.NET)\n\nClient library for publishing events to Azure Event Grid topics, domains, and namespaces.\n\n## Installation\n\n```bash\n# For topics and domains (push delivery)\ndotnet add package Azure.Messaging.EventGrid\n\n# For namespaces (pull delivery)\ndotnet add package Azure.Messaging.EventGrid.Namespaces\n\n# For CloudNative CloudEvents interop\ndotnet add package Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents\n```\n\n**Current Version**: 4.28.0 (stable)\n\n## Environment Variables\n\n```bash\n# Topic\u002FDomain endpoint\nEVENT_GRID_TOPIC_ENDPOINT=https:\u002F\u002F\u003Ctopic-name>.\u003Cregion>.eventgrid.azure.net\u002Fapi\u002Fevents\nEVENT_GRID_TOPIC_KEY=\u003Caccess-key>\n\n# Namespace endpoint (for pull delivery)\nEVENT_GRID_NAMESPACE_ENDPOINT=https:\u002F\u002F\u003Cnamespace>.\u003Cregion>.eventgrid.azure.net\nEVENT_GRID_TOPIC_NAME=\u003Ctopic-name>\nEVENT_GRID_SUBSCRIPTION_NAME=\u003Csubscription-name>\n```\n\n## Client Hierarchy\n\n```\nPush Delivery (Topics\u002FDomains)\n└── EventGridPublisherClient\n    ├── SendEventAsync(EventGridEvent)\n    ├── SendEventsAsync(IEnumerable\u003CEventGridEvent>)\n    ├── SendEventAsync(CloudEvent)\n    └── SendEventsAsync(IEnumerable\u003CCloudEvent>)\n\nPull Delivery (Namespaces)\n├── EventGridSenderClient\n│   └── SendAsync(CloudEvent)\n└── EventGridReceiverClient\n    ├── ReceiveAsync()\n    ├── AcknowledgeAsync()\n    ├── ReleaseAsync()\n    └── RejectAsync()\n```\n\n## Authentication\n\n### API Key Authentication\n\n```csharp\nusing Azure;\nusing Azure.Messaging.EventGrid;\n\nEventGridPublisherClient client = new(\n    new Uri(\"https:\u002F\u002Fmytopic.eastus-1.eventgrid.azure.net\u002Fapi\u002Fevents\"),\n    new AzureKeyCredential(\"\u003Caccess-key>\"));\n```\n\n### Microsoft Entra ID (Recommended)\n\n```csharp\nusing Azure.Identity;\nusing Azure.Messaging.EventGrid;\n\nEventGridPublisherClient client = new(\n    new Uri(\"https:\u002F\u002Fmytopic.eastus-1.eventgrid.azure.net\u002Fapi\u002Fevents\"),\n    new DefaultAzureCredential());\n```\n\n### SAS Token Authentication\n\n```csharp\nstring sasToken = EventGridPublisherClient.BuildSharedAccessSignature(\n    new Uri(topicEndpoint),\n    DateTimeOffset.UtcNow.AddHours(1),\n    new AzureKeyCredential(topicKey));\n\nvar sasCredential = new AzureSasCredential(sasToken);\nEventGridPublisherClient client = new(\n    new Uri(topicEndpoint),\n    sasCredential);\n```\n\n## Publishing Events\n\n### EventGridEvent Schema\n\n```csharp\nEventGridPublisherClient client = new(\n    new Uri(topicEndpoint),\n    new AzureKeyCredential(topicKey));\n\n\u002F\u002F Single event\nEventGridEvent egEvent = new(\n    subject: \"orders\u002F12345\",\n    eventType: \"Order.Created\",\n    dataVersion: \"1.0\",\n    data: new { OrderId = \"12345\", Amount = 99.99 });\n\nawait client.SendEventAsync(egEvent);\n\n\u002F\u002F Batch of events\nList\u003CEventGridEvent> events = new()\n{\n    new EventGridEvent(\n        subject: \"orders\u002F12345\",\n        eventType: \"Order.Created\",\n        dataVersion: \"1.0\",\n        data: new OrderData { OrderId = \"12345\", Amount = 99.99 }),\n    new EventGridEvent(\n        subject: \"orders\u002F12346\",\n        eventType: \"Order.Created\",\n        dataVersion: \"1.0\",\n        data: new OrderData { OrderId = \"12346\", Amount = 149.99 })\n};\n\nawait client.SendEventsAsync(events);\n```\n\n### CloudEvent Schema\n\n```csharp\nCloudEvent cloudEvent = new(\n    source: \"\u002Forders\u002Fsystem\",\n    type: \"Order.Created\",\n    data: new { OrderId = \"12345\", Amount = 99.99 });\n\ncloudEvent.Subject = \"orders\u002F12345\";\ncloudEvent.Id = Guid.NewGuid().ToString();\ncloudEvent.Time = DateTimeOffset.UtcNow;\n\nawait client.SendEventAsync(cloudEvent);\n\n\u002F\u002F Batch of CloudEvents\nList\u003CCloudEvent> cloudEvents = new()\n{\n    new CloudEvent(\"\u002Forders\", \"Order.Created\", new { OrderId = \"1\" }),\n    new CloudEvent(\"\u002Forders\", \"Order.Updated\", new { OrderId = \"2\" })\n};\n\nawait client.SendEventsAsync(cloudEvents);\n```\n\n### Publishing to Event Grid Domain\n\n```csharp\n\u002F\u002F Events must specify the Topic property for domain routing\nList\u003CEventGridEvent> events = new()\n{\n    new EventGridEvent(\n        subject: \"orders\u002F12345\",\n        eventType: \"Order.Created\",\n        dataVersion: \"1.0\",\n        data: new { OrderId = \"12345\" })\n    {\n        Topic = \"orders-topic\"  \u002F\u002F Domain topic name\n    },\n    new EventGridEvent(\n        subject: \"inventory\u002Fitem-1\",\n        eventType: \"Inventory.Updated\",\n        dataVersion: \"1.0\",\n        data: new { ItemId = \"item-1\" })\n    {\n        Topic = \"inventory-topic\"\n    }\n};\n\nawait client.SendEventsAsync(events);\n```\n\n### Custom Serialization\n\n```csharp\nusing System.Text.Json;\n\nvar serializerOptions = new JsonSerializerOptions\n{\n    PropertyNamingPolicy = JsonNamingPolicy.CamelCase\n};\n\nvar customSerializer = new JsonObjectSerializer(serializerOptions);\n\nEventGridEvent egEvent = new(\n    subject: \"orders\u002F12345\",\n    eventType: \"Order.Created\",\n    dataVersion: \"1.0\",\n    data: customSerializer.Serialize(new OrderData { OrderId = \"12345\" }));\n\nawait client.SendEventAsync(egEvent);\n```\n\n## Pull Delivery (Namespaces)\n\n### Send Events to Namespace Topic\n\n```csharp\nusing Azure;\nusing Azure.Messaging;\nusing Azure.Messaging.EventGrid.Namespaces;\n\nvar senderClient = new EventGridSenderClient(\n    new Uri(namespaceEndpoint),\n    topicName,\n    new AzureKeyCredential(topicKey));\n\n\u002F\u002F Send single event\nCloudEvent cloudEvent = new(\"employee_source\", \"Employee.Created\", \n    new { Name = \"John\", Age = 30 });\nawait senderClient.SendAsync(cloudEvent);\n\n\u002F\u002F Send batch\nawait senderClient.SendAsync(new[]\n{\n    new CloudEvent(\"source\", \"type\", new { Name = \"Alice\" }),\n    new CloudEvent(\"source\", \"type\", new { Name = \"Bob\" })\n});\n```\n\n### Receive and Process Events\n\n```csharp\nvar receiverClient = new EventGridReceiverClient(\n    new Uri(namespaceEndpoint),\n    topicName,\n    subscriptionName,\n    new AzureKeyCredential(topicKey));\n\n\u002F\u002F Receive events\nReceiveResult result = await receiverClient.ReceiveAsync(maxEvents: 10);\n\nList\u003Cstring> lockTokensToAck = new();\nList\u003Cstring> lockTokensToRelease = new();\n\nforeach (ReceiveDetails detail in result.Details)\n{\n    CloudEvent cloudEvent = detail.Event;\n    string lockToken = detail.BrokerProperties.LockToken;\n    \n    try\n    {\n        \u002F\u002F Process the event\n        Console.WriteLine($\"Event: {cloudEvent.Type}, Data: {cloudEvent.Data}\");\n        lockTokensToAck.Add(lockToken);\n    }\n    catch (Exception)\n    {\n        \u002F\u002F Release for retry\n        lockTokensToRelease.Add(lockToken);\n    }\n}\n\n\u002F\u002F Acknowledge successfully processed events\nif (lockTokensToAck.Any())\n{\n    await receiverClient.AcknowledgeAsync(lockTokensToAck);\n}\n\n\u002F\u002F Release events for retry\nif (lockTokensToRelease.Any())\n{\n    await receiverClient.ReleaseAsync(lockTokensToRelease);\n}\n```\n\n### Reject Events (Dead Letter)\n\n```csharp\n\u002F\u002F Reject events that cannot be processed\nawait receiverClient.RejectAsync(new[] { lockToken });\n```\n\n## Consuming Events (Azure Functions)\n\n### EventGridEvent Trigger\n\n```csharp\nusing Azure.Messaging.EventGrid;\nusing Microsoft.Azure.WebJobs;\nusing Microsoft.Azure.WebJobs.Extensions.EventGrid;\n\npublic static class EventGridFunction\n{\n    [FunctionName(\"ProcessEventGridEvent\")]\n    public static void Run(\n        [EventGridTrigger] EventGridEvent eventGridEvent,\n        ILogger log)\n    {\n        log.LogInformation($\"Event Type: {eventGridEvent.EventType}\");\n        log.LogInformation($\"Subject: {eventGridEvent.Subject}\");\n        log.LogInformation($\"Data: {eventGridEvent.Data}\");\n    }\n}\n```\n\n### CloudEvent Trigger\n\n```csharp\nusing Azure.Messaging;\nusing Microsoft.Azure.Functions.Worker;\n\npublic class CloudEventFunction\n{\n    [Function(\"ProcessCloudEvent\")]\n    public void Run(\n        [EventGridTrigger] CloudEvent cloudEvent,\n        FunctionContext context)\n    {\n        var logger = context.GetLogger(\"ProcessCloudEvent\");\n        logger.LogInformation($\"Event Type: {cloudEvent.Type}\");\n        logger.LogInformation($\"Source: {cloudEvent.Source}\");\n        logger.LogInformation($\"Data: {cloudEvent.Data}\");\n    }\n}\n```\n\n## Parsing Events\n\n### Parse EventGridEvent\n\n```csharp\n\u002F\u002F From JSON string\nstring json = \"...\"; \u002F\u002F Event Grid webhook payload\nEventGridEvent[] events = EventGridEvent.ParseMany(BinaryData.FromString(json));\n\nforeach (EventGridEvent egEvent in events)\n{\n    if (egEvent.TryGetSystemEventData(out object systemEvent))\n    {\n        \u002F\u002F Handle system event\n        switch (systemEvent)\n        {\n            case StorageBlobCreatedEventData blobCreated:\n                Console.WriteLine($\"Blob created: {blobCreated.Url}\");\n                break;\n        }\n    }\n    else\n    {\n        \u002F\u002F Handle custom event\n        var customData = egEvent.Data.ToObjectFromJson\u003CMyCustomData>();\n    }\n}\n```\n\n### Parse CloudEvent\n\n```csharp\nCloudEvent[] cloudEvents = CloudEvent.ParseMany(BinaryData.FromString(json));\n\nforeach (CloudEvent cloudEvent in cloudEvents)\n{\n    var data = cloudEvent.Data.ToObjectFromJson\u003CMyEventData>();\n    Console.WriteLine($\"Type: {cloudEvent.Type}, Data: {data}\");\n}\n```\n\n## System Events\n\n```csharp\n\u002F\u002F Common system event types\nusing Azure.Messaging.EventGrid.SystemEvents;\n\n\u002F\u002F Storage events\nStorageBlobCreatedEventData blobCreated;\nStorageBlobDeletedEventData blobDeleted;\n\n\u002F\u002F Resource events\nResourceWriteSuccessEventData resourceCreated;\nResourceDeleteSuccessEventData resourceDeleted;\n\n\u002F\u002F App Service events\nWebAppUpdatedEventData webAppUpdated;\n\n\u002F\u002F Container Registry events\nContainerRegistryImagePushedEventData imagePushed;\n\n\u002F\u002F IoT Hub events\nIotHubDeviceCreatedEventData deviceCreated;\n```\n\n## Key Types Reference\n\n| Type | Purpose |\n|------|---------|\n| `EventGridPublisherClient` | Publish to topics\u002Fdomains |\n| `EventGridSenderClient` | Send to namespace topics |\n| `EventGridReceiverClient` | Receive from namespace subscriptions |\n| `EventGridEvent` | Event Grid native schema |\n| `CloudEvent` | CloudEvents 1.0 schema |\n| `ReceiveResult` | Pull delivery response |\n| `ReceiveDetails` | Event with broker properties |\n| `BrokerProperties` | Lock token, delivery count |\n\n## Event Schemas Comparison\n\n| Feature | EventGridEvent | CloudEvent |\n|---------|----------------|------------|\n| Standard | Azure-specific | CNCF standard |\n| Required fields | subject, eventType, dataVersion, data | source, type |\n| Extensibility | Limited | Extension attributes |\n| Interoperability | Azure only | Cross-platform |\n\n## Best Practices\n\n1. **Use CloudEvents** — Prefer CloudEvents for new implementations (industry standard)\n2. **Batch events** — Send multiple events in one call for efficiency\n3. **Use Entra ID** — Prefer managed identity over access keys\n4. **Idempotent handlers** — Events may be delivered more than once\n5. **Set event TTL** — Configure time-to-live for namespace events\n6. **Handle partial failures** — Acknowledge\u002Frelease events individually\n7. **Use dead-letter** — Configure dead-letter for failed events\n8. **Validate schemas** — Validate event data before processing\n\n## Error Handling\n\n```csharp\nusing Azure;\n\ntry\n{\n    await client.SendEventAsync(cloudEvent);\n}\ncatch (RequestFailedException ex) when (ex.Status == 401)\n{\n    Console.WriteLine(\"Authentication failed - check credentials\");\n}\ncatch (RequestFailedException ex) when (ex.Status == 403)\n{\n    Console.WriteLine(\"Authorization failed - check RBAC permissions\");\n}\ncatch (RequestFailedException ex) when (ex.Status == 413)\n{\n    Console.WriteLine(\"Payload too large - max 1MB per event, 1MB total batch\");\n}\ncatch (RequestFailedException ex)\n{\n    Console.WriteLine($\"Event Grid error: {ex.Status} - {ex.Message}\");\n}\n```\n\n## Failover Pattern\n\n```csharp\ntry\n{\n    var primaryClient = new EventGridPublisherClient(primaryUri, primaryKey);\n    await primaryClient.SendEventsAsync(events);\n}\ncatch (RequestFailedException)\n{\n    \u002F\u002F Failover to secondary region\n    var secondaryClient = new EventGridPublisherClient(secondaryUri, secondaryKey);\n    await secondaryClient.SendEventsAsync(events);\n}\n```\n\n## Related SDKs\n\n| SDK | Purpose | Install |\n|-----|---------|---------|\n| `Azure.Messaging.EventGrid` | Topics\u002FDomains (this SDK) | `dotnet add package Azure.Messaging.EventGrid` |\n| `Azure.Messaging.EventGrid.Namespaces` | Pull delivery | `dotnet add package Azure.Messaging.EventGrid.Namespaces` |\n| `Azure.Identity` | Authentication | `dotnet add package Azure.Identity` |\n| `Microsoft.Azure.WebJobs.Extensions.EventGrid` | Azure Functions trigger | `dotnet add package Microsoft.Azure.WebJobs.Extensions.EventGrid` |\n\n## Reference Links\n\n| Resource | URL |\n|----------|-----|\n| NuGet Package | https:\u002F\u002Fwww.nuget.org\u002Fpackages\u002FAzure.Messaging.EventGrid |\n| API Reference | https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fazure.messaging.eventgrid |\n| Quickstart | https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fevent-grid\u002Fcustom-event-quickstart |\n| Pull Delivery | https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fevent-grid\u002Fpull-delivery-overview |\n| GitHub Source | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-net\u002Ftree\u002Fmain\u002Fsdk\u002Feventgrid\u002FAzure.Messaging.EventGrid |\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n","# Azure.Messaging.EventGrid (.NET)\n\nClient library for publishing events to Azure Event Grid topics, domains, and namespaces.\n\n## Installation\n\n```bash\n# For topics and domains (push delivery)\ndotnet add package Azure.Messaging.EventGrid\n\n# For namespaces (pull delivery)\ndotnet add package Azure.Messaging.EventGrid.Namespaces\n\n# For CloudNative CloudEvents interop\ndotnet add package Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents\n```\n\n**Current Version**: 4.28.0 (stable)\n\n## Environment Variables\n\n```bash\n# Topic\u002FDomain endpoint\nEVENT_GRID_TOPIC_ENDPOINT=https:\u002F\u002F\u003Ctopic-name>.\u003Cregion>.eventgrid.azure.net\u002Fapi\u002Fevents\nEVENT_GRID_TOPIC_KEY=\u003Caccess-key>\n\n# Namespace endpoint (for pull delivery)\nEVENT_GRID_NAMESPACE_ENDPOINT=https:\u002F\u002F\u003Cnamespace>.\u003Cregion>.eventgrid.azure.net\nEVENT_GRID_TOPIC_NAME=\u003Ctopic-name>\nEVENT_GRID_SUBSCRIPTION_NAME=\u003Csubscription-name>\n```\n\n## Client Hierarchy\n\n```\nPush Delivery (Topics\u002FDomains)\n└── EventGridPublisherClient\n    ├── SendEventAsync(EventGridEvent)\n    ├── SendEventsAsync(IEnumerable\u003CEventGridEvent>)\n    ├── SendEventAsync(CloudEvent)\n    └── SendEventsAsync(IEnumerable\u003CCloudEvent>)\n\nPull Delivery (Namespaces)\n├── EventGridSenderClient\n│   └── SendAsync(CloudEvent)\n└── EventGridReceiverClient\n    ├── ReceiveAsync()\n    ├── AcknowledgeAsync()\n    ├── ReleaseAsync()\n    └── RejectAsync()\n```\n\n## Authentication\n\n### API Key Authentication\n\n```csharp\nusing Azure;\nusing Azure.Messaging.EventGrid;\n\nEventGridPublisherClient client = new(\n    new Uri(\"https:\u002F\u002Fmytopic.eastus-1.eventgrid.azure.net\u002Fapi\u002Fevents\"),\n    new AzureKeyCredential(\"\u003Caccess-key>\"));\n```\n\n### Microsoft Entra ID (Recommended)\n\n```csharp\nusing Azure.Identity;\nusing Azure.Messaging.EventGrid;\n\nEventGridPublisherClient client = new(\n    new Uri(\"https:\u002F\u002Fmytopic.eastus-1.eventgrid.azure.net\u002Fapi\u002Fevents\"),\n    new DefaultAzureCredential());\n```\n\n### SAS Token Authentication\n\n```csharp\nstring sasToken = EventGridPublisherClient.BuildSharedAccessSignature(\n    new Uri(topicEndpoint),\n    DateTimeOffset.UtcNow.AddHours(1),\n    new AzureKeyCredential(topicKey));\n\nvar sasCredential = new AzureSasCredential(sasToken);\nEventGridPublisherClient client = new(\n    new Uri(topicEndpoint),\n    sasCredential);\n```\n\n## Publishing Events\n\n### EventGridEvent Schema\n\n```csharp\nEventGridPublisherClient client = new(\n    new Uri(topicEndpoint),\n    new AzureKeyCredential(topicKey));\n\n\u002F\u002F Single event\nEventGridEvent egEvent = new(\n    subject: \"orders\u002F12345\",\n    eventType: \"Order.Created\",\n    dataVersion: \"1.0\",\n    data: new { OrderId = \"12345\", Amount = 99.99 });\n\nawait client.SendEventAsync(egEvent);\n\n\u002F\u002F Batch of events\nList\u003CEventGridEvent> events = new()\n{\n    new EventGridEvent(\n        subject: \"orders\u002F12345\",\n        eventType: \"Order.Created\",\n        dataVersion: \"1.0\",\n        data: new OrderData { OrderId = \"12345\", Amount = 99.99 }),\n    new EventGridEvent(\n        subject: \"orders\u002F12346\",\n        eventType: \"Order.Created\",\n        dataVersion: \"1.0\",\n        data: new OrderData { OrderId = \"12346\", Amount = 149.99 })\n};\n\nawait client.SendEventsAsync(events);\n```\n\n### CloudEvent Schema\n\n```csharp\nCloudEvent cloudEvent = new(\n    source: \"\u002Forders\u002Fsystem\",\n    type: \"Order.Created\",\n    data: new { OrderId = \"12345\", Amount = 99.99 });\n\ncloudEvent.Subject = \"orders\u002F12345\";\ncloudEvent.Id = Guid.NewGuid().ToString();\ncloudEvent.Time = DateTimeOffset.UtcNow;\n\nawait client.SendEventAsync(cloudEvent);\n\n\u002F\u002F Batch of CloudEvents\nList\u003CCloudEvent> cloudEvents = new()\n{\n    new CloudEvent(\"\u002Forders\", \"Order.Created\", new { OrderId = \"1\" }),\n    new CloudEvent(\"\u002Forders\", \"Order.Updated\", new { OrderId = \"2\" })\n};\n\nawait client.SendEventsAsync(cloudEvents);\n```\n\n### Publishing to Event Grid Domain\n\n```csharp\n\u002F\u002F Events must specify the Topic property for domain routing\nList\u003CEventGridEvent> events = new()\n{\n    new EventGridEvent(\n        subject: \"orders\u002F12345\",\n        eventType: \"Order.Created\",\n        dataVersion: \"1.0\",\n        data: new { OrderId = \"12345\" })\n    {\n        Topic = \"orders-topic\"  \u002F\u002F Domain topic name\n    },\n    new EventGridEvent(\n        subject: \"inventory\u002Fitem-1\",\n        eventType: \"Inventory.Updated\",\n        dataVersion: \"1.0\",\n        data: new { ItemId = \"item-1\" })\n    {\n        Topic = \"inventory-topic\"\n    }\n};\n\nawait client.SendEventsAsync(events);\n```\n\n### Custom Serialization\n\n```csharp\nusing System.Text.Json;\n\nvar serializerOptions = new JsonSerializerOptions\n{\n    PropertyNamingPolicy = JsonNamingPolicy.CamelCase\n};\n\nvar customSerializer = new JsonObjectSerializer(serializerOptions);\n\nEventGridEvent egEvent = new(\n    subject: \"orders\u002F12345\",\n    eventType: \"Order.Created\",\n    dataVersion: \"1.0\",\n    data: customSerializer.Serialize(new OrderData { OrderId = \"12345\" }));\n\nawait client.SendEventAsync(egEvent);\n```\n\n## Pull Delivery (Namespaces)\n\n### Send Events to Namespace Topic\n\n```csharp\nusing Azure;\nusing Azure.Messaging;\nusing Azure.Messaging.EventGrid.Namespaces;\n\nvar senderClient = new EventGridSenderClient(\n    new Uri(namespaceEndpoint),\n    topicName,\n    new AzureKeyCredential(topicKey));\n\n\u002F\u002F Send single event\nCloudEvent cloudEvent = new(\"employee_source\", \"Employee.Created\", \n    new { Name = \"John\", Age = 30 });\nawait senderClient.SendAsync(cloudEvent);\n\n\u002F\u002F Send batch\nawait senderClient.SendAsync(new[]\n{\n    new CloudEvent(\"source\", \"type\", new { Name = \"Alice\" }),\n    new CloudEvent(\"source\", \"type\", new { Name = \"Bob\" })\n});\n```\n\n### Receive and Process Events\n\n```csharp\nvar receiverClient = new EventGridReceiverClient(\n    new Uri(namespaceEndpoint),\n    topicName,\n    subscriptionName,\n    new AzureKeyCredential(topicKey));\n\n\u002F\u002F Receive events\nReceiveResult result = await receiverClient.ReceiveAsync(maxEvents: 10);\n\nList\u003Cstring> lockTokensToAck = new();\nList\u003Cstring> lockTokensToRelease = new();\n\nforeach (ReceiveDetails detail in result.Details)\n{\n    CloudEvent cloudEvent = detail.Event;\n    string lockToken = detail.BrokerProperties.LockToken;\n    \n    try\n    {\n        \u002F\u002F Process the event\n        Console.WriteLine($\"Event: {cloudEvent.Type}, Data: {cloudEvent.Data}\");\n        lockTokensToAck.Add(lockToken);\n    }\n    catch (Exception)\n    {\n        \u002F\u002F Release for retry\n        lockTokensToRelease.Add(lockToken);\n    }\n}\n\n\u002F\u002F Acknowledge successfully processed events\nif (lockTokensToAck.Any())\n{\n    await receiverClient.AcknowledgeAsync(lockTokensToAck);\n}\n\n\u002F\u002F Release events for retry\nif (lockTokensToRelease.Any())\n{\n    await receiverClient.ReleaseAsync(lockTokensToRelease);\n}\n```\n\n### Reject Events (Dead Letter)\n\n```csharp\n\u002F\u002F Reject events that cannot be processed\nawait receiverClient.RejectAsync(new[] { lockToken });\n```\n\n## Consuming Events (Azure Functions)\n\n### EventGridEvent Trigger\n\n```csharp\nusing Azure.Messaging.EventGrid;\nusing Microsoft.Azure.WebJobs;\nusing Microsoft.Azure.WebJobs.Extensions.EventGrid;\n\npublic static class EventGridFunction\n{\n    [FunctionName(\"ProcessEventGridEvent\")]\n    public static void Run(\n        [EventGridTrigger] EventGridEvent eventGridEvent,\n        ILogger log)\n    {\n        log.LogInformation($\"Event Type: {eventGridEvent.EventType}\");\n        log.LogInformation($\"Subject: {eventGridEvent.Subject}\");\n        log.LogInformation($\"Data: {eventGridEvent.Data}\");\n    }\n}\n```\n\n### CloudEvent Trigger\n\n```csharp\nusing Azure.Messaging;\nusing Microsoft.Azure.Functions.Worker;\n\npublic class CloudEventFunction\n{\n    [Function(\"ProcessCloudEvent\")]\n    public void Run(\n        [EventGridTrigger] CloudEvent cloudEvent,\n        FunctionContext context)\n    {\n        var logger = context.GetLogger(\"ProcessCloudEvent\");\n        logger.LogInformation($\"Event Type: {cloudEvent.Type}\");\n        logger.LogInformation($\"Source: {cloudEvent.Source}\");\n        logger.LogInformation($\"Data: {cloudEvent.Data}\");\n    }\n}\n```\n\n## Parsing Events\n\n### Parse EventGridEvent\n\n```csharp\n\u002F\u002F From JSON string\nstring json = \"...\"; \u002F\u002F Event Grid webhook payload\nEventGridEvent[] events = EventGridEvent.ParseMany(BinaryData.FromString(json));\n\nforeach (EventGridEvent egEvent in events)\n{\n    if (egEvent.TryGetSystemEventData(out object systemEvent))\n    {\n        \u002F\u002F Handle system event\n        switch (systemEvent)\n        {\n            case StorageBlobCreatedEventData blobCreated:\n                Console.WriteLine($\"Blob created: {blobCreated.Url}\");\n                break;\n        }\n    }\n    else\n    {\n        \u002F\u002F Handle custom event\n        var customData = egEvent.Data.ToObjectFromJson\u003CMyCustomData>();\n    }\n}\n```\n\n### Parse CloudEvent\n\n```csharp\nCloudEvent[] cloudEvents = CloudEvent.ParseMany(BinaryData.FromString(json));\n\nforeach (CloudEvent cloudEvent in cloudEvents)\n{\n    var data = cloudEvent.Data.ToObjectFromJson\u003CMyEventData>();\n    Console.WriteLine($\"Type: {cloudEvent.Type}, Data: {data}\");\n}\n```\n\n## System Events\n\n```csharp\n\u002F\u002F Common system event types\nusing Azure.Messaging.EventGrid.SystemEvents;\n\n\u002F\u002F Storage events\nStorageBlobCreatedEventData blobCreated;\nStorageBlobDeletedEventData blobDeleted;\n\n\u002F\u002F Resource events\nResourceWriteSuccessEventData resourceCreated;\nResourceDeleteSuccessEventData resourceDeleted;\n\n\u002F\u002F App Service events\nWebAppUpdatedEventData webAppUpdated;\n\n\u002F\u002F Container Registry events\nContainerRegistryImagePushedEventData imagePushed;\n\n\u002F\u002F IoT Hub events\nIotHubDeviceCreatedEventData deviceCreated;\n```\n\n## Key Types Reference\n\n| Type | Purpose |\n|------|---------|\n| `EventGridPublisherClient` | Publish to topics\u002Fdomains |\n| `EventGridSenderClient` | Send to namespace topics |\n| `EventGridReceiverClient` | Receive from namespace subscriptions |\n| `EventGridEvent` | Event Grid native schema |\n| `CloudEvent` | CloudEvents 1.0 schema |\n| `ReceiveResult` | Pull delivery response |\n| `ReceiveDetails` | Event with broker properties |\n| `BrokerProperties` | Lock token, delivery count |\n\n## Event Schemas Comparison\n\n| Feature | EventGridEvent | CloudEvent |\n|---------|----------------|------------|\n| Standard | Azure-specific | CNCF standard |\n| Required fields | subject, eventType, dataVersion, data | source, type |\n| Extensibility | Limited | Extension attributes |\n| Interoperability | Azure only | Cross-platform |\n\n## Best Practices\n\n1. **Use CloudEvents** — Prefer CloudEvents for new implementations (industry standard)\n2. **Batch events** — Send multiple events in one call for efficiency\n3. **Use Entra ID** — Prefer managed identity over access keys\n4. **Idempotent handlers** — Events may be delivered more than once\n5. **Set event TTL** — Configure time-to-live for namespace events\n6. **Handle partial failures** — Acknowledge\u002Frelease events individually\n7. **Use dead-letter** — Configure dead-letter for failed events\n8. **Validate schemas** — Validate event data before processing\n\n## Error Handling\n\n```csharp\nusing Azure;\n\ntry\n{\n    await client.SendEventAsync(cloudEvent);\n}\ncatch (RequestFailedException ex) when (ex.Status == 401)\n{\n    Console.WriteLine(\"Authentication failed - check credentials\");\n}\ncatch (RequestFailedException ex) when (ex.Status == 403)\n{\n    Console.WriteLine(\"Authorization failed - check RBAC permissions\");\n}\ncatch (RequestFailedException ex) when (ex.Status == 413)\n{\n    Console.WriteLine(\"Payload too large - max 1MB per event, 1MB total batch\");\n}\ncatch (RequestFailedException ex)\n{\n    Console.WriteLine($\"Event Grid error: {ex.Status} - {ex.Message}\");\n}\n```\n\n## Failover Pattern\n\n```csharp\ntry\n{\n    var primaryClient = new EventGridPublisherClient(primaryUri, primaryKey);\n    await primaryClient.SendEventsAsync(events);\n}\ncatch (RequestFailedException)\n{\n    \u002F\u002F Failover to secondary region\n    var secondaryClient = new EventGridPublisherClient(secondaryUri, secondaryKey);\n    await secondaryClient.SendEventsAsync(events);\n}\n```\n\n## Related SDKs\n\n| SDK | Purpose | Install |\n|-----|---------|---------|\n| `Azure.Messaging.EventGrid` | Topics\u002FDomains (this SDK) | `dotnet add package Azure.Messaging.EventGrid` |\n| `Azure.Messaging.EventGrid.Namespaces` | Pull delivery | `dotnet add package Azure.Messaging.EventGrid.Namespaces` |\n| `Azure.Identity` | Authentication | `dotnet add package Azure.Identity` |\n| `Microsoft.Azure.WebJobs.Extensions.EventGrid` | Azure Functions trigger | `dotnet add package Microsoft.Azure.WebJobs.Extensions.EventGrid` |\n\n## Reference Links\n\n| Resource | URL |\n|----------|-----|\n| NuGet Package | https:\u002F\u002Fwww.nuget.org\u002Fpackages\u002FAzure.Messaging.EventGrid |\n| API Reference | https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fazure.messaging.eventgrid |\n| Quickstart | https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fevent-grid\u002Fcustom-event-quickstart |\n| Pull Delivery | https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fevent-grid\u002Fpull-delivery-overview |\n| GitHub Source | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-net\u002Ftree\u002Fmain\u002Fsdk\u002Feventgrid\u002FAzure.Messaging.EventGrid |\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n",{"name":36,"risk":37,"source":38,"date_added":39,"description":40},"azure-eventgrid-dotnet","unknown","community","2026-02-27","Azure Event Grid SDK for .NET. Client library for publishing and consuming events with Azure Event Grid. Use for event-driven architectures, pub\u002Fsub messaging, CloudEvents, and EventGridEvents.","main","aae5fa43a57641df274d23f55d90e394333c4050",".claude\u002Fskills\u002Ftools-spin-sync",4,"https:\u002F\u002Fgithub.com\u002FAI-native-Systems-Research\u002Fai-native-storage-certus","https:\u002F\u002Fgithub.com\u002FAI-native-Systems-Research","https:\u002F\u002Fai-native-systems-research.github.io\u002Fai-native-systems-research\u002F","2026-11-10 09:17:37",{"source":8,"skillName":36,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add AI-native-Systems-Research\u002Fai-native-storage-certus --skill azure-eventgrid-dotnet",{"tool":55,"command":56},"bunx","bunx skills add AI-native-Systems-Research\u002Fai-native-storage-certus --skill azure-eventgrid-dotnet",{"tool":58,"command":59},"pnpm","pnpm dlx skills add AI-native-Systems-Research\u002Fai-native-storage-certus --skill azure-eventgrid-dotnet","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAI-native-Systems-Research\u002Fai-native-storage-certus\u002Fblob\u002Funstable\u002F.claude\u002Fskills\u002Ftools-spin-sync\u002FSKILL.md",true,[],[64,69,85,96,113,125],{"skillNo":65,"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":66,"categories":67,"keywords":68,"publishedAt":31},"01M6KP29TWSNGADF3AJ47BR7TY","https:\u002F\u002Fgithub.com\u002FAI-native-Systems-Research\u002Fai-native-storage-certus\u002Fblob\u002Funstable\u002Fcomponents\u002Fzyre\u002F.claude\u002Fskills\u002Ftools-spin-sync\u002FSKILL.md",[],[21,20,19,22,23,24,25,26,27,28,29,30],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":31},"01M6KP277TDY3ZAJEBP5P6MDT8","tools-spin-model","Create a new Spin\u002FPromela formal verification model for a system property","https:\u002F\u002Fgithub.com\u002FAI-native-Systems-Research\u002Fai-native-storage-certus\u002Fblob\u002Funstable\u002Fcomponents\u002Fzyre\u002F.claude\u002Fskills\u002Ftools-spin-model\u002FSKILL.md",[],[76,24,20,77,78,79,80,81,82,83,84],"tools spin model","system","formal verification","number","for","prove","new","create","verification",{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":31},"01M6KP250W406CEDSF02BRXT9D","tools-creusot-install","Install the Creusot Rust verification tool","https:\u002F\u002Fgithub.com\u002FAI-native-Systems-Research\u002Fai-native-storage-certus\u002Fblob\u002Funstable\u002Fcomponents\u002Fzyre\u002F.claude\u002Fskills\u002Ftools-creusot-install\u002FSKILL.md",[],[92,93,20,94,84,95],"tools creusot install","install","rust","tool",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":31},"01M6KP22H28FQ1X0V7VJHEFWXD","tools-creusot-init","Prepare an existing Cargo project to use Creusot formal verification","https:\u002F\u002Fgithub.com\u002FAI-native-Systems-Research\u002Fai-native-storage-certus\u002Fblob\u002Funstable\u002Fcomponents\u002Fzyre\u002F.claude\u002Fskills\u002Ftools-creusot-init\u002FSKILL.md",[],[103,20,104,105,106,107,108,84,109,78,110,111,112],"tools creusot init","init","project","directory","components","prepare","use","cargo","manager","Existing",{"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":31},"01M6KP1V506J9YM8DKKVDG1NRE","tools-creusot-coq-install","Add Coq 8.20 as an additional prover to an existing Creusot installation, for verification conditions that SMT solvers cannot discharge","https:\u002F\u002Fgithub.com\u002FAI-native-Systems-Research\u002Fai-native-storage-certus\u002Fblob\u002Funstable\u002Fcomponents\u002Fzyre\u002F.claude\u002Fskills\u002Ftools-creusot-coq-install\u002FSKILL.md",[],[120,121,93,20,80,112,122,123,84,124],"tools creusot coq install","Coq","as","installation","add",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":31},"01M6KP1PQJF3H765TYZAZ7P3EF","tools-creusot-annotate-interfaces","Formally verify a component's properties with Creusot and annotate its interface definitions","https:\u002F\u002Fgithub.com\u002FAI-native-Systems-Research\u002Fai-native-storage-certus\u002Fblob\u002Funstable\u002Fcomponents\u002Fzyre\u002F.claude\u002Fskills\u002Ftools-creusot-annotate-interfaces\u002FSKILL.md",[],[20,132,133,27,26,134,23,135,136],"tools creusot annotate interfaces","annotate","properties","component","interface"]