/dotnet-agent-kit:aspirefrom dotnet Agent Kit
Orchestrates .NET Aspire AppHost projects: resource configuration, service discovery, dashboard, and aspire CLI commands. Use for AppHost setup, AddDotnetProject, WithReference, and aspire run.
Ships in dotnet Agent Kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Verified against Aspire 17.0.0 (2026-11-17), which requires .NET 10. The product is called just "Aspire" (not ".NET Aspire"). The aspire CLI is the entry point: a C# AppHost now needs the CLI bundle (ASPIRE013), so start it with aspire run, not dotnet run.
aspire publish for docker-compose/Kubernetes manifests, aspire deploy for Azure Container Apps) — but the AppHost process itself stays a dev/build-time tool, not a production runtime.ServiceDefaults project configures OpenTelemetry, health checks, and resilience for all services in one place.The AppHost is a plain Microsoft.NET.Sdk console project. Aspire.AppHost.Sdk and AddProject<T> are deprecated in 17.0 (warning ASPIRE012); projects are added by path, so the AppHost has no ProjectReference items.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" />
<PackageReference Include="Aspire.Hosting.Dotnet" />
<PackageReference Include="Aspire.Hosting.PostgreSQL" />
</ItemGroup>
</Project>
// AppHost/AppHost.cs
var builder = DistributedApplication.CreateBuilder(args);
// Infrastructure resources
var postgres = builder.AddPostgres("postgres")
.WithPgAdmin()
.AddDatabase("myappdb");
var redis = builder.AddRedis("redis")
.WithRedisInsight();
var rabbitmq = builder.AddRabbitMQ("messaging")
.WithManagementPlugin();
// Application projects
var api = builder.AddDotnetProject("api", "../MyApp.Api/MyApp.Api.csproj")
.WithReference(postgres)
.WithReference(redis)
.WithReference(rabbitmq)
.WithExternalHttpEndpoints();
var worker = builder.AddDotnetProject("worker", "../MyApp.Worker/MyApp.Worker.csproj")
.WithReference(postgres)
.WithReference(rabbitmq);
await builder.Build().RunAsync();
// ServiceDefaults/Extensions.cs — Standard Aspire service defaults
// Configures OpenTelemetry (metrics + tracing), health checks, service discovery, and resilience
public static class Extensions
{
public static IHostApplicationBuilder AddServiceDefaults(this IHostApplicationBuilder builder)
{
builder.ConfigureOpenTelemetry();
builder.AddDefaultHealthChecks();
builder.Services.AddServiceDiscovery();
builder.Services.ConfigureHttpClientDefaults(http =>
{
http.AddStandardResilienceHandler();
http.AddServiceDiscovery();
});
return builder;
}
// ConfigureOpenTelemetry: adds logging, metrics (ASP.NET, HttpClient, Runtime),
// tracing (ASP.NET, HttpClient, EF Core), and OTLP exporter if configured
// AddDefaultHealthChecks: adds a "self" liveness check tagged ["live"]
}
// MyApp.Api/Program.cs
var builder = WebApplication.CreateBuilder(args);
builder.AddServiceDefaults();
// Add Aspire integrations
builder.AddNpgsqlDbContext<AppDbContext>("myappdb");
builder.AddRedisDistributedCache("redis");
var app = builder.Build();
app.MapDefaultEndpoints(); // health check endpoints
app.Run();
// AppHost — configure service references
var orderApi = builder.AddDotnetProject("order-api", "../OrderApi/OrderApi.csproj");
var paymentApi = builder.AddDotnetProject("payment-api", "../PaymentApi/PaymentApi.csproj")
.WithReference(orderApi); // paymentApi can discover orderApi
// In PaymentApi — use service discovery
builder.Services.AddHttpClient<OrderClient>(client =>
{
client.BaseAddress = new Uri("https+http://order-api");
});
MyApp.slnx
├── MyApp.AppHost/ # Aspire orchestrator
│ └── Program.cs
├── MyApp.ServiceDefaults/ # Shared service configuration
│ └── Extensions.cs
├── src/
│ ├── MyApp.Api/ # Web API project
│ └── MyApp.Worker/ # Background worker
└── tests/
└── MyApp.Api.Tests/
// BAD — running the AppHost executable in production as an orchestrator
// The AppHost is a dev/build-time tool, not a production runtime
// GOOD — deploy the generated assets, not the AppHost:
// aspire publish → docker-compose / Kubernetes manifests from the app model
// aspire deploy → direct deployment (e.g., Azure Container Apps)
// BAD — hardcoding connection strings defeats Aspire's purpose
builder.Services.AddDbContext<AppDbContext>(o =>
o.UseNpgsql("Host=localhost;Database=myapp;..."));
// GOOD — use Aspire integration (connection string injected automatically)
builder.AddNpgsqlDbContext<AppDbContext>("myappdb");
// BAD — manually configuring each service
builder.Services.AddOpenTelemetry()...
builder.Services.AddHealthChecks()...
// GOOD — use shared service defaults
builder.AddServiceDefaults();
// BAD — Aspire.AppHost.Sdk, AddProject<T> and AddCSharpApp are deprecated in 17.0 (ASPIRE012)
// <Project Sdk="Aspire.AppHost.Sdk/...">
var old = builder.AddProject<Projects.MyApp_Api>("api");
// GOOD — Microsoft.NET.Sdk AppHost + Aspire.Hosting.Dotnet, projects added by path
var api = builder.AddDotnetProject("api", "../MyApp.Api/MyApp.Api.csproj");
| Scenario | Recommendation |
|---|---|
| Local dev with multiple services | Aspire AppHost, started with aspire run |
Existing AppHost on Aspire.AppHost.Sdk | Move to Microsoft.NET.Sdk + AddDotnetProject when upgrading to 17 |
| Single-project local dev | dotnet run is fine, Aspire optional |
| Shared service configuration | ServiceDefaults project |
| Database for local dev | Aspire AddPostgres() / AddSqlServer() |
| Service discovery | Aspire's built-in service discovery |
| Production deployment | aspire publish (compose/K8s manifests) or aspire deploy (ACA); never the AppHost itself |
| Observability in local dev | Aspire dashboard (auto-configured) |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
aspire, dotnet-aspire, apphost, service-discovery, cloud-native
npx claudepluginhub codewithmukesh/dotnet-agent-kit --plugin dotnet-agent-kit37 skills in this plugin
/api-hardeningProduction hardening for ASP.NET Core 10 APIs: HSTS, forwarded headers behind a proxy (KnownIPNetworks), strict CORS, body and upload limits, security headers, no detailed errors. Use for "HSTS", "forwarded headers", "behind nginx", "CORS", "request size limit", "security headers", "harden for production". Do NOT use for auth (use authentication) or throttling (use rate-limiting).
/architecture-advisorArchitecture selection for new or restructured .NET solutions: asks about domain, team and compliance, then recommends modular slices (default), vertical slice, Clean Architecture or DDD. Use for "which architecture", "new solution", "restructure", "DDD", "project structure", "tech stack". Do NOT use for adding features to a modular-slices codebase (modular-slices), scaffolding (scaffold), or CLAUDE.md (dotnet-init).
/Other plugins' skills for the same job