.squad/skills/aspire-dashboard-commands/SKILL.md
# SKILL: Aspire Dashboard Custom Commands ## When to Use When adding interactive buttons to the Aspire dashboard that call HTTP endpoints on resources. ## Pattern: WithHttpCommand (Aspire 13.1+) Use `WithHttpCommand` for commands that send HTTP requests to a resource's own endpoint. This is the idiomatic way — it handles endpoint resolution, HTTP client, and result reporting automatically. ### AppHost Side ```csharp var api = builder.AddProject<Projects.MyService>("api") .WithHttpHealthC
npx skillsauth add csharpfritz/aspire-minecraft .squad/skills/aspire-dashboard-commandsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When adding interactive buttons to the Aspire dashboard that call HTTP endpoints on resources.
Use WithHttpCommand for commands that send HTTP requests to a resource's own endpoint. This is the idiomatic way — it handles endpoint resolution, HTTP client, and result reporting automatically.
var api = builder.AddProject<Projects.MyService>("api")
.WithHttpHealthCheck("/health") // Enable Aspire health polling
.WithHttpCommand("/my-endpoint", "Button Label",
commandName: "my-command",
commandOptions: new HttpCommandOptions
{
IconName = "ErrorCircle", // FluentUI icon name
IconVariant = IconVariant.Filled, // Regular or Filled
Description = "Tooltip text",
ConfirmationMessage = "Are you sure?",
IsHighlighted = true, // Makes button prominent
// Method defaults to POST — set explicitly for GET:
// Method = HttpMethod.Get,
});
app.MapPost("/my-endpoint", () =>
{
// Do the thing
return Results.Ok(new { message = "Done" });
});
WithHttpCommand defaults to POST method.WithHttpHealthCheck is needed for Aspire to actively monitor /health — without it, health endpoint changes are invisible to the orchestrator.IconName must be a valid FluentUI System Icon.GetCommandResult callback).PrepareRequest callback in HttpCommandOptions to add headers or modify the request before it's sent.Avoid this for same-resource HTTP calls:
// DON'T — WithHttpCommand handles endpoint resolution for you
.WithCommand("my-cmd", "Button", async context =>
{
var client = new HttpClient();
// Manually resolve endpoint URL... error-prone
await client.PostAsync(url, null);
return CommandResults.Success();
});
tools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
tools
Techniques for visually connecting water bodies (canals, lakes, rivers) in Minecraft
development
# Static Configuration Pattern **Confidence:** low **Source:** earned ## When to Use When a class has compile-time constants (`const`) that need to become runtime-configurable without breaking existing consumers. ## Pattern 1. Convert `const` fields to `static T { get; private set; } = <original value>`. 2. Add a public `Configure*()` method that sets the new values. Call once at startup. 3. Add an `internal static Reset*()` method that restores defaults — needed for test isolation since `p
development
Core conventions and patterns used in the Squad codebase