aspire-configuration

Configure Aspire AppHost resources as explicit environment variables for application configuration.

10|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/AGIBuild/Agibuild.Fulora --skill aspire-configuration-agibuild
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aspire-configuration
Source: https://github.com/AGIBuild/Agibuild.Fulora/tree/main/.cursor/skills/aspire-configuration
Command: npx skills add https://github.com/AGIBuild/Agibuild.Fulora --skill aspire-configuration-agibuild

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of managing configuration in .NET Aspire applications, specifically when you need to ensure that application configuration is explicit, portable, and production-ready without embedding Aspire client packages directly into application code.

Core Features & Use Cases

  • Explicit Configuration Mapping: Translates Aspire resource outputs (like database connection strings or service URLs) into explicit environment variables or configuration keys.
  • Decoupled Application Code: Prevents application projects from depending on Aspire client or service discovery packages, promoting cleaner architecture and easier testing.
  • Production Parity: Ensures that configuration injected by the AppHost can be easily replicated in production environments using standard configuration methods (environment variables, config files).
  • Feature Toggles: Facilitates the management of feature toggles and test overrides through configuration, maintaining consistency across development, testing, and production.
  • Use Case: Wire a PostgreSQL database and a MinIO blob storage service defined in your Aspire AppHost to your API project's IOptions<T> configuration, ensuring the API only consumes these settings as standard configuration values.

Quick Start

Use the aspire-configuration skill to map the 'postgres' database resource to the 'ConnectionStrings__Postgres' configuration key in the 'api' project.

Frequently Asked Questions about aspire-configuration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I pass .NET Aspire AppHost configuration to application code without using Aspire client packages?

You can decouple application code from Aspire clients by configuring the AppHost to emit explicit application configuration via environment variables. This ensures your app projects consume settings as standard configuration values without depending on service discovery packages.

What is the best way to map Aspire resource connection strings to IOptions<T> configuration in my API project?

Mapping Aspire resource connection strings to IOptions<T> is achieved by translating Aspire resource outputs into explicit environment variables or configuration keys. This wires AppHost resources directly to your application's standard configuration structure.

Why do I need to decouple AppHost configuration from application code in .NET Aspire?

Decoupling AppHost configuration from application code promotes cleaner architecture and easier testing. It ensures production configuration remains transparent and portable, allowing settings injected by the AppHost to be replicated in production using standard configuration methods.

Does .NET Aspire support explicit configuration mapping for production environments?

Explicit configuration mapping in .NET Aspire ensures production parity by outputting AppHost settings as environment variables. This allows production environments to replicate the development configuration using standard configuration files or environment variables without requiring Aspire dependencies.

Can I use .NET Aspire service discovery without adding Aspire client packages to my application projects?

You can avoid adding Aspire client packages to application projects by having the AppHost emit explicit environment variables for service URLs and connection strings. This approach keeps service discovery logic isolated within the AppHost while the app consumes standard configuration.

How do I wire a PostgreSQL database defined in Aspire AppHost to my API project using environment variables?

To wire a PostgreSQL database to your API project, map the postgres database resource defined in the AppHost to the ConnectionStrings__Postgres configuration key. This passes the connection string via an environment variable to the API project.