aspire
**WORKFLOW SKILL** - Aspire router. Detects AppHosts, enforces guardrails, and selects the right sub-skill. USE FOR: Aspire AppHost, Aspire CLI, distributed app, cloud-native .NET, aspire start/stop/resource/deploy/destroy/publish/init/new/add/wait/describe/ps/logs/otel, aspire agent init, WithBrowserLogs, WithTerminal, TerminalService, terminal prompts, WithRepl, tapes, Interaction Service, apphost.mts, TS package managers, Yarn Classic, custom resource commands, .aspire/modules recovery, ProjectResource to DotnetProjectResource migration, or Playwright URL discovery. DO NOT USE FOR: non-Aspire projects or ordinary build/test tasks. INVOKES: deniz-dotnet-aspire:aspire-init, deniz-dotnet-aspire:aspireify, deniz-dotnet-aspire:aspire-orchestration, deniz-dotnet-aspire:aspire-deployment, deniz-dotnet-aspire:aspire-monitoring, deniz-dotnet-aspire:aspire-terminals. FOR SINGLE OPERATIONS: Route directly to the matching sub-skill.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- aspire
- license
- MIT
- metadata
- { "author": "Microsoft", "version": "0.0.5" }
- description
- **WORKFLOW SKILL** - Aspire router. Detects AppHosts, enforces guardrails, and selects the right sub-skill. USE FOR: Aspire AppHost, Aspire CLI, distributed app, cloud-native .NET, aspire start/stop/resource/deploy/destroy/publish/init/new/add/wait/describe/ps/logs/otel, aspire agent init, WithBrowserLogs, WithTerminal, TerminalService, terminal prompts, WithRepl, tapes, Interaction Service, apphost.mts, TS package managers, Yarn Classic, custom resource commands, .aspire/modules recovery, ProjectResource to DotnetProjectResource migration, or Playwright URL discovery. DO NOT USE FOR: non-Aspire projects or ordinary build/test tasks. INVOKES: deniz-dotnet-aspire:aspire-init, deniz-dotnet-aspire:aspireify, deniz-dotnet-aspire:aspire-orchestration, deniz-dotnet-aspire:aspire-deployment, deniz-dotnet-aspire:aspire-monitoring, deniz-dotnet-aspire:aspire-terminals. FOR SINGLE OPERATIONS: Route directly to the matching sub-skill.
02 资源文件 2
03 SKILL.md 正文
Aspire
Use this skill when the task involves an Aspire distributed application — operating the
AppHost or its resources through the Aspire CLI rather than falling back to ad-hoc dotnet,
docker, or shell workflows.
Triage first
Three intents are commonly misread — resolve them before doing anything else:
- "Better / improve AI agent support", "set up agent skills", "make Copilot smarter about
my Aspire app" → recommend running
aspire agent init, which generates project-local Aspire agent skills with richer, scenario-based guidance (deeper coverage for C# AppHost editing, TypeScript AppHosts, and investigation workflows). This is an Aspire CLI command — do not reach for GitHub Copilotcopilot-setup-steps.ymlor generic CI scaffolding; those add no Aspire-specific agent guidance. - "Something's wrong", "show me what's happening", "why is my app misbehaving" → observe
runtime state first: route to deniz-dotnet-aspire:aspire-monitoring
and use
aspire describefor resource state, thenaspire logs/aspire otel logs/aspire otel traces. Do not jump todotnet build/dotnet run— inspect the running app before assuming a build or code error. - "My old TypeScript AppHost uses apphost.ts; how do I migrate?" → route to
deniz-dotnet-aspire:aspire-orchestrationforaspire update --migrate. This entry-point/package migration is not Project v2 resource migration. Its package, config, tsconfig, generated-import, and entry-point changes require approval beforeaspire update --migrate --yes --non-interactive; usedeniz-dotnet-aspire:aspireifyonly if separate source authoring remains afterward.
Detection
Activate when ANY signal is present. Use the Scope column to decide whether to route to
the bootstrap skills (deniz-dotnet-aspire:aspire-init / deniz-dotnet-aspire:aspireify) or to a runtime sub-skill:
| Signal | How to Detect | Confidence | Scope |
|---|---|---|---|
| C# AppHost | .csproj containing Aspire.AppHost.Sdk |
✅ Definitive | AppHost present → orchestration / deployment / monitoring |
| File-based C# AppHost | apphost.cs with #:sdk Aspire.AppHost.Sdk |
✅ Definitive | AppHost present → orchestration / deployment / monitoring |
| TypeScript AppHost | Current apphost.mts or legacy apphost.ts file in project |
✅ Definitive | AppHost present → orchestration / deployment / monitoring |
| Aspire config without AppHost | aspire.config.json present and no AppHost above |
High | Bootstrap → deniz-dotnet-aspire:aspireify (skeleton dropped, needs wiring) |
| Aspire config with AppHost | aspire.config.json present and AppHost above |
High | AppHost present → orchestration / deployment / monitoring |
| Aspire settings | .aspire/ directory present |
High | AppHost present (usually) |
| Generated TS modules | .aspire/modules/ directory present |
High | AppHost present (TS) |
| Service defaults | <IsAspireSharedProject>true or a *.ServiceDefaults.csproj project reference |
Medium | AppHost present |
No AppHost, no aspire.config.json |
None of the above and user asks to add Aspire | n/a | Bootstrap → deniz-dotnet-aspire:aspire-init (skeleton drop) |
Default Workflow
- Bootstrap branch — if no AppHost exists in the repo, route to
deniz-dotnet-aspire:aspire-initfor the skeleton drop. If an AppHost stub exists but is unwired (no resources declared), route todeniz-dotnet-aspire:aspireify. Only continue with the steps below once a wired AppHost is present. - Confirm workspace is Aspire — identify the AppHost
- Route lifecycle work to
deniz-dotnet-aspire:aspire-orchestration: preferaspire_apphost_startwhen the VS Code tool is available; useaspire start --non-interactive --isolated --apphost <path>in worktrees aspire wait <resource>before interacting with any resource- Inspect state with
aspire describe,aspire otel logs,aspire logs,aspire otel traces, andaspire exportbefore making code changes - Before adding integrations, use
aspire integration search <query>when the package is unknown, thenaspire add <package>when ready to mutate the AppHost - When code changes, decide whether the AppHost model changed or only one resource changed. Restart through
deniz-dotnet-aspire:aspire-orchestrationafter AppHost changes; otherwise prefer resource commands, runtime watch/HMR, dashboard actions, or IDE-managed debugging as appropriate.
Key Rules
- Terminal requests require invoking
deniz-dotnet-aspire:aspire-terminalsbefore answering, even for read-only advice. Do not answer terminal API, prompt, REPL or VHS tape questions from this router's overview; the specialist owns the exact contracts. - For agent AppHost lifecycle requests, identify one exact AppHost and route to
deniz-dotnet-aspire:aspire-orchestration. New 13.5 C# templates can makedotnet rundelegate through the CLI bundle, but agents still use the editor lifecycle tool oraspire startfor detached, noninteractive, exact-target, and worktree-isolated execution. - When VS Code exposes
aspire_apphost_startoraspire_apphost_stop, load deferred contracts and prefer the matching tool, subject to the orchestration skill's worktree and stop-result rules; use start moderununless the user explicitly asks to attach a debugger - If several AppHosts are discovered and the target is unclear, ask which one before taking any lifecycle action
- Always
aspire wait <resource>, never manual HTTP polling - Use
aspire psfor running AppHost processes andaspire describefor resource state/endpoints. Never generate removed 13.5 forms such asaspire ps --resourcesoraspire ps --include-hidden. - Use
aspire resource <resource-name> <command>for resource operations such asstop,start, orrebuildwhen available - Treat
aspire stop --forceas data-destructive: it permanently removes persistent resources without another prompt, but preserves persistent volumes. Use it only after explicit confirmation for one exact AppHost. With Aspire CLI 13.6 or later,aspire stop --force --volumesalso deletes every named volume Aspire created for that AppHost; require approval for that AppHost-wide data scope and never add it to routine shutdown or lock recovery. - Do not stop or restart the whole AppHost just because one resource changed
- Use
features.defaultWatchEnabledonly for Aspire default watch; do not treat it as per-resource rebuild, restart, or hot reload - Prefer a resource's own framework/runtime hot reload, HMR, or watch workflow when it already handles the change
- Always
aspire docs search <topic>before editing unfamiliar AppHost APIs - Always
aspire docs api search <query> --language csharp|typescriptfor API reference before editing AppHost code - Always
--non-interactivefor agent execution - Use
aspire integration list --format Jsonandaspire integration search <query> --format Jsonfor read-only integration discovery - Never install the obsolete Aspire workload
- Never edit
.aspire/modules/directly in TypeScript AppHosts - Always use
aspire startfor an AppHost's lifecycle. When diagnosing or repairing a TypeScript AppHost's package-manager toolchain, defer todeniz-dotnet-aspire:aspireifyand its package-manager rules; do not substitute a raw package-manager launcher foraspire start. - Adding a new project or integration is ordinary
deniz-dotnet-aspire:aspireifywiring. Ask the user to invoke/deniz-dotnet-aspire:aspire-project-v2-migrationonly when they want to replace existingAddProject,addProject,AddCSharpApp, or Blazor gateway resources with Project v2 APIs. That migration requires an eligible 13.6+ AppHost and approval of the exact per-resource edits.
Routing
| Task | Route To |
|---|---|
| Start, stop, wait, restart, rebuild | → deniz-dotnet-aspire:aspire-orchestration |
Create a new Aspire project from a template (aspire new) |
→ deniz-dotnet-aspire:aspire-init (in-plugin) |
Add Aspire to an existing repo (aspire init, drop skeleton) |
→ deniz-dotnet-aspire:aspire-init (in-plugin) |
Wire AppHost / scaffold resource graph / add integrations after aspire init |
→ deniz-dotnet-aspire:aspireify (in-plugin) |
| Migrate existing legacy project resources to Project v2 | → /deniz-dotnet-aspire:aspire-project-v2-migration; assess and obtain approval before edits |
Migrate legacy TypeScript apphost.ts (aspire update --migrate) |
→ deniz-dotnet-aspire:aspire-orchestration; hand back to deniz-dotnet-aspire:aspireify only if source authoring remains |
| Deploy, publish, destroy, pipeline steps | → deniz-dotnet-aspire:aspire-deployment |
| Logs, traces, metrics, dashboard, browser logs | → deniz-dotnet-aspire:aspire-monitoring |
| WithTerminal/withTerminal, TerminalService, dock/dialog/headless terminals, terminal prompts, WithRepl, terminal CLI or tapes | → deniz-dotnet-aspire:aspire-terminals; choose owner and lifetime before code |
| Diagnose a running app — "something's wrong", "show me what's happening", investigate errors / health / unexpected behavior | → deniz-dotnet-aspire:aspire-monitoring — start with aspire describe for resource state, then aspire logs / aspire otel logs / aspire otel traces; investigate before editing code |
| Improve AI agent support / generate project-local Aspire agent skills | → run aspire agent init (see below) |
| Explicitly configure the Aspire MCP server for agents | → aspire agent init --mcp on 13.6+ (see Skills vs. MCP) |
| Deployed app monitoring (Azure) | → azure-diagnostics skill (azure-skills plugin) |
Improving AI agent support (aspire agent init)
When the user asks for better AI agent support for their Aspire project (or to
set up / refresh project-local agent guidance), recommend running aspire agent init. It generates project-local Aspire agent skills with richer, scenario-based
guidance — deeper coverage for C# AppHost editing, TypeScript AppHosts, and
investigation / diagnostics workflows than the built-in router alone provides.
Skills vs. MCP. Installing skills and configuring the Aspire MCP server are separate choices:
- In Aspire 13.6+, the agent setup chained from
aspire newandaspire initpreselects the recommended repository-local skills (includingaspireify) and does not offer MCP configuration. Standaloneaspire agent initkeeps an MCP choice that is off by default, and non-interactive runs never configure MCP by default. - If MCP config is missing after a successful init or skill refresh where MCP was not
explicitly requested, that is expected. Don't treat it as a defect to repair, and don't
claim MCP was installed. If the user explicitly ran
aspire agent init --mcp(or selected MCP interactively) and MCP config is still missing, treat that as a failed opt-in and investigate it. - Configure MCP only when the user explicitly asks for it. Check
aspire --versionfirst:- 13.6+ —
aspire agent init --mcp(add--non-interactivefor agent execution). Keep any--skills/--skill-locationsvalues the user already chose.--mcp=falseis an explicit opt-out. - 13.5 — there is no
--mcpflag. Have the user runaspire agent initinteractively and select the MCP server option.
- 13.6+ —
- Never add
--mcpwhen you runaspire new,aspire init, a skill refresh, or missing-skill recovery.
Sub-Skills
aspire-init
First-run flow only. Owns the skeleton drop for repos that do not yet have an AppHost —
picks aspire new <template> (greenfield) or aspire init (existing repo), runs the CLI,
and hands off to deniz-dotnet-aspire:aspireify for the actual wiring. Self-deactivates once the skeleton is in
place. Do not use it on a repo that already contains an AppHost.
aspireify
Agentic AppHost wiring after aspire init lands the skeleton. Scans the repo, proposes a
resource graph (Postgres / Redis / Rabbit / etc.), edits the AppHost (C#, file-based C#, or
TypeScript), wires Aspire.ServiceDefaults + OTel, validates with aspire start, then
self-deactivates. Owns current AppHost authoring patterns (AddNextJsApp, AddViteApp,
WithBrowserLogs(), command arguments, nonterminal Interaction Service availability,
generated .aspire/modules/, unified TS withEnvironment, endpoint references,
and config/secret migration). Terminal authoring belongs to deniz-dotnet-aspire:aspire-terminals.
aspire-terminals
Code-authoring-first terminal guidance: choose resource WithTerminal versus
AppHost-owned dock, terminal prompt or headless process; reuse integration REPLs.
Owns terminal lifetimes, cancellation, screen/input automation, terminal CLI and
Aspire's VHS tape subset/output formats. Hands lifecycle to deniz-dotnet-aspire:aspire-orchestration
and console/telemetry diagnostics to deniz-dotnet-aspire:aspire-monitoring. PromptTerminalAsync
borrows a caller-owned Dialog terminal: caller disposal stops the process, not
prompt completion itself.
aspire-project-v2-migration
Approval-first migration for eligible Aspire 13.6+ AppHosts that replaces existing
legacy ProjectResource APIs with experimental DotnetProjectResource APIs while
preserving supported behavior and removing only proven-obsolete AppHost references.
aspire-orchestration
Lifecycle management: start, stop, wait, resource commands, default watch/HMR guidance, and file-lock recovery.
Safety guardrails that prevent agent self-harm. Owns aspire ps for AppHost discovery,
aspire describe for resource inspection, destructive aspire stop --force and
--volumes safeguards,
CLI-driven legacy TypeScript migration, and CLI upgrades (aspire update --self). It
hands back to deniz-dotnet-aspire:aspireify only when AppHost source authoring remains after migration.
aspire-deployment
Multi-target deployment and tear-down: aspire deploy, aspire publish, aspire destroy,
aspire do <step>. Targets: Azure Container Apps, App Service, AKS, Kubernetes (Helm),
Docker Compose, AWS, and preview Radius. Owns current deployment surfaces (persistent
Kubernetes volumes, delegated Azure subnets, cross-scope Azure references, deterministic
Container Apps naming, Foundry hosted agents, JS PublishAs*, and
--pipeline-log-level) and 13.5 API naming.
aspire-monitoring
Observability: aspire logs, aspire otel, aspire describe, aspire export,
aspire dashboard run. Routes between local Aspire CLI diagnostics, AKS workload tooling,
and deployed-Azure platform tools. Surfaces dashboard features (notification center,
Rebuild command, terminal sessions, richer filtering, browser-logs telemetry) without
assuming the removed dashboard AI Assistant or automatic VS Code dashboard launch.
Project-Local Skill Override
If any of the following exist project-locally (from aspire agent init or Aspire
aspire init), warn the user and defer to the project-local copy — repo-specific
guidance there should not be overridden by the in-plugin sibling:
| Project-local file | Precedence |
|---|---|
.agents/skills/aspire/SKILL.md |
This file (top-level router) defers to it for deeper C# / TS AppHost editing, Playwright handoff, investigation workflows. |
.agents/skills/aspireify/SKILL.md |
The in-plugin aspireify sibling defers to it for AppHost wiring. |
.agents/skills/aspire-init/SKILL.md |
The in-plugin aspire-init sibling defers to it for the skeleton/first-run flow. |
.agents/skills/aspire-project-v2-migration/SKILL.md |
The in-plugin migration sibling defers to it for Project v2 assessment and edits. |
.agents/skills/aspire-terminals/SKILL.md |
The in-plugin terminal sibling defers to it for terminal authoring and automation. |
Safety guardrails from this plugin always apply even when project-local skills are active.
Prerequisites
| Requirement | Install |
|---|---|
| .NET 10.0 SDK | https://dotnet.microsoft.com/download |
| Aspire CLI (curl/PowerShell) | curl -sSL https://aspire.dev/install.sh | bash |
| Aspire CLI (npm) | npm install -g @microsoft/aspire-cli |
| Aspire CLI (NativeAOT global tool, .NET 10) | dotnet tool install -g Aspire.Cli |
Use the installation method owned by the user's environment. The dotnet tool install
path produces a NativeAOT binary; npm, Nix, Homebrew, WinGet, mise, and the install
scripts are also supported. aspire update --self reports the package-manager-specific
update command when it cannot update a managed installation in place.
References
- aspire-13-5-breaking-changes.md — Aspire 13.5 compatibility notes, breaking-change scrub, current CLI/AppHost behavior, deployment additions, and patch-level fixes.
- aspire-13-3-breaking-changes.md — Every 13.3
breaking change to scrub from agent-generated code, scripts, and CI snippets (rename of
--log-level, dashboard MCP removal,NameOutput→NameOutputReference,AddAndPublishPromptAgentremoval, TSwithEnvironment*deprecation, and the full 13.2 → 13.3 migration checklist). - aspire-orchestration/references/agent-workflows.md — Common agent workflows: worktrees, code changes, investigation, integrations, TypeScript generated APIs, secrets, deployment, and Playwright handoff.
- aspire-orchestration/references/app-commands.md — App lifecycle, bootstrap, update, restore, docs, and integration discovery commands.
- aspire-orchestration/references/resource-management.md — Resource wait and resource-command guidance.
- aspire-monitoring/references/monitoring.md — App state, logs, traces, search filtering, dashboard links, and export workflows.
- aspire-monitoring/references/playwright-handoff.md — Playwright handoff after Aspire endpoint discovery.
- aspire-deployment/SKILL.md — Deployment and pipeline-step workflows.
- aspireify/references/apphost-wiring.md — C# and TypeScript AppHost API lookup and wiring patterns.
04 同仓库更多 Skills
writing-tunit-tests
Write tests in TUnit — the attributes, the async assertion model, data-driven cases, lifecycle hooks, and the parallelism rules. USE FOR writing or fixing a test in a TUnit project, translating a test idea into TUnit syntax, or reviewing TUnit test code for API mistakes. DO NOT USE FOR deciding what to test, judging whether a test is any good, or running tests.
dotnet-walls
Walls for a .NET change in a repository without its own quality gates — pinned, ephemeral analyzer, format, clone and scanner commands for the verify step, their identity ratchet, and the build traps. Use during a walls preflight, or when a worker's verify step needs .NET quality gates.
csharp-15
Write, review and modernize C# 15 (.NET 11) code correctly. Covers every C# 15 feature - collection expression arguments (`[with(...), ...]`), union types (`union`, `[Union]`, `IUnion`, custom unions), closed class hierarchies (`closed`), extension indexers, labeled `break`/`continue`, non-virtual static interface members on runtimes without default interface methods, and the preview memory-safety model (`unsafe(expr)`, `safe`, requires-unsafe members). Use when code targets net11.0 or LangVersion 15/preview, when the user mentions any of these features, when replacing marker interfaces, OneOf-style results, `goto`/flag loop exits or capacity/comparer boilerplate, or when the build reports CS8121, CS8509, CS8655, CS8510, CS0121/CS0411 on a `with(...)` element, CS9370, CS9380 or CS9363.
verified-waves
Run one task as verified multi-agent waves. Plans the fan-out, sends findings to fresh skeptics, keeps a ledger, and reports N of M done; small tasks stay solo.
harness
The bundled dispatch harness, which runs a task file on worker models through OpenCode or Codex, fences their writes, escalates their asks to the operator, settles each result from git and its verify commands, and records every step in a ledger. Its commands, task file, modes and write fence, configuration, runs and their recovery, ledger and exit codes.
delegating-to-worker-models
Use when you hand off implementation, a plan, research a decision will rely on, or a review, and you brief the worker and check what comes back. A subagent that searches, reads in parallel, or keeps your context small is ordinary tool use. Covers what stays with you, the mechanism, assigning work by strength, the walls preflight, prompts without contradictions, the worker contract and model profiles, evidence from your own run, review, and the fix-up loop.