csharpfritz/discord-minecraft/aspire-apphost-wiring

Claude Code and agent skill by csharpfritz/discord-minecraft

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

How to wire up .NET Aspire 13.1 AppHost with containers, databases, and service projects

Install

npx vskill@latest install csharpfritz/discord-minecraft/aspire-apphost-wiring

SKILL.md

Context

When scaffolding a .NET Aspire 13.1 solution with multiple services, containers, and infrastructure resources. Applies to any project using Aspire for orchestration.

Patterns

Template selection
  • aspire-apphost for the orchestrator (generates AppHost.cs, not Program.cs)
  • aspire-servicedefaults for shared defaults (OTel, health checks, service discovery)
  • Standard webapi, worker, classlib templates for service projects — Aspire doesn't need special service templates
Container endpoints for non-HTTP services

Non-HTTP containers (Minecraft, game servers, TCP services) need explicit scheme: "tcp":

csharp
.WithEndpoint(targetPort: 25565, port: 25565, name: "minecraft", scheme: "tcp")
Secret parameters

Use builder.AddParameter("name", secret: true) for secrets that containers need:

csharp
.WithEnvironment("RCON_PASSWORD", builder.AddParameter("rcon-password", secret: true))

This integrates with user secrets in dev and proper stores in production.

Service wiring pattern

Services call builder.AddServiceDefaults() plus their specific Aspire client integrations:

csharp
builder.AddNpgsqlDbContext<MyDbContext>("connectionName");
builder.AddRedisClient("redis");

The connection name must match what the AppHost defines (e.g., .AddDatabase("bridgedb") → "bridgedb").

EF Core Design package placement

Microsoft.EntityFrameworkCore.Design must be in BOTH the data class library AND the startup project for dotnet ef migrations to work.

Examples

See src/AppHost/AppHost.cs in the Discord-Minecraft project for a complete multi-service, multi-container orchestration.

Anti-Patterns

  • Don't hardcode connection strings — let Aspire inject them via service discovery
  • Don't use aspire-starter if you need custom project layouts — scaffold individual projects instead
  • Don't forget WaitFor() chains — services that depend on infrastructure should wait for it
  • Don't mix EF Core package versions between the Aspire integration and your data library — pin explicitly if needed

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/csharpfritz/discord-minecraft/aspire-apphost-wiring/badge)](https://verified-skill.com/skills/csharpfritz/discord-minecraft/aspire-apphost-wiring)

Something wrong with this skill or its page? Tell us.