aspire
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAspire
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 ,
, or shell workflows.
dotnetdocker当任务涉及Aspire分布式应用时使用此技能——通过Aspire CLI操作AppHost或其资源,而非使用临时的、或Shell工作流。
dotnetdockerTriage first
先进行分类排查
Two 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 , 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 Copilot
aspire agent initor generic CI scaffolding; those add no Aspire-specific agent guidance.copilot-setup-steps.yml - "Something's wrong", "show me what's happening", "why is my app misbehaving" → observe
runtime state first: route to aspire-monitoring
and use for resource state, then
aspire describe/aspire logs/aspire otel logs. Do not jump toaspire otel traces/dotnet build— inspect the running app before assuming a build or code error.dotnet run
有两种意图常被误判——在执行其他操作前需先解决:
- “优化/改进AI Agent支持”、“设置Agent技能”、“让Copilot更了解我的Aspire应用” → 建议运行**,该命令会生成项目本地的Aspire Agent技能,提供更丰富的场景化指导(针对C# AppHost编辑、TypeScript AppHost以及排查工作流的覆盖更深入)。这是一个Aspire CLI**命令——请勿使用GitHub Copilot的
aspire agent init或通用CI脚手架;这些工具无法提供Aspire专属的Agent指导。copilot-setup-steps.yml - “出问题了”、“看看发生了什么”、“我的应用为什么运行异常” → 先查看运行时状态:路由至aspire-monitoring,使用查看资源状态,再使用
aspire describe/aspire logs/aspire otel logs。请勿直接执行aspire otel traces/dotnet build——在假设是构建或代码错误前,先检查运行中的应用。dotnet run
Detection
触发条件
Activate when ANY signal is present. Use the Scope column to decide whether to route to
the bootstrap skills ( / ) or to a runtime sub-skill:
aspire-initaspireify| Signal | How to Detect | Confidence | Scope |
|---|---|---|---|
| C# AppHost | | ✅ Definitive | AppHost present → orchestration / deployment / monitoring |
| File-based C# AppHost | | ✅ Definitive | AppHost present → orchestration / deployment / monitoring |
| TypeScript AppHost | | ✅ Definitive | AppHost present → orchestration / deployment / monitoring |
| Aspire config without AppHost | | High | Bootstrap → |
| Aspire config with AppHost | | High | AppHost present → orchestration / deployment / monitoring |
| Aspire settings | | High | AppHost present (usually) |
| Generated TS modules | | High | AppHost present (TS) |
| Service defaults | | Medium | AppHost present |
No AppHost, no | None of the above and user asks to add Aspire | n/a | Bootstrap → |
只要存在任一信号即可激活。使用**Scope(范围)**列决定路由至引导技能( / )还是运行时子技能:
aspire-initaspireify| 信号 | 检测方式 | 置信度 | 范围 |
|---|---|---|---|
| C# AppHost | 包含 | ✅ 确定 | 存在AppHost → 编排/部署/监控 |
| 基于文件的C# AppHost | 包含 | ✅ 确定 | 存在AppHost → 编排/部署/监控 |
| TypeScript AppHost | 项目中的 | ✅ 确定 | 存在AppHost → 编排/部署/监控 |
| 无AppHost的Aspire配置 | 存在 | 高 | 引导 → |
| 带AppHost的Aspire配置 | 存在 | 高 | 存在AppHost → 编排/部署/监控 |
| Aspire设置 | 存在 | 高 | 通常存在AppHost |
| 生成的TS模块 | 存在 | 高 | 存在AppHost(TS版) |
| 服务默认配置 | 项目引用中包含 | 中等 | 存在AppHost |
无AppHost,无 | 不满足上述所有条件且用户要求添加Aspire | 不适用 | 引导 → |
Default Workflow
默认工作流
- Bootstrap branch — if no AppHost exists in the repo, route to
for the skeleton drop. If an AppHost stub exists but is unwired (no resources declared), route to
aspire-init. Only continue with the steps below once a wired AppHost is present.aspireify - Confirm workspace is Aspire — identify the AppHost
- (or
aspire startin worktrees or whenever shared local state is risky)aspire start --isolated - before interacting with any resource
aspire wait <resource> - Inspect state with ,
aspire describe,aspire otel logs,aspire logs, andaspire otel tracesbefore making code changesaspire export - Before adding integrations, use when the package is unknown, then
aspire integration search <query>when ready to mutate the AppHostaspire add <package> - When code changes, decide whether the AppHost model changed or only one resource changed. Re-run after AppHost changes; otherwise prefer resource commands, runtime watch/HMR, dashboard actions, or IDE-managed debugging as appropriate.
aspire start
- 引导分支 — 如果仓库中无AppHost,路由至生成骨架。如果存在AppHost stub但未配置(未声明资源),路由至
aspire-init。仅当配置好的AppHost存在时,才继续执行以下步骤。aspireify - 确认工作区为Aspire环境——识别AppHost
- 执行(在工作树或共享本地状态存在风险时,使用
aspire start)aspire start --isolated - 在与任何资源交互前执行
aspire wait <resource> - 在修改代码前,使用、
aspire describe、aspire otel logs、aspire logs和aspire otel traces检查状态aspire export - 添加集成前,若不了解包信息,使用;准备修改AppHost时,使用
aspire integration search <query>aspire add <package> - 代码变更后,判断是AppHost模型变更还是仅单个资源变更。AppHost变更后需重新执行;否则优先使用资源命令、运行时热重载/HMR、仪表盘操作或IDE管理的调试功能。
aspire start
Key Rules
核心规则
- Always , never
aspire starton AppHostsdotnet run - Always , never manual HTTP polling
aspire wait <resource> - Use for resource operations such as
aspire resource <resource-name> <command>,stop, orstartwhen availablerebuild - Do not stop or restart the whole AppHost just because one resource changed
- Use only for Aspire default watch; do not treat it as per-resource rebuild, restart, or hot reload
features.defaultWatchEnabled - Prefer a resource's own framework/runtime hot reload, HMR, or watch workflow when it already handles the change
- Always before editing unfamiliar AppHost APIs
aspire docs search <topic> - Always for API reference before editing AppHost code
aspire docs api search <query> --language csharp|typescript - Always for agent execution
--non-interactive - Use and
aspire integration list --format Jsonfor read-only integration discoveryaspire integration search <query> --format Json - Never install the obsolete Aspire workload
- Never edit directly in TypeScript AppHosts
.aspire/modules/
- 始终执行,绝不在AppHost上执行
aspire startdotnet run - 始终执行,绝不手动进行HTTP轮询
aspire wait <resource> - 若可用,使用执行资源操作,如
aspire resource <resource-name> <command>、stop或startrebuild - 不要仅因单个资源变更就停止或重启整个AppHost
- 仅将用于Aspire默认监听;不要将其视为针对单个资源的重建、重启或热重载
features.defaultWatchEnabled - 若资源自身框架/运行时已支持热重载、HMR或监听工作流,优先使用该资源自带的功能
- 在编辑不熟悉的AppHost API前,始终执行
aspire docs search <topic> - 在编辑AppHost代码前,始终执行查看API参考
aspire docs api search <query> --language csharp|typescript - Agent执行时始终使用参数
--non-interactive - 使用和
aspire integration list --format Json进行只读集成发现aspire integration search <query> --format Json - 绝不安装已废弃的Aspire工作负载
- 在TypeScript AppHost中绝不直接编辑
.aspire/modules/
Routing
路由规则
| Task | Route To |
|---|---|
| Start, stop, wait, restart, rebuild | → aspire-orchestration |
Create a new Aspire project from a template ( | → aspire-init (in-plugin) |
Add Aspire to an existing repo ( | → aspire-init (in-plugin) |
Wire AppHost / scaffold resource graph / add integrations after | → aspireify (in-plugin) |
| Deploy, publish, destroy, pipeline steps | → aspire-deployment |
| Logs, traces, metrics, dashboard, browser logs | → aspire-monitoring |
| Diagnose a running app — "something's wrong", "show me what's happening", investigate errors / health / unexpected behavior | → aspire-monitoring — start with |
| Improve AI agent support / generate project-local Aspire agent skills | → run |
| Deployed app monitoring (Azure) | → |
| 任务 | 路由至 |
|---|---|
| 启动、停止、等待、重启、重建 | → aspire-orchestration |
从模板创建新Aspire项目( | → aspire-init(插件内) |
向现有仓库添加Aspire( | → aspire-init(插件内) |
在 | → aspireify(插件内) |
| 部署、发布、销毁、流水线步骤 | → aspire-deployment |
| 日志、追踪、指标、仪表盘、浏览器日志 | → aspire-monitoring |
| 诊断运行中的应用——“出问题了”、“看看发生了什么”、排查错误/健康状态/异常行为 | → aspire-monitoring — 先使用 |
| 优化AI Agent支持/生成项目本地Aspire Agent技能 | → 执行 |
| 已部署应用的监控(Azure) | → |
Improving AI agent support (aspire agent init
)
aspire agent init优化AI Agent支持(aspire agent init
)
aspire agent initWhen the user asks for better AI agent support for their Aspire project (or to
set up / refresh project-local agent guidance), recommend running . 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.
aspire agent init当用户要求为其Aspire项目优化AI Agent支持(或设置/刷新项目本地Agent指导)时,建议运行**。该命令会生成项目本地的Aspire Agent技能,提供比内置路由更丰富的场景化指导——针对C# AppHost编辑**、TypeScript AppHost以及排查/诊断工作流的覆盖更深入。
aspire agent initSub-Skills
子技能
aspire-init
aspire-init
First-run flow only. Owns the skeleton drop for repos that do not yet have an AppHost —
picks (greenfield) or (existing repo), runs the CLI,
and hands off to for the actual wiring. Self-deactivates once the skeleton is in
place. Do not use it on a repo that already contains an AppHost.
aspire new <template>aspire initaspireify仅用于首次运行流程。负责为尚未拥有AppHost的仓库生成骨架——选择(全新项目)或(现有仓库),执行CLI命令,然后将后续配置工作移交至。骨架生成后自动停用。请勿在已包含AppHost的仓库中使用。
aspire new <template>aspire initaspireifyaspireify
aspireify
Agentic AppHost wiring after lands the skeleton. Scans the repo, proposes a
resource graph (Postgres / Redis / Rabbit / etc.), edits the AppHost (C#, file-based C#, or
TypeScript), wires + OTel, validates with , then
self-deactivates. Owns current AppHost authoring patterns (, ,
, generated , unified TS ,
endpoint references, and config/secret migration).
aspire initAspire.ServiceDefaultsaspire startAddNextJsAppAddViteAppWithBrowserLogs().aspire/modules/withEnvironment在生成骨架后,负责Agent化的AppHost配置。扫描仓库,生成资源图建议(Postgres/Redis/Rabbit等),编辑AppHost(C#、基于文件的C#或TypeScript),配置 + OTel,通过验证,然后自动停用。负责当前AppHost的编写模式(、、、生成的、统一TS、端点引用以及配置/密钥迁移)。
aspire initAspire.ServiceDefaultsaspire startAddNextJsAppAddViteAppWithBrowserLogs().aspire/modules/withEnvironmentaspire-orchestration
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 / /
inspection and CLI upgrades (). Does not edit
AppHost code — defers to for wiring.
aspire psaspire describe--include-hiddenaspire update --selfaspireify生命周期管理:启动、停止、等待、资源命令、默认监听/HMR指导以及文件锁恢复。防止Agent误操作的安全防护规则。负责 / / 检查以及CLI升级()。不编辑AppHost代码——将配置工作移交至。
aspire psaspire describe--include-hiddenaspire update --selfaspireifyaspire-deployment
aspire-deployment
Multi-target deployment and tear-down: , , ,
. Targets: Azure Container Apps, App Service, AKS, Kubernetes (Helm),
Docker Compose. Owns current deployment surfaces (Front Door, NSP, AKS hosting, Foundry
, JS , ) and 13.4 API naming.
aspire deployaspire publishaspire destroyaspire do <step>AddPromptAgentPublishAs*--pipeline-log-level多目标部署与销毁:、、、。支持的目标:Azure容器应用、App Service、AKS、Kubernetes(Helm)、Docker Compose。负责当前部署功能(Front Door、NSP、AKS托管、Foundry、JS、)以及13.4版本的API命名。
aspire deployaspire publishaspire destroyaspire do <step>AddPromptAgentPublishAs*--pipeline-log-levelaspire-monitoring
aspire-monitoring
Observability: , , , ,
. Routes between local Aspire CLI diagnostics, AKS workload tooling,
and deployed-Azure platform tools. Surfaces dashboard features (notification center,
Rebuild command, browser-logs telemetry).
aspire logsaspire otelaspire describeaspire exportaspire dashboard run可观测性:、、、、。在本地Aspire CLI诊断、AKS工作负载工具和已部署Azure平台工具之间进行路由。展示仪表盘功能(通知中心、重建命令、浏览器日志遥测)。
aspire logsaspire otelaspire describeaspire exportaspire dashboard runProject-Local Skill Override
项目本地技能覆盖
If any of the following exist project-locally (from or Aspire
), warn the user and defer to the project-local copy — repo-specific
guidance there should not be overridden by the in-plugin sibling:
aspire agent initaspire init| Project-local file | Precedence |
|---|---|
| This file (top-level router) defers to it for deeper C# / TS AppHost editing, Playwright handoff, investigation workflows. |
| The in-plugin |
| The in-plugin |
Safety guardrails from this plugin always apply even when project-local skills are
active.
如果项目本地存在以下任一文件(来自或Aspire的),需提醒用户并优先使用项目本地副本——仓库专属的指导不应被插件内的同名技能覆盖:
aspire agent initaspire init| 项目本地文件 | 优先级 |
|---|---|
| 本文件(顶层路由)会优先使用它,以获得更深入的C#/TS AppHost编辑、Playwright移交、排查工作流指导。 |
| 插件内的 |
| 插件内的 |
即使项目本地技能处于激活状态,本插件的安全防护规则仍始终适用。
Prerequisites
前置要求
| Requirement | Install |
|---|---|
| .NET 10.0 SDK | https://dotnet.microsoft.com/download |
| Aspire CLI (curl/PowerShell) | |
| Aspire CLI (NativeAOT global tool, .NET 10) | |
Either install method works. The path produces a NativeAOT binary
(instant startup, no JIT warmup) and is recommended when .NET 10 is already present.
dotnet tool install| 要求 | 安装方式 |
|---|---|
| .NET 10.0 SDK | https://dotnet.microsoft.com/download |
| Aspire CLI(curl/PowerShell) | |
| Aspire CLI(NativeAOT全局工具,.NET 10) | |
两种安装方式均有效。若已安装.NET 10,推荐使用方式,该方式会生成NativeAOT二进制文件(启动速度快,无需JIT预热)。
dotnet tool installReferences
参考资料
- aspire-13-3-breaking-changes.md — Every 13.3
breaking change to scrub from agent-generated code, scripts, and CI snippets (rename of
, dashboard MCP removal,
--log-level→NameOutput,NameOutputReferenceremoval, TSAddAndPublishPromptAgentdeprecation, and the full 13.2 → 13.3 migration checklist).withEnvironment* - 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.
- aspire-13-3-breaking-changes.md — 13.3版本的所有破坏性变更,需从Agent生成的代码、脚本和CI片段中移除(包括重命名、仪表盘MCP移除、
--log-level→NameOutput、NameOutputReference移除、TSAddAndPublishPromptAgent弃用以及完整的13.2→13.3迁移清单)。withEnvironment* - aspire-orchestration/references/agent-workflows.md — 常见Agent工作流:工作树、代码变更、排查、集成、TypeScript生成API、密钥、部署以及Playwright移交。
- aspire-orchestration/references/app-commands.md — 应用生命周期、引导、更新、恢复、文档以及集成发现命令。
- aspire-orchestration/references/resource-management.md — 资源等待与资源命令指导。
- aspire-monitoring/references/monitoring.md — 应用状态、日志、追踪、搜索过滤、仪表盘链接以及导出工作流。
- aspire-monitoring/references/playwright-handoff.md — Aspire端点发现后的Playwright移交。
- aspire-deployment/SKILL.md — 部署与流水线步骤工作流。
- aspireify/references/apphost-wiring.md — C#和TypeScript AppHost API查找与配置模式。