Categories
Agent Tooling (71)
- .agents/skills/agent-browser/references/authentication.md
- .agents/skills/agent-browser/references/commands.md
- .agents/skills/agent-browser/references/profiling.md
- .agents/skills/agent-browser/references/proxy-support.md
- .agents/skills/agent-browser/references/session-management.md
- .agents/skills/agent-browser/references/snapshot-refs.md
- .agents/skills/agent-browser/references/video-recording.md
- .agents/skills/agent-browser/SKILL.md
- .agents/skills/aspire-deployment/references/aws.md
- .agents/skills/aspire-deployment/references/azure.md
- .agents/skills/aspire-deployment/references/cicd.md
- .agents/skills/aspire-deployment/references/docker-compose.md
- .agents/skills/aspire-deployment/references/javascript.md
- .agents/skills/aspire-deployment/references/kubernetes.md
- .agents/skills/aspire-deployment/references/preflight.md
- .agents/skills/aspire-deployment/SKILL.md
- .agents/skills/aspire-monitoring/references/diagnostics-bridge.md
- .agents/skills/aspire-monitoring/references/monitoring.md
- .agents/skills/aspire-monitoring/references/playwright-handoff.md
- .agents/skills/aspire-monitoring/SKILL.md
- .agents/skills/aspire-orchestration/references/agent-workflows.md
- .agents/skills/aspire-orchestration/references/app-commands.md
- .agents/skills/aspire-orchestration/references/detection.md
- .agents/skills/aspire-orchestration/references/resource-management.md
- .agents/skills/aspire-orchestration/references/safety-guardrails.md
- .agents/skills/aspire-orchestration/SKILL.md
- .agents/skills/aspire/references/aspire-13-3-breaking-changes.md
- .agents/skills/aspire/SKILL.md
- .agents/skills/aspireify/references/apphost-wiring.md
- .agents/skills/aspireify/references/csharp-authoring.md
- .agents/skills/aspireify/references/docker-compose.md
- .agents/skills/aspireify/references/full-solution-apphosts.md
- .agents/skills/aspireify/references/javascript-apps.md
- .agents/skills/aspireify/references/opentelemetry.md
- .agents/skills/aspireify/references/scan-and-propose.md
- .agents/skills/aspireify/references/service-defaults.md
- .agents/skills/aspireify/references/typescript-authoring.md
- .agents/skills/aspireify/references/validation.md
- .agents/skills/aspireify/SKILL.md
- .agents/skills/caveman-compress/README.md
- .agents/skills/caveman-compress/SECURITY.md
- .agents/skills/caveman-compress/SKILL.md
- .agents/skills/caveman-help/README.md
- .agents/skills/caveman-help/SKILL.md
- .agents/skills/caveman-stats/README.md
- .agents/skills/caveman-stats/SKILL.md
- .agents/skills/caveman/README.md
- .agents/skills/caveman/SKILL.md
- .agents/skills/csharp-developer/SKILL.md
- .agents/skills/dotnet-inspect/SKILL.md
- .agents/skills/efcore-data-layer/SKILL.md
- .agents/skills/git/SKILL.md
- .agents/skills/microsoft-code-reference/SKILL.md
- .agents/skills/microsoft-docs/SKILL.md
- .agents/skills/microsoft-skill-creator/references/skill-templates.md
- .agents/skills/microsoft-skill-creator/SKILL.md
- .agents/skills/skill-creator/references/output-patterns.md
- .agents/skills/skill-creator/references/workflows.md
- .agents/skills/skill-creator/SKILL.md
- .agents/skills/tunit-testing/references/aspire-integration.md
- .agents/skills/tunit-testing/references/aspnetcore-integration.md
- .agents/skills/tunit-testing/references/assertions.md
- .agents/skills/tunit-testing/references/data-driven.md
- .agents/skills/tunit-testing/references/infrastructure-and-troubleshooting.md
- .agents/skills/tunit-testing/references/lifecycle-hooks.md
- .agents/skills/tunit-testing/SKILL.md
- AGENTS.md
- backend/AGENTS.md
- backend/tests/AGENTS.md
- Front/AGENT.md
- opencode.jsonc
Docker Compose migration
Use this reference when the repo has a docker-compose.yml or compose.yml file. Docker Compose files are one of the most valuable discovery sources — they document the infrastructure the app actually needs to run locally.
When to load this reference
- A
docker-compose.yml,compose.yml, ordocker-compose.override.ymlexists anywhere in the repo - The repo has setup scripts that call
docker compose upas part of the dev workflow
Profiles
Docker Compose files can use profiles: to organize services into named groups. Not all services run at once — the developer chooses which profiles to activate.
Example from a real repo:
services:
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
profiles: [cloud, mssql]
postgres:
image: postgres:14
profiles: [postgres, ef]
redis:
image: redis:alpine
profiles: [redis, cloud]
storage:
image: mcr.microsoft.com/azure-storage/azurite:latest
profiles: [storage, cloud]
mail:
image: sj26/mailcatcher:latest
profiles: [mail]When profiles are present:
- List them clearly — show the user which profiles exist and what services each activates
- Ask which to target — "Your docker-compose has profiles: cloud, mssql, postgres, storage, redis, mail. Which ones represent your typical local dev stack?"
- Model only selected profiles — services in unselected profiles are skipped entirely
- Services without profiles always run — if a service has no
profiles:key, include it regardless of profile selection - Profile-specific infrastructure implies choices —
mssqlvspostgresprofiles often mean the repo supports multiple database backends. Ask which one to model in the AppHost.
Image-to-integration mapping
Prefer typed Aspire integrations over raw AddContainer(). Use aspire docs search <technology> to check for available integrations.
Common mappings:
| Compose image | Aspire integration | Method |
|---|---|---|
postgres:* | Aspire.Hosting.PostgreSQL | AddPostgres() |
mcr.microsoft.com/mssql/server:* | Aspire.Hosting.SqlServer | AddSqlServer() |
mysql: / mariadb: | Aspire.Hosting.MySql | AddMySql() |
redis:* | Aspire.Hosting.Redis | AddRedis() |
rabbitmq:* | Aspire.Hosting.RabbitMQ | AddRabbitMQ() |
mongo:* | Aspire.Hosting.MongoDB | AddMongoDB() |
mcr.microsoft.com/azure-storage/azurite:* | Aspire.Hosting.Azure.Storage | AddAzureStorage().RunAsEmulator() |
kafka, confluentinc/cp-kafka:* | Aspire.Hosting.Kafka | AddKafka() |
nats:* | Aspire.Hosting.Nats | AddNats() |
mcr.microsoft.com/azure-messaging/servicebus-emulator:* | Aspire.Hosting.Azure.ServiceBus | AddAzureServiceBus().RunAsEmulator() |
For images not in this list, use aspire docs search to check, then fall back to AddContainer().
Environment variable interpolation
Compose files use ${VAR} syntax to reference variables from .env files:
environment:
MSSQL_SA_PASSWORD: ${MSSQL_PASSWORD}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}⚠️ CRITICAL: Do not model passwords for typed Aspire integrations.
AddPostgres(), AddSqlServer(), AddRedis(), AddMySql(), AddRabbitMQ(), and other typed integrations auto-generate secure passwords. The compose file needed POSTGRES_PASSWORD because Compose doesn't manage credentials — Aspire does. If you see a compose password variable that maps to a typed integration, skip it entirely. Do not create an AddParameter for it.
// ❌ WRONG — don't model passwords that Aspire auto-generates
var pgPassword = builder.AddParameter("postgres-password", secret: true);
var postgres = builder.AddPostgres("postgres", password: pgPassword);
// ✅ RIGHT — let Aspire handle the password
var postgres = builder.AddPostgres("postgres");Use aspire docs get <integration-slug> to check what each typed integration manages automatically. Look for the "Connection properties" section — if it lists Password, the integration handles it.
When you see a ${VAR} pattern in compose:
- Check if it maps to a typed integration — if
POSTGRES_PASSWORD,MSSQL_SA_PASSWORD,MYSQL_ROOT_PASSWORD,RABBITMQ_DEFAULT_PASS, etc. are used by a typed Aspire integration, skip them — Aspire manages these - Trace non-integration variables — find them in the
.envor.env.examplefile - Classify — is it a secret (API key, token) or plain config?
- Model it — secrets become
AddParameter(name, secret: true), plain config becomesAddParameter(name)with a default orWithEnvironment()directly
Volume mapping
| Compose volume type | Aspire equivalent | Notes |
|---|---|---|
Named volume (mssql_data:/var/opt/mssql) | WithDataVolume() | Preferred — Aspire manages lifecycle |
| Named volume (custom name) | WithDataVolume(name: "custom") | Preserves the name for familiarity |
Bind mount (./data:/app/data) | WithBindMount("./data", "/app/data") | Use for config files, scripts, or shared data |
Bind mount for config (./config.json:/etc/config.json) | WithBindMount(...) | Preserve for config injection |
Tip: If the compose file mounts migration scripts or SQL files into a database container, those are likely init scripts. See "Init and setup scripts" below.
Dependency ordering
Compose depends_on maps to Aspire's WaitFor():
# Compose
services:
api:
depends_on:
- mssql
- redis// Aspire
var api = builder.AddProject<Projects.Api>("api")
.WithReference(mssql)
.WithReference(redis)
.WaitFor(mssql)
.WaitFor(redis);WithReference() establishes the connection. WaitFor() ensures the dependency is healthy before the consuming service starts. Use both together.
For depends_on with condition: service_healthy, the WaitFor() mapping is especially important — it replicates the same behavior.
Build contexts
Compose services with build: are built from source, not pulled as images:
services:
worker:
build:
context: ./worker
dockerfile: DockerfileMap these to AddDockerfile():
var worker = builder.AddDockerfile("worker", "../worker")
.WithHttpEndpoint(targetPort: 8080);However, prefer native Aspire project hosting over Dockerfiles when possible. If the build context contains a .csproj, use AddProject<T>(). If it's a Node.js app, use AddNodeApp() or AddViteApp(). Dockerfiles are a last resort for Aspire modeling — they lose service discovery, health checks, and hot reload.
Init and setup scripts
Repos often have setup scripts alongside their compose files:
setup_azurite.ps1— initializes storage emulator containers and queuesmigrate.ps1/ef_migrate.ps1— runs database migrationssetup_secrets.ps1— configures .NET user secretscreate_certificates_*.sh— generates dev certificates
Present the user with options for how to handle these:
- Model as a lifecycle command on the relevant resource — for example, a database migration script can be a startup command on the database resource. This runs automatically when the resource starts.
→ "Your repo has a migrate.ps1 that runs SQL migrations against the database. I can model this as a startup lifecycle hook on the database resource so migrations run automatically when you aspire start. Want that?"
- Model as a standalone executable resource — for scripts that don't map cleanly to a single resource, use
AddExecutable()withWaitForCompletion()so dependent services wait for the script to finish.
- Leave as manual — some setup scripts are one-time-only (like certificate generation) and don't need to run every time. Note them in the AppHost as a comment and move on.
The right choice depends on the script. Present the tradeoff and let the user decide.
Putting it together
A compose file like:
services:
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
MSSQL_SA_PASSWORD: ${MSSQL_PASSWORD}
volumes:
- mssql_data:/var/opt/mssql
ports:
- "1433:1433"
redis:
image: redis:alpine
volumes:
- redis_data:/data
ports:
- "6379:6379"Becomes:
// ✅ Let Aspire auto-generate the SA password — don't model MSSQL_PASSWORD
var mssql = builder.AddSqlServer("mssql")
.WithDataVolume();
var redis = builder.AddRedis("redis")
.WithDataVolume();Note: for typed integrations like AddSqlServer() and AddRedis(), you don't need to map ports or passwords — Aspire handles both. You also don't need to model redis_data as a named volume — WithDataVolume() handles persistence. The ${MSSQL_PASSWORD} from the compose file is skipped entirely because AddSqlServer() auto-generates a secure SA password.
Common pitfalls
- Don't model every compose service — some are dev-only tools (mailcatcher, reverse proxies, SAML IdPs for testing). Ask the user which are essential vs nice-to-have.
- Don't preserve hardcoded ports from compose — Aspire manages ports dynamically. Only preserve a port if the user confirms it's required for external reasons (OAuth callbacks, etc.).
- Don't duplicate compose's
.envinterpolation — Aspire parameters replace this pattern. Trace each${VAR}to its source and model it properly. - Watch for services that conflict on the same port — compose profiles often have services sharing ports (e.g.,
mssqlandpostgresboth on different profiles). If the user selects conflicting profiles, surface the conflict.