aspire-configuration
Configure Aspire AppHost to emit explicit app config via environment variables; keep app code free of Aspire clients and service discovery.
Install / Use
npx skills add Aaronontheweb/dotnet-skills --skill aspire-configurationInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of aspire-configuration
aspire-configuration scores 89/100 on our quality scale, 1386th of 4,610 Development & Engineering skills we index (top 31%).
Its SKILL.md is 5.0 KB long, well organised into 11 sections with 4 code examples: a solid amount of guidance for an agent.
With 1,183 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 15 days ago, so aspire-configuration is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
aspire-configuration compared with similar skills
All 4 of these similar skills score higher than aspire-configuration; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| aspire-configuration (this skill)by Aaronontheweb | 89 | 1.2k | 15d ago | SKILL.md |
| ai-job-searchby MadsLorentzen | 100 | 44.8k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | 3d ago | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 10d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 10d ago | SKILL.md |
Frequently asked questions
- How do I install aspire-configuration?
- Run
npx skills add Aaronontheweb/dotnet-skills --skill aspire-configuration. The install tabs above show the steps for each supported agent. - Which AI agents does aspire-configuration work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is aspire-configuration safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is aspire-configuration still maintained?
- The repository was last updated 15 days ago, so aspire-configuration is actively maintained.
Skill content
View source on GitHubname: aspire-configuration description: Configure Aspire AppHost to emit explicit app config via environment variables; keep app code free of Aspire clients and service discovery. invocable: false
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
-
AppHost owns Aspire infrastructure packages
- Aspire Hosting packages belong in AppHost only.
- App projects should not reference Aspire client/service-discovery packages.
-
Explicit configuration only
- AppHost must translate resource outputs into explicit config keys (env vars).
- App code binds to
IOptions<T>orConfigurationonly.
-
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
The AppHost is responsible for turning Aspire resources into explicit app settings. The application never consumes Aspire clients or service discovery directly.
AppHost Patterns (Explicit Mapping)
Example: Database + Blob Storage
// AppHost/Program.cs
var builder = DistributedApplication.CreateBuilder(args);
var postgres = builder.AddPostgres("postgres");
var db = postgres.AddDatabase("appdb");
var minio = builder.AddContainer("minio", "minio/minio")
.WithArgs("server", "/data")
.WithHttpEndpoint(targetPort: 9000, name: "http")
.WithHttpEndpoint(targetPort: 9001, name: "console")
.WithEnvironment("MINIO_ROOT_USER", "minioadmin")
.WithEnvironment("MINIO_ROOT_PASSWORD", "minioadmin");
var api = builder.AddProject<Projects.MyApp_Api>("api")
.WithReference(db, "Postgres")
.WithEnvironment("BlobStorage__Enabled", "true")
.WithEnvironment("BlobStorage__ServiceUrl", minio.GetEndpoint("http"))
.WithEnvironment("BlobStorage__AccessKey", "minioadmin")
.WithEnvironment("BlobStorage__SecretKey", "minioadmin")
.WithEnvironment("BlobStorage__Bucket", "attachments")
.WithEnvironment("BlobStorage__ForcePathStyle", "true");
builder.Build().Run();
Key points
WithReference(db, "Postgres")setsConnectionStrings__Postgresexplicitly.- Every external dependency is represented via explicit config keys.
- The API project only reads
Configurationvalues.
App Code Pattern (No Aspire Clients)
Application code binds to options and initializes SDKs directly. It never depends on Aspire client packages or service discovery.
// Api/Program.cs
builder.Services
.AddOptions<BlobStorageOptions>()
.BindConfiguration("BlobStorage")
.ValidateDataAnnotations()
.ValidateOnStart();
builder.Services.AddSingleton<IBlobStorageService>(sp =>
{
var options = sp.GetRequiredService<IOptions<BlobStorageOptions>>().Value;
return new S3BlobStorageService(options); // uses explicit options only
});
Do not add Aspire client packages (or AddServiceDiscovery) to the app.
Those are orchestration concerns and should stay in AppHost.
Feature Toggles and Test Overrides
Keep toggles in config and drive them through AppHost and test fixtures. This maintains parity between dev/test and production configuration.
// AppHost: disable persistence in tests via config overrides
var config = builder.Configuration.GetSection("App")
.Get<AppHostConfiguration>() ?? new AppHostConfiguration();
if (!config.UseVolumes)
{
postgres.WithDataVolume(false);
}
api.WithEnvironment("BlobStorage__Enabled", config.EnableBlobStorage.ToString());
See skills/aspire/integration-testing/SKILL.md for patterns on passing
configuration overrides into DistributedApplicationTestingBuilder.
Do / Don’t Checklist
Do
- Map every Aspire resource output to explicit configuration keys
- Use
IOptions<T>with validation for all infrastructure settings - Keep AppHost as the only place that references Aspire hosting packages
- Ensure any AppHost-injected value can be set in production env vars
Don’t
- Reference Aspire client/service-discovery packages in application projects
- Rely on opaque service discovery that cannot be mirrored in production
- Hide configuration behind Aspire-only abstractions
Related Skills
skills/aspire/service-defaults/SKILL.mdskills/aspire/integration-testing/SKILL.mdskills/akka/aspire-configuration/SKILL.md
Resources
- Aspire AppHost environment configuration: https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/app-host
- Configuration in .NET: https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration
Related Skills
ai-job-search
44.8kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
