Skip to content
aaronontheweb avatar

Aspire Configuration

Explicit AppHost-to-app configuration bridge that keeps Aspire client and service-discovery packages out of app code.

CCM score
69 of 100
skills.sh installs
514
GitHub stars
1.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the flow from AppHost resource outputs through WithEnvironment(...) into IOptions<T> bindings in app projects
  • Includes C# patterns for database references via WithReference, a MinIO blob storage container, and feature-toggle overrides
  • Enforces that Aspire hosting packages stay in AppHost and that every injected value can be set as a production env var
  • Designed for .NET teams running Aspire locally who need production configuration to remain portable without Aspire

Install

$ npx -y skills add aaronontheweb/dotnet-skills --skill aspire-configuration -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Aspire Configuration

When to Use This Skill

Use this skill when:

  • Wiring AppHost resources to application configuration in Aspire-based repos
  • Ensuring production configuration is transparent and portable outside of Aspire
  • Avoiding Aspire client/service-discovery packages inside application code
  • Designing feature toggles for dev/test without changing app code paths

Core Principles

  1. AppHost owns Aspire infrastructure packages

    • Aspire Hosting packages belong in AppHost only.
    • App projects should not reference Aspire client/service-discovery packages.
  2. Explicit configuration only

    • AppHost must translate resource outputs into explicit config keys (env vars).
    • App code binds to IOptions<T> or Configuration only.
  3. Production parity and transparency

    • Every value injected by AppHost must be representable in production as env vars or config files without Aspire.
    • Avoid opaque service discovery and implicit configuration.

Configuration Flow

AppHost resource -> WithEnvironment(...) -> app config keys -> IOptions<T> in app

Details

Repository
github.com/aaronontheweb/dotnet-skills
Categories
.NET & C#, DevOps & Cloud
First seen
Jun 3, 2026

Questions

What does the aspire-configuration skill do?

It configures the Aspire AppHost to pass explicit application configuration through environment variables, so app code reads only IOptions and Configuration values. Application code stays free of Aspire client packages and service discovery.

Where does aspire-configuration sit in the .NET & C# category?

It is in the .NET & C# category, alongside dotnet-backend-patterns, dotnet-best-practices, nuget-manager and microsoft-code-reference. It stands out by focusing on keeping Aspire orchestration out of the application projects.

How do I install the aspire-configuration skill?

Run npx -y skills add aaronontheweb/dotnet-skills --skill aspire-configuration -y in your project. The skill then lets the agent wire AppHost resources such as databases and blob storage into explicit config keys.

Who should use the aspire-configuration skill?

It suits .NET developers using Aspire who want production configuration to stay transparent and portable outside Aspire. It also helps when designing feature toggles for dev and test without changing app code paths.

More from aaronontheweb/dotnet-skills

All 34

Similar to Aspire Configuration

More .NET & C#