[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79XZ038ZZHTVGNJMX8F17XM":3,"skill-same:01M79XZ038ZZHTVGNJMX8F17XM":47},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M79XZ038ZZHTVGNJMX8F17XM","aspire-service-defaults",null,"Customize the shared ServiceDefaults project of an Aspire application, which centralizes OpenTelemetry, health checks, resilience, and service discovery configuration across all services. A missing project comes from aspireify or the aspire-servicedefaults template, not a hand-written one.","Blind-Striker\u002Fagent-skills-and-plugins","Blind-Striker","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1965259?v=4","01M79WFXTE5PH0C1VB7B54ANMN","Deniz İrgin","01M79WFXV5KZ5GST1K8G035DM5",1,"MIT","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fplugins\u002Fdeniz-dotnet-aspire\u002Fskills\u002Faspire-service-defaults\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: aspire-service-defaults\ndescription: Customize the shared ServiceDefaults project of an Aspire\n  application, which centralizes OpenTelemetry, health checks, resilience, and\n  service discovery configuration across all services. A missing project comes\n  from aspireify or the aspire-servicedefaults template, not a hand-written one.\nuser-invocable: false\n---\n\n# Aspire Service Defaults\n\n## When to Use This Skill\n\nUse this skill when:\n- Building Aspire-based distributed applications\n- Need consistent observability (logging, tracing, metrics) across services\n- Want shared health check configuration\n- Configuring HttpClient resilience and service discovery\n\n---\n\n## What is ServiceDefaults?\n\nServiceDefaults is a shared project that provides common configuration for all services in an Aspire application:\n\n- **OpenTelemetry** - Logging, tracing, and metrics\n- **Health Checks** - Readiness and liveness endpoints\n- **Service Discovery** - Automatic service resolution\n- **HTTP Resilience** - Retry and circuit breaker policies\n\nEvery service references this project and calls `AddServiceDefaults()`.\n\n---\n\n## Project Structure\n\n```\nsrc\u002F\n  MyApp.ServiceDefaults\u002F\n    Extensions.cs\n    MyApp.ServiceDefaults.csproj\n  MyApp.Api\u002F\n    Program.cs  # Calls AddServiceDefaults()\n  MyApp.Worker\u002F\n    Program.cs  # Calls AddServiceDefaults()\n  MyApp.AppHost\u002F\n    Program.cs\n```\n\n---\n\n## ServiceDefaults Project\n\nIf the solution has no ServiceDefaults project yet, do not write one by hand: `aspire init` may already\nhave generated it; otherwise use the `deniz-dotnet-aspire:aspireify` skill, which creates it from the installed\n`dotnet new aspire-servicedefaults` template and wires each service. The project file and\n`Extensions.cs` below show what such a project contains, for reading and customizing one that exists.\n\n### Project File\n\n```xml\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net9.0\u003C\u002FTargetFramework>\n    \u003CIsAspireSharedProject>true\u003C\u002FIsAspireSharedProject>\n  \u003C\u002FPropertyGroup>\n\n  \u003CItemGroup>\n    \u003CFrameworkReference Include=\"Microsoft.AspNetCore.App\" \u002F>\n    \u003CPackageReference Include=\"Microsoft.Extensions.Http.Resilience\" \u002F>\n    \u003CPackageReference Include=\"Microsoft.Extensions.ServiceDiscovery\" \u002F>\n    \u003CPackageReference Include=\"OpenTelemetry.Exporter.OpenTelemetryProtocol\" \u002F>\n    \u003CPackageReference Include=\"OpenTelemetry.Extensions.Hosting\" \u002F>\n    \u003CPackageReference Include=\"OpenTelemetry.Instrumentation.AspNetCore\" \u002F>\n    \u003CPackageReference Include=\"OpenTelemetry.Instrumentation.Http\" \u002F>\n    \u003CPackageReference Include=\"OpenTelemetry.Instrumentation.Runtime\" \u002F>\n  \u003C\u002FItemGroup>\n\u003C\u002FProject>\n```\n\n### Extensions.cs\n\n```csharp\nusing Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Diagnostics.HealthChecks;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Diagnostics.HealthChecks;\nusing Microsoft.Extensions.Logging;\nusing OpenTelemetry;\nusing OpenTelemetry.Metrics;\nusing OpenTelemetry.Trace;\n\nnamespace Microsoft.Extensions.Hosting;\n\npublic static class Extensions\n{\n    private const string HealthEndpointPath = \"\u002Fhealth\";\n    private const string AlivenessEndpointPath = \"\u002Falive\";\n\n    \u002F\u002F\u002F \u003Csummary>\n    \u002F\u002F\u002F Adds common Aspire services: OpenTelemetry, health checks,\n    \u002F\u002F\u002F service discovery, and HTTP resilience.\n    \u002F\u002F\u002F \u003C\u002Fsummary>\n    public static TBuilder AddServiceDefaults\u003CTBuilder>(this TBuilder builder)\n        where TBuilder : IHostApplicationBuilder\n    {\n        builder.ConfigureOpenTelemetry();\n        builder.AddDefaultHealthChecks();\n\n        builder.Services.AddServiceDiscovery();\n\n        builder.Services.ConfigureHttpClientDefaults(http =>\n        {\n            \u002F\u002F Resilience: retries, circuit breaker, timeouts\n            http.AddStandardResilienceHandler();\n\n            \u002F\u002F Service discovery: resolve service names to addresses\n            http.AddServiceDiscovery();\n        });\n\n        return builder;\n    }\n\n    public static TBuilder ConfigureOpenTelemetry\u003CTBuilder>(this TBuilder builder)\n        where TBuilder : IHostApplicationBuilder\n    {\n        \u002F\u002F Logging\n        builder.Logging.AddOpenTelemetry(logging =>\n        {\n            logging.IncludeFormattedMessage = true;\n            logging.IncludeScopes = true;\n        });\n\n        builder.Services.AddOpenTelemetry()\n            \u002F\u002F Metrics\n            .WithMetrics(metrics =>\n            {\n                metrics\n                    .AddAspNetCoreInstrumentation()\n                    .AddHttpClientInstrumentation()\n                    .AddRuntimeInstrumentation();\n            })\n            \u002F\u002F Tracing\n            .WithTracing(tracing =>\n            {\n                tracing\n                    .AddSource(builder.Environment.ApplicationName)\n                    .AddAspNetCoreInstrumentation(options =>\n                        \u002F\u002F Exclude health checks from traces\n                        options.Filter = context =>\n                            !context.Request.Path.StartsWithSegments(HealthEndpointPath) &&\n                            !context.Request.Path.StartsWithSegments(AlivenessEndpointPath))\n                    .AddHttpClientInstrumentation();\n            });\n\n        builder.AddOpenTelemetryExporters();\n\n        return builder;\n    }\n\n    private static TBuilder AddOpenTelemetryExporters\u003CTBuilder>(this TBuilder builder)\n        where TBuilder : IHostApplicationBuilder\n    {\n        \u002F\u002F Use OTLP exporter if endpoint is configured (Aspire Dashboard, Jaeger, etc.)\n        var useOtlp = !string.IsNullOrWhiteSpace(\n            builder.Configuration[\"OTEL_EXPORTER_OTLP_ENDPOINT\"]);\n\n        if (useOtlp)\n        {\n            builder.Services.AddOpenTelemetry().UseOtlpExporter();\n        }\n\n        return builder;\n    }\n\n    public static TBuilder AddDefaultHealthChecks\u003CTBuilder>(this TBuilder builder)\n        where TBuilder : IHostApplicationBuilder\n    {\n        builder.Services.AddHealthChecks()\n            .AddCheck(\"self\", () => HealthCheckResult.Healthy(), [\"live\"]);\n\n        return builder;\n    }\n\n    \u002F\u002F\u002F \u003Csummary>\n    \u002F\u002F\u002F Maps health check endpoints. Call after UseRouting().\n    \u002F\u002F\u002F \u003C\u002Fsummary>\n    public static WebApplication MapDefaultEndpoints(this WebApplication app)\n    {\n        \u002F\u002F Only expose in development - see security note below\n        if (app.Environment.IsDevelopment())\n        {\n            \u002F\u002F Readiness: all health checks must pass\n            app.MapHealthChecks(HealthEndpointPath);\n\n            \u002F\u002F Liveness: only \"live\" tagged checks\n            app.MapHealthChecks(AlivenessEndpointPath, new HealthCheckOptions\n            {\n                Predicate = r => r.Tags.Contains(\"live\")\n            });\n        }\n\n        return app;\n    }\n}\n```\n\n---\n\n## Usage in Services\n\n### API Service\n\n```csharp\nvar builder = WebApplication.CreateBuilder(args);\n\n\u002F\u002F Add all service defaults\nbuilder.AddServiceDefaults();\n\n\u002F\u002F Add your services\nbuilder.Services.AddControllers();\n\nvar app = builder.Build();\n\n\u002F\u002F Map health endpoints\napp.MapDefaultEndpoints();\n\napp.MapControllers();\napp.Run();\n```\n\n### Worker Service\n\n```csharp\nvar builder = Host.CreateApplicationBuilder(args);\n\n\u002F\u002F Works for non-web hosts too\nbuilder.AddServiceDefaults();\n\nbuilder.Services.AddHostedService\u003CMyWorker>();\n\nvar host = builder.Build();\nhost.Run();\n```\n\n---\n\n## Adding Custom Health Checks\n\n```csharp\npublic static TBuilder AddDefaultHealthChecks\u003CTBuilder>(this TBuilder builder)\n    where TBuilder : IHostApplicationBuilder\n{\n    builder.Services.AddHealthChecks()\n        \u002F\u002F Basic liveness\n        .AddCheck(\"self\", () => HealthCheckResult.Healthy(), [\"live\"])\n\n        \u002F\u002F Database readiness\n        .AddNpgSql(\n            builder.Configuration.GetConnectionString(\"postgres\")!,\n            name: \"postgres\",\n            tags: [\"ready\"])\n\n        \u002F\u002F Redis readiness\n        .AddRedis(\n            builder.Configuration.GetConnectionString(\"redis\")!,\n            name: \"redis\",\n            tags: [\"ready\"])\n\n        \u002F\u002F Custom check\n        .AddCheck\u003CMyCustomHealthCheck>(\"custom\", tags: [\"ready\"]);\n\n    return builder;\n}\n```\n\n---\n\n## Adding Custom Trace Sources\n\nFor Akka.NET or custom ActivitySources:\n\n```csharp\npublic static TBuilder ConfigureOpenTelemetry\u003CTBuilder>(this TBuilder builder)\n    where TBuilder : IHostApplicationBuilder\n{\n    builder.Services.AddOpenTelemetry()\n        .WithTracing(tracing =>\n        {\n            tracing\n                .AddSource(builder.Environment.ApplicationName)\n                \u002F\u002F Akka.NET tracing\n                .AddSource(\"Akka.NET\")\n                \u002F\u002F Custom sources\n                .AddSource(\"MyApp.Orders\")\n                .AddSource(\"MyApp.Payments\")\n                .AddAspNetCoreInstrumentation()\n                .AddHttpClientInstrumentation();\n        });\n\n    return builder;\n}\n```\n\n---\n\n## Production Health Checks\n\nFor production, protect health endpoints or use different paths:\n\n```csharp\npublic static WebApplication MapDefaultEndpoints(this WebApplication app)\n{\n    \u002F\u002F Always map for Kubernetes probes, but consider:\n    \u002F\u002F - Using internal-only ports\n    \u002F\u002F - Adding authorization\n    \u002F\u002F - Rate limiting\n\n    app.MapHealthChecks(\"\u002Fhealth\", new HealthCheckOptions\n    {\n        \u002F\u002F Only return status, not details\n        ResponseWriter = (context, report) =>\n        {\n            context.Response.ContentType = \"text\u002Fplain\";\n            return context.Response.WriteAsync(report.Status.ToString());\n        }\n    });\n\n    app.MapHealthChecks(\"\u002Falive\", new HealthCheckOptions\n    {\n        Predicate = r => r.Tags.Contains(\"live\"),\n        ResponseWriter = (context, report) =>\n        {\n            context.Response.ContentType = \"text\u002Fplain\";\n            return context.Response.WriteAsync(report.Status.ToString());\n        }\n    });\n\n    return app;\n}\n```\n\n---\n\n## Integration with AppHost\n\nThe AppHost automatically configures OTLP endpoints:\n\n```csharp\n\u002F\u002F AppHost\u002FProgram.cs\nvar builder = DistributedApplication.CreateBuilder(args);\n\nvar postgres = builder.AddPostgres(\"postgres\");\nvar redis = builder.AddRedis(\"redis\");\n\nvar api = builder.AddProject\u003CProjects.MyApp_Api>(\"api\")\n    .WithReference(postgres)\n    .WithReference(redis);\n\nbuilder.Build().Run();\n```\n\nServices receive `OTEL_EXPORTER_OTLP_ENDPOINT` automatically, sending telemetry to the Aspire Dashboard.\n\n---\n\n## Best Practices\n\n| Practice | Reason |\n|----------|--------|\n| **One ServiceDefaults project** | Consistent config across all services |\n| **Filter health checks from traces** | Reduces noise in observability data |\n| **Tag health checks** | Separate liveness from readiness |\n| **Use StandardResilienceHandler** | Built-in retry, circuit breaker, timeout |\n| **Add custom trace sources** | Capture domain-specific spans |\n\n---\n\n## Resources\n\n- **Aspire Service Defaults**: https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fdotnet\u002Faspire\u002Ffundamentals\u002Fservice-defaults\n- **OpenTelemetry .NET**: https:\u002F\u002Fopentelemetry.io\u002Fdocs\u002Flanguages\u002Fnet\u002F\n- **Health Checks**: https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Faspnet\u002Fcore\u002Fhost-and-deploy\u002Fhealth-checks\n","# Aspire Service Defaults\n\n## When to Use This Skill\n\nUse this skill when:\n- Building Aspire-based distributed applications\n- Need consistent observability (logging, tracing, metrics) across services\n- Want shared health check configuration\n- Configuring HttpClient resilience and service discovery\n\n---\n\n## What is ServiceDefaults?\n\nServiceDefaults is a shared project that provides common configuration for all services in an Aspire application:\n\n- **OpenTelemetry** - Logging, tracing, and metrics\n- **Health Checks** - Readiness and liveness endpoints\n- **Service Discovery** - Automatic service resolution\n- **HTTP Resilience** - Retry and circuit breaker policies\n\nEvery service references this project and calls `AddServiceDefaults()`.\n\n---\n\n## Project Structure\n\n```\nsrc\u002F\n  MyApp.ServiceDefaults\u002F\n    Extensions.cs\n    MyApp.ServiceDefaults.csproj\n  MyApp.Api\u002F\n    Program.cs  # Calls AddServiceDefaults()\n  MyApp.Worker\u002F\n    Program.cs  # Calls AddServiceDefaults()\n  MyApp.AppHost\u002F\n    Program.cs\n```\n\n---\n\n## ServiceDefaults Project\n\nIf the solution has no ServiceDefaults project yet, do not write one by hand: `aspire init` may already\nhave generated it; otherwise use the `deniz-dotnet-aspire:aspireify` skill, which creates it from the installed\n`dotnet new aspire-servicedefaults` template and wires each service. The project file and\n`Extensions.cs` below show what such a project contains, for reading and customizing one that exists.\n\n### Project File\n\n```xml\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net9.0\u003C\u002FTargetFramework>\n    \u003CIsAspireSharedProject>true\u003C\u002FIsAspireSharedProject>\n  \u003C\u002FPropertyGroup>\n\n  \u003CItemGroup>\n    \u003CFrameworkReference Include=\"Microsoft.AspNetCore.App\" \u002F>\n    \u003CPackageReference Include=\"Microsoft.Extensions.Http.Resilience\" \u002F>\n    \u003CPackageReference Include=\"Microsoft.Extensions.ServiceDiscovery\" \u002F>\n    \u003CPackageReference Include=\"OpenTelemetry.Exporter.OpenTelemetryProtocol\" \u002F>\n    \u003CPackageReference Include=\"OpenTelemetry.Extensions.Hosting\" \u002F>\n    \u003CPackageReference Include=\"OpenTelemetry.Instrumentation.AspNetCore\" \u002F>\n    \u003CPackageReference Include=\"OpenTelemetry.Instrumentation.Http\" \u002F>\n    \u003CPackageReference Include=\"OpenTelemetry.Instrumentation.Runtime\" \u002F>\n  \u003C\u002FItemGroup>\n\u003C\u002FProject>\n```\n\n### Extensions.cs\n\n```csharp\nusing Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Diagnostics.HealthChecks;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Diagnostics.HealthChecks;\nusing Microsoft.Extensions.Logging;\nusing OpenTelemetry;\nusing OpenTelemetry.Metrics;\nusing OpenTelemetry.Trace;\n\nnamespace Microsoft.Extensions.Hosting;\n\npublic static class Extensions\n{\n    private const string HealthEndpointPath = \"\u002Fhealth\";\n    private const string AlivenessEndpointPath = \"\u002Falive\";\n\n    \u002F\u002F\u002F \u003Csummary>\n    \u002F\u002F\u002F Adds common Aspire services: OpenTelemetry, health checks,\n    \u002F\u002F\u002F service discovery, and HTTP resilience.\n    \u002F\u002F\u002F \u003C\u002Fsummary>\n    public static TBuilder AddServiceDefaults\u003CTBuilder>(this TBuilder builder)\n        where TBuilder : IHostApplicationBuilder\n    {\n        builder.ConfigureOpenTelemetry();\n        builder.AddDefaultHealthChecks();\n\n        builder.Services.AddServiceDiscovery();\n\n        builder.Services.ConfigureHttpClientDefaults(http =>\n        {\n            \u002F\u002F Resilience: retries, circuit breaker, timeouts\n            http.AddStandardResilienceHandler();\n\n            \u002F\u002F Service discovery: resolve service names to addresses\n            http.AddServiceDiscovery();\n        });\n\n        return builder;\n    }\n\n    public static TBuilder ConfigureOpenTelemetry\u003CTBuilder>(this TBuilder builder)\n        where TBuilder : IHostApplicationBuilder\n    {\n        \u002F\u002F Logging\n        builder.Logging.AddOpenTelemetry(logging =>\n        {\n            logging.IncludeFormattedMessage = true;\n            logging.IncludeScopes = true;\n        });\n\n        builder.Services.AddOpenTelemetry()\n            \u002F\u002F Metrics\n            .WithMetrics(metrics =>\n            {\n                metrics\n                    .AddAspNetCoreInstrumentation()\n                    .AddHttpClientInstrumentation()\n                    .AddRuntimeInstrumentation();\n            })\n            \u002F\u002F Tracing\n            .WithTracing(tracing =>\n            {\n                tracing\n                    .AddSource(builder.Environment.ApplicationName)\n                    .AddAspNetCoreInstrumentation(options =>\n                        \u002F\u002F Exclude health checks from traces\n                        options.Filter = context =>\n                            !context.Request.Path.StartsWithSegments(HealthEndpointPath) &&\n                            !context.Request.Path.StartsWithSegments(AlivenessEndpointPath))\n                    .AddHttpClientInstrumentation();\n            });\n\n        builder.AddOpenTelemetryExporters();\n\n        return builder;\n    }\n\n    private static TBuilder AddOpenTelemetryExporters\u003CTBuilder>(this TBuilder builder)\n        where TBuilder : IHostApplicationBuilder\n    {\n        \u002F\u002F Use OTLP exporter if endpoint is configured (Aspire Dashboard, Jaeger, etc.)\n        var useOtlp = !string.IsNullOrWhiteSpace(\n            builder.Configuration[\"OTEL_EXPORTER_OTLP_ENDPOINT\"]);\n\n        if (useOtlp)\n        {\n            builder.Services.AddOpenTelemetry().UseOtlpExporter();\n        }\n\n        return builder;\n    }\n\n    public static TBuilder AddDefaultHealthChecks\u003CTBuilder>(this TBuilder builder)\n        where TBuilder : IHostApplicationBuilder\n    {\n        builder.Services.AddHealthChecks()\n            .AddCheck(\"self\", () => HealthCheckResult.Healthy(), [\"live\"]);\n\n        return builder;\n    }\n\n    \u002F\u002F\u002F \u003Csummary>\n    \u002F\u002F\u002F Maps health check endpoints. Call after UseRouting().\n    \u002F\u002F\u002F \u003C\u002Fsummary>\n    public static WebApplication MapDefaultEndpoints(this WebApplication app)\n    {\n        \u002F\u002F Only expose in development - see security note below\n        if (app.Environment.IsDevelopment())\n        {\n            \u002F\u002F Readiness: all health checks must pass\n            app.MapHealthChecks(HealthEndpointPath);\n\n            \u002F\u002F Liveness: only \"live\" tagged checks\n            app.MapHealthChecks(AlivenessEndpointPath, new HealthCheckOptions\n            {\n                Predicate = r => r.Tags.Contains(\"live\")\n            });\n        }\n\n        return app;\n    }\n}\n```\n\n---\n\n## Usage in Services\n\n### API Service\n\n```csharp\nvar builder = WebApplication.CreateBuilder(args);\n\n\u002F\u002F Add all service defaults\nbuilder.AddServiceDefaults();\n\n\u002F\u002F Add your services\nbuilder.Services.AddControllers();\n\nvar app = builder.Build();\n\n\u002F\u002F Map health endpoints\napp.MapDefaultEndpoints();\n\napp.MapControllers();\napp.Run();\n```\n\n### Worker Service\n\n```csharp\nvar builder = Host.CreateApplicationBuilder(args);\n\n\u002F\u002F Works for non-web hosts too\nbuilder.AddServiceDefaults();\n\nbuilder.Services.AddHostedService\u003CMyWorker>();\n\nvar host = builder.Build();\nhost.Run();\n```\n\n---\n\n## Adding Custom Health Checks\n\n```csharp\npublic static TBuilder AddDefaultHealthChecks\u003CTBuilder>(this TBuilder builder)\n    where TBuilder : IHostApplicationBuilder\n{\n    builder.Services.AddHealthChecks()\n        \u002F\u002F Basic liveness\n        .AddCheck(\"self\", () => HealthCheckResult.Healthy(), [\"live\"])\n\n        \u002F\u002F Database readiness\n        .AddNpgSql(\n            builder.Configuration.GetConnectionString(\"postgres\")!,\n            name: \"postgres\",\n            tags: [\"ready\"])\n\n        \u002F\u002F Redis readiness\n        .AddRedis(\n            builder.Configuration.GetConnectionString(\"redis\")!,\n            name: \"redis\",\n            tags: [\"ready\"])\n\n        \u002F\u002F Custom check\n        .AddCheck\u003CMyCustomHealthCheck>(\"custom\", tags: [\"ready\"]);\n\n    return builder;\n}\n```\n\n---\n\n## Adding Custom Trace Sources\n\nFor Akka.NET or custom ActivitySources:\n\n```csharp\npublic static TBuilder ConfigureOpenTelemetry\u003CTBuilder>(this TBuilder builder)\n    where TBuilder : IHostApplicationBuilder\n{\n    builder.Services.AddOpenTelemetry()\n        .WithTracing(tracing =>\n        {\n            tracing\n                .AddSource(builder.Environment.ApplicationName)\n                \u002F\u002F Akka.NET tracing\n                .AddSource(\"Akka.NET\")\n                \u002F\u002F Custom sources\n                .AddSource(\"MyApp.Orders\")\n                .AddSource(\"MyApp.Payments\")\n                .AddAspNetCoreInstrumentation()\n                .AddHttpClientInstrumentation();\n        });\n\n    return builder;\n}\n```\n\n---\n\n## Production Health Checks\n\nFor production, protect health endpoints or use different paths:\n\n```csharp\npublic static WebApplication MapDefaultEndpoints(this WebApplication app)\n{\n    \u002F\u002F Always map for Kubernetes probes, but consider:\n    \u002F\u002F - Using internal-only ports\n    \u002F\u002F - Adding authorization\n    \u002F\u002F - Rate limiting\n\n    app.MapHealthChecks(\"\u002Fhealth\", new HealthCheckOptions\n    {\n        \u002F\u002F Only return status, not details\n        ResponseWriter = (context, report) =>\n        {\n            context.Response.ContentType = \"text\u002Fplain\";\n            return context.Response.WriteAsync(report.Status.ToString());\n        }\n    });\n\n    app.MapHealthChecks(\"\u002Falive\", new HealthCheckOptions\n    {\n        Predicate = r => r.Tags.Contains(\"live\"),\n        ResponseWriter = (context, report) =>\n        {\n            context.Response.ContentType = \"text\u002Fplain\";\n            return context.Response.WriteAsync(report.Status.ToString());\n        }\n    });\n\n    return app;\n}\n```\n\n---\n\n## Integration with AppHost\n\nThe AppHost automatically configures OTLP endpoints:\n\n```csharp\n\u002F\u002F AppHost\u002FProgram.cs\nvar builder = DistributedApplication.CreateBuilder(args);\n\nvar postgres = builder.AddPostgres(\"postgres\");\nvar redis = builder.AddRedis(\"redis\");\n\nvar api = builder.AddProject\u003CProjects.MyApp_Api>(\"api\")\n    .WithReference(postgres)\n    .WithReference(redis);\n\nbuilder.Build().Run();\n```\n\nServices receive `OTEL_EXPORTER_OTLP_ENDPOINT` automatically, sending telemetry to the Aspire Dashboard.\n\n---\n\n## Best Practices\n\n| Practice | Reason |\n|----------|--------|\n| **One ServiceDefaults project** | Consistent config across all services |\n| **Filter health checks from traces** | Reduces noise in observability data |\n| **Tag health checks** | Separate liveness from readiness |\n| **Use StandardResilienceHandler** | Built-in retry, circuit breaker, timeout |\n| **Add custom trace sources** | Capture domain-specific spans |\n\n---\n\n## Resources\n\n- **Aspire Service Defaults**: https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fdotnet\u002Faspire\u002Ffundamentals\u002Fservice-defaults\n- **OpenTelemetry .NET**: https:\u002F\u002Fopentelemetry.io\u002Fdocs\u002Flanguages\u002Fnet\u002F\n- **Health Checks**: https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Faspnet\u002Fcore\u002Fhost-and-deploy\u002Fhealth-checks\n",{"name":5,"description":7,"user-invocable":20},"master","b30b1c1908dbc56a8184128f18803053d762ccb5","plugins\u002Fdeniz-dotnet-aspire\u002Fskills\u002Faspire-service-defaults",0,"https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins","https:\u002F\u002Fgithub.com\u002FBlind-Striker","denizirgin.com","VP of Engineering - \r\n@armutcom @homeruntech @prontopro\r\n |  Speaker \r\n@CodeFiction\r\n, http:\u002F\u002Fcodefiction.tech | Developer, gamer, blogger, maiden iron fan","2026-11-13 00:23:18",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill aspire-service-defaults",{"tool":39,"command":40},"bunx","bunx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill aspire-service-defaults",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill aspire-service-defaults","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fplugins\u002Fdeniz-dotnet-aspire\u002Fskills\u002Faspire-service-defaults\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M79YGWBJ52PHMSTKJ3RJ3AWR","writing-tunit-tests","Write tests in TUnit — the attributes, the async assertion model, data-driven cases, lifecycle hooks, and the parallelism rules. USE FOR writing or fixing a test in a TUnit project, translating a test idea into TUnit syntax, or reviewing TUnit test code for API mistakes. DO NOT USE FOR deciding what to test, judging whether a test is any good, or running tests.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fwriting-tunit-tests\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M79YGR3Y9RCRS6TD71D0KKP8","dotnet-walls","Walls for a .NET change in a repository without its own quality gates — pinned, ephemeral analyzer, format, clone and scanner commands for the verify step, their identity ratchet, and the build traps. Use during a walls preflight, or when a worker's verify step needs .NET quality gates.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fdotnet-walls\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"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":19},"01M79YGFNJBST7D803NQW3SBYM","csharp-15","Write, review and modernize C# 15 (.NET 11) code correctly. Covers every C# 15 feature - collection expression arguments (`[with(...), ...]`), union types (`union`, `[Union]`, `IUnion`, custom unions), closed class hierarchies (`closed`), extension indexers, labeled `break`\u002F`continue`, non-virtual static interface members on runtimes without default interface methods, and the preview memory-safety model (`unsafe(expr)`, `safe`, requires-unsafe members). Use when code targets net11.0 or LangVersion 15\u002Fpreview, when the user mentions any of these features, when replacing marker interfaces, OneOf-style results, `goto`\u002Fflag loop exits or capacity\u002Fcomparer boilerplate, or when the build reports CS8121, CS8509, CS8655, CS8510, CS0121\u002FCS0411 on a `with(...)` element, CS9370, CS9380 or CS9363.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fcsharp-15\u002FSKILL.md",[],[],{"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":19},"01M79YGAV031473HSX6FN87ENH","verified-waves","Run one task as verified multi-agent waves. Plans the fan-out, sends findings to fresh skeptics, keeps a ledger, and reports N of M done; small tasks stay solo.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fverified-waves\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M79YG6QXNND4WRPP3GATSY8J","harness","The bundled dispatch harness, which runs a task file on worker models through OpenCode or Codex, fences their writes, escalates their asks to the operator, settles each result from git and its verify commands, and records every step in a ledger. Its commands, task file, modes and write fence, configuration, runs and their recovery, ledger and exit codes.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fharness\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M79YG2P5S91SDTA5912XJ4FV","delegating-to-worker-models","Use when you hand off implementation, a plan, research a decision will rely on, or a review, and you brief the worker and check what comes back. A subagent that searches, reads in parallel, or keeps your context small is ordinary tool use. Covers what stays with you, the mechanism, assigning work by strength, the walls preflight, prompts without contradictions, the worker contract and model profiles, evidence from your own run, review, and the fix-up loop.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fdelegating-to-worker-models\u002FSKILL.md",[],[]]