跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 aspire-deployment

Aspire Deployment

**WORKFLOW SKILLL**——从AppHost模型向多克编曲,Kubernetes,Azure,AWS,或预览半径应用. 当:\"调用Aspire app\",\"调用Aspire 文物\","调用Azure Control Apps\","调用Kubernetes arters\","调用半径","调用Aspire". INVOKES:向往 CLI, Aspire docs, 目标云/容器 CLI. 用于 Single Operations:仅在没有 Aspire AppHost 时使用通用 Azure, Kubernetes, Docker, AWS 或 Radius 工具.

284 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

**WORKFLOW SKILLL**——从AppHost模型向多克编曲,Kubernetes,Azure,AWS,或预览半径应用. 当:\"调用Aspire app\",\"调用Aspire 文物\","调用Azure Control Apps\","调用Kubernetes arters\","调用半径","调用Aspire". INVOKES:向往 CLI, Aspire docs, 目标云/容器 CLI. 用于 Single Operations:仅在没有 Aspire AppHost 时使用通用 Azure, Kubernetes, Docker, AWS 或 Radius 工具.

何时用

官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Aspire Deployment、Routing precedence、Guiding principles、Use Aspire docs before changing deployment code、Prefer Aspire-native deployment、Ask where to deploy only when ambiguous。 其中含规范建议的小节:分步指令。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/docker-compose.md、references/kubernetes.md、references/azure.md、references/aws.md、references/javascript.md、references/cicd.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

**WORKFLOW SKILL** — Deploy Aspire apps from AppHost models to Docker Compose, Kubernetes, Azure, AWS, or preview Radius. WHEN: \"deploy Aspire app\", \"publish Aspire artifacts\", \"deploy to Azure Container Apps\", \"generate Kubernetes artifacts\", \"deploy to Radius\", \"tear down Aspire deployment\". INVOKES: aspire CLI, Aspire docs, target cloud/container CLIs. FOR SINGLE OPERATIONS: use generic Azure, Kubernetes, Docker, AWS, or Radius tools only when no Aspire AppHost exists.

Aspire DeploymentRouting precedenceGuiding principlesUse Aspire docs before changing deployment codePrefer Aspire-native deploymentAsk where to deploy only when ambiguousAsk before creating cloud resources when intent is not explicitKeep Azure deployment Aspire-nativeKeep Aspire packages on one release familyDefault workflowAppHost target detectionParameter and secret preflight

· 许可:MIT

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
aspire-deployment
description
**WORKFLOW SKILL** — Deploy Aspire apps from AppHost models to Docker Compose, Kubernetes, Azure, AWS, or preview Radius. WHEN: \"deploy Aspire app\", \"publish Aspire artifacts\", \"deploy to Azure Container Apps\", \"generate Kubernetes artifacts\", \"deploy to Radius\", \"tear down Aspire deployment\". INVOKES: aspire CLI, Aspire docs, target cloud/container CLIs. FOR SINGLE OPERATIONS: use generic Azure, Kubernetes, Docker, AWS, or Radius tools only when no Aspire AppHost exists.
许可
MIT
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 6
  • references/docker-compose.md
  • references/kubernetes.md
  • references/azure.md
  • references/aws.md
  • references/javascript.md
  • references/cicd.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「aspire-deployment」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-114ac990c1ede3c2-Aspire-Deployment.html
请存为 .cursor/skills/aspire-deployment/SKILL.md 或 .claude/skills/aspire-deployment/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/microsoft/aspire-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/microsoft/aspire-skills' --list

npx skills add 'https://github.com/microsoft/aspire-skills' --skill 'aspire-deployment'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: aspire-deployment description: "**WORKFLOW SKILL** — Deploy Aspire apps from AppHost models to Docker Compose, Kubernetes, Azure, AWS, or preview Radius. WHEN: \"deploy Aspire app\", \"publish Aspire artifacts\", \"deploy to Azure Container Apps\", \"generate Kubernetes artifacts\", \"deploy to Radius\", \"tear down Aspire deployment\". INVOKES: aspire CLI, Aspire docs, target cloud/container CLIs. FOR SINGLE OPERATIONS: use generic Azure, Kubernetes, Docker, AWS, or Radius tools only when no Aspire AppHost exists." license: MIT metadata: author: Microsoft version: "0.0.3" --- # Aspire Deployment Use this skill when the task is to publish, preview, validate, deploy, or tear down an Aspire application deployment. This skill owns Aspire deployment routing. Do not start with a generic Azure, Docker, Kubernetes, Helm, or Bicep workflow until you have checked whether the workspace is an Aspire app. Aspire deployment starts from the AppHost model. Treat `aspire deploy`, `aspire publish`, `aspire destroy`, `aspire do`, and the deployment environment resources in the AppHost as the primary path. Use stable SDK/hosting packages from the project's release family and matching preview builds for preview-only integrations such as Kubernetes and Radius. Keep this as one skill with target-specific references. Load only the reference files that match the target you discover or the user requests. ## Routing precedence This skill wins over generic cloud deployment skills when both conditions are true: 1. The user asks to deploy, publish, generate deployment artifacts, create Bicep/Helm/Compose/CDK output, host on Azure or AWS, deploy to Azure, AWS, Kubernetes, Docker Compose, or Radius, tear down deployed resources, or validate a deployment. 2. The workspace has Aspire markers: - Aspire workspace configuration - C# or TypeScript AppHost files - an AppHost project - AppHost code using Aspire distributed application builder APIs If Aspire markers are present but this skill was not automatically invoked, switch to this skill before continuing. Prefer Aspire CLI commands such as `aspire ls`, `aspire config list`, `aspire ps`, and `aspire describe` for workspace orientation. ## Guiding principles ### Use Aspire docs before changing deployment code Before adding target packages, editing the AppHost, or using an unfamiliar deployment API, use Aspire docs: ```bash aspire docs search "deploy with Aspire" aspire docs search "Docker Compose deployment" aspire docs search "Kubernetes deployment" aspire docs search "Azure Container Apps deployment" aspire docs search "Azure App Service deployment" aspire docs search "Azure Kubernetes Service deployment" aspire docs search "Radius deployment" aspire docs get "deploy-to-azure-kubernetes-service-aks" aspire docs get "" ``` When you need exact C# or TypeScript API shape, use API docs too. Search both languages when you are not sure which AppHost language the repo uses: ```bash aspire docs api search "" --language csharp aspire docs api search "" --language typescript aspire docs api get "" ``` Do not invent package names, builder methods, overloads, or deployment commands. API shapes differ between C# and TypeScript AppHosts. ### Prefer Aspire-native deployment Deploy the resources declared in the AppHost, not the AppHost process itself. For Docker Compose, configure the Compose environment and let Aspire generate services for those resources; do not replace this with an AppHost Dockerfile or Compose service. Use Aspire deployment targets and CLI commands first: ```bash aspire publish --list-steps aspire deploy --list-steps aspire publish aspire deploy aspire destroy aspire do ``` Use target-specific tooling only after Aspire has generated artifacts or when the target docs call for it: - Docker Compose: inspect generated `aspire-output/docker-compose.yaml` and `.env*`; Aspire can also run `docker compose up` through `aspire deploy`. - Kubernetes: inspect generated Helm chart output; use Helm/kubectl when applying published artifacts yourself. - Azure: use `aspire add `, `aspire publish`, and `aspire deploy` through the AppHost deployment environment. - AWS: use `aspire add aws` to add the integration, inspect generated CDK/CloudFormation output, and follow the AWS integrations repository guidance. - Radius: treat `Aspire.Hosting.Radius` as preview. Use integration/docs search to verify the package and API, then model `AddRadiusEnvironment(...).WithNamespace(...)`. ### Ask where to deploy only when ambiguous Do not ask for target selection when the user already chose a target such as Docker Compose, Kubernetes, Azure Container Apps, Azure App Service, Azure Kubernetes Service (AKS), or AWS. Use the chosen target and continue with its reference. If the user did not explicitly choose a deployment target and the AppHost does not already contain exactly one deployment environment, ask where they want to deploy before adding integrations, editing the AppHost, publishing artifacts, or deploying. Use a single multiple-choice question: > Where do you want to deploy this Aspire app? Show these choices: | Choice | Aspire add command | Use when | |--------|--------------------|----------| | Docker Compose | `aspire add docker` | The user wants local/server container deployment artifacts for Docker or Podman. | | Kubernetes | `aspire add kubernetes` | The user has an existing Kubernetes cluster and wants Helm/Kubernetes artifacts or direct cluster deployment. | | Azure Container Apps | `aspire add azure-appcontainers` | The user wants an Azure-managed container platform for distributed apps and services. | | Azure App Service | `aspire add azure-appservice` | The user wants Azure website hosting for web apps/APIs that fit the App Service model. | | Azure Kubernetes Service (AKS) | `aspire add azure-kubernetes` | The user wants Aspire to provision and deploy to Azure-managed Kubernetes. | | AWS | `aspire add aws` | The user wants Aspire to publish/deploy through the AWS Aspire integrations and AWS CDK. | Do not offer preview Radius as a default choice. Use it when the user explicitly requests Radius or the AppHost already contains a Radius environment. If the user says only "Azure", ask again with just the Azure choices: Azure Container Apps, Azure App Service, or Azure Kubernetes Service (AKS). If the AppHost already contains exactly one deployment environment and the user did not ask to change targets, use that target and tell the user what was detected. ### Ask before creating cloud resources when intent is not explicit Cloud deploys can create billable resources. If the user asked for a plan, preview, validation, or "make this deployable", stop after the deployment plan/artifacts and ask before running the command that provisions resources. If the user explicitly asked to deploy now, continue through preflight and deployment, but still surface any target choice, subscription/resource group ambiguity, or missing parameter decisions before provisioning. ### Keep Azure deployment Aspire-native The Azure deployment path in this skill is `aspire add `, AppHost environment configuration, `aspire publish`, and `aspire deploy`. Do not route Azure deployment work through a separate Azure deployment tool or generated infrastructure workflow. ### Keep Aspire packages on one release family Before publish or deploy, verify that `Aspire.AppHost.Sdk` and the hosting packages use compatible versions in the project's selected release family. Preview-only integrations need compatible preview builds selected by `aspire add` or integration docs. The CLI version does not make incompatible hosting packages safe; mixed graphs can fail at startup with `MissingMethodException` or `TypeLoadException`. Migrate obsolete 13.5 surfaces while editing deployment code: - use `.Services` instead of hosting context `.ServiceProvider`; - use `AddConnectionString` instead of `PublishAsConnectionString`; and - migrate deprecated `Aspire.Hosting.GitHub.Models` resources to Azure AI Foundry. ## Default workflow 1. **Orient to the Aspire workspace.** - Start with `aspire ls` to list AppHosts in the current scope, then use `aspire.config.json`, AppHost project files, or `aspire ps` if more context is needed. - If no AppHost exists, stop deployment work and invoke the `aspireify` skill to initialize/wire the AppHost before continuing. - Identify C# vs TypeScript AppHost. - Prefer Aspire CLI commands for discovery and state inspection. 2. **Clarify or infer the deployment target.** - If the user named Docker Compose, Kubernetes, Azure Container Apps, Azure App Service, Azure Kubernetes Service (AKS), or AWS, load that target reference without asking again. - If they only said "deploy", inspect existing AppHost target environment resources. - If exactly one target environment already exists, use it and state what was detected. - If multiple targets exist, none exists, or the user says only "Azure", ask where to deploy using the choices above. 3. **Load target and app-type references.** - Docker Compose: [references/docker-compose.md](references/docker-compose.md) - Kubernetes and Azure Kubernetes Service (AKS): [references/kubernetes.md](references/kubernetes.md) - Azure Container Apps/App Service/Azure Kubernetes Service (AKS): [references/azure.md](references/azure.md) - AWS: [references/aws.md](references/aws.md) - Radius preview: use current Aspire docs and API search for `Aspire.Hosting.Radius`; do not guess experimental API shapes. - JavaScript app resources: [references/javascript.md](references/javascript.md) - CI/CD or GitHub Actions automation: [references/cicd.md](references/cicd.md) 4. **Use Aspire docs search for current guidance.** - Search and get the target deployment docs. - Search API docs before editing AppHost code. 5. **Apply the target code changes.** - Run the target's `aspire add ...` command if the integration is missing. - Add the deployment environment resource to the AppHost. - Do not add explicit compute-environment assignment for the common single-environment case. Only disambiguate when the AppHost has multiple deployment environments. In C# this is usually `WithComputeEnvironment(...)`; for TypeScript AppHosts, verify the current language-specific docs before assuming an equivalent. - Add only the target-specific customization APIs the deployment needs, such as endpoint exposure, Helm settings, Compose file customization, Azure site/container app customization, or AWS publish target overrides. 6. **Preflight the deployment model.** - Confirm the target integration package exists in the AppHost. - Confirm the AppHost has the target environment resource. - Confirm compute resources are assigned to the target environment only when multiple compute environments exist. A single compute environment is the common case and can be inferred. - Inventory parameters, secrets, connection strings, external endpoints, container registries, and target-specific prerequisites. - For Azure or AWS, confirm auth, target account/subscription, region/location, and resource group/stack context. 7. **Preview before applying.** - Run `aspire publish --list-steps` or `aspire deploy --list-steps`. - Use `aspire publish -o ` when artifact review is requested. - Treat published artifacts as a preview/handoff. `aspire deploy` resolves values and applies the deployment from the AppHost model; it does not consume a previously published output directory. - Summarize resources, endpoints, parameters, secrets, identities, and generated artifacts. 8. **Deploy or hand off.** - Run `aspire deploy` when the user asked to deploy and preflight is complete. - Run a named step with `aspire do ` only when the user asked for a specific pipeline step. - For published artifacts, explain the target-native apply step. 9. **Destroy only when explicitly requested.** - Run `aspire destroy` to execute the selected AppHost/environment's target destroy pipeline. - Confirm the AppHost, environment, target account/subscription/cluster, and destructive intent before running it. - Use `--yes` only when the user or CI workflow already made teardown intent explicit. - Prefer `aspire destroy` over target-native delete commands unless you are troubleshooting failed teardown or cleaning up unmanaged leftovers. 10. **Verify the outcome.** - Use target output, `aspire describe`, cloud CLI, Docker Compose, kubectl, or endpoint checks appropriate to the target. - After destroy, verify target resources are removed or record any leftovers that require manual cleanup. ## AppHost target detection Search the AppHost for deployment environment resources: | Target | Aspire add command | Integration | AppHost environment concept | |--------|--------------------|-------------|-----------------------------| | Docker Compose | `aspire add docker` | Docker hosting | Docker Compose environment | | Kubernetes | `aspire add kubernetes` | Kubernetes hosting | Kubernetes environment | | Azure Container Apps | `aspire add azure-appcontainers` | Azure Container Apps hosting | Azure Container Apps environment | | Azure App Service | `aspire add azure-appservice` | Azure App Service hosting | Azure App Service environment | | Azure Kubernetes Service (AKS) | `aspire add azure-kubernetes` | Azure Kubernetes hosting | Azure Kubernetes Service (AKS) environment | | AWS | `aspire add aws` | AWS hosting | AWS CDK environment | | Radius (preview) | Discover with `aspire integration search radius` | `Aspire.Hosting.Radius` | Radius environment | Use this table only for orientation. Before editing code, verify the current API in Aspire docs for the AppHost language. ## Parameter and secret preflight Parameters are deployment inputs. They may be supplied by configuration files, user secrets, environment variables, command-line args, interactive prompts, or CI/CD secret stores depending on the target and command. Before deployment, report: - Parameter name from AppHost parameter APIs, including config-backed parameters - Whether it is secret - Expected provider syntax such as `Parameters__name`; for parameter names with dashes, use underscores in environment variables, for example `registry-endpoint` becomes `Parameters__registry_endpoint` - Where it flows, such as a project environment variable, connection string, Key Vault secret, Helm Secret, Compose `.env`, or Azure app setting - Whether a value appears configured or missing Use `aspire secret list` for AppHost user secrets when appropriate, but do not print secret values. For deployment artifacts, inspect generated placeholders and mappings, not raw secret content. ## Target references - [references/docker-compose.md](references/docker-compose.md) - Docker Compose target, generated files, environment variables, cleanup. - [references/kubernetes.md](references/kubernetes.md) - Kubernetes and Azure Kubernetes Service (AKS) target selection, Helm output, registry requirements, kubectl/Helm checks. - [references/azure.md](references/azure.md) - Azure target selection, Azure settings, Container Apps, App Service, and Azure Kubernetes Service (AKS). - [references/aws.md](references/aws.md) - AWS target selection, AWS CDK prerequisites, publish/deploy workflow, and AWS integration docs. - [references/javascript.md](references/javascript.md) - JavaScript app deployment models, including Vite/static assets, Node/SSR servers, Next.js, and gateway/backend serving patterns. - [references/cicd.md](references/cicd.md) - CI/CD and GitHub Actions workflow guidance for Aspire publish/deploy, parameters, secrets, registry auth, and cloud auth. - [references/preflight.md](references/preflight.md) - Common preflight, preview, parameter, destroy, and validation checklist. - [aspire-13-5-breaking-changes.md](https://github.com/microsoft/aspire-skills/blob/main/skills/aspire/references/aspire-13-5-breaking-changes.md) - 13.5 package, API, and CLI migration rules. ## Agent execution When running unattended (CI, scripted, agent-driven), append `--non-interactive` to every Aspire CLI invocation that may prompt — most importantly `aspire publish`, `aspire deploy`, and `aspire destroy`. For `aspire destroy`, also pass `--yes` only after the user has explicitly confirmed teardown intent (or a CI workflow already encodes that intent). Prefer surfacing prompt-driving values up front (target subscription/region/resource group, parameters, secrets, registry credentials) so the unattended run does not stall. See [references/preflight.md](references/preflight.md) for the full preflight checklist. ## Handoff Rules | Scenario | Route To | |----------|----------| | Start, stop, wait, or restart the AppHost / its resources | `aspire-orchestration` skill | | Logs, traces, metrics, dashboard for a running or deployed app | `aspire-monitoring` skill | | AppHost authoring — adding integrations, wiring resources, environment setup | `aspireify` skill | | Deployed-app diagnostics — App Insights, ACA logs, AKS Container Insights | `azure-diagnostics` skill (azure-skills) | > Never hand deployment off to azure-skills. Aspire handles publish, deploy, and destroy > end-to-end across Docker Compose / Kubernetes / Azure / AWS via the AppHost model. ## Project-Local Skill Override If `.agents/skills/aspire-deployment/SKILL.md` exists (dropped by `aspire agent init`), prefer it over this plugin skill — it is the authoritative project-local version with content version-aligned to the consumer's Aspire CLI. This plugin skill is the always-on safety net for repos that have not yet run `aspire agent init`.

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Azure Diagnostics

Azure上使用AppLens,AzureMonitor,资源健康,安全分型的调试Azure生产问题. 当:调试生产问题,故障解答应用服务,应用服务高CPU,应用服务部署失败,故障解答容器应用,故障解答功能,故障解答AKS,VM RDP,Linux SSH,VM黑屏幕,无法连接到…

运维与云

Azure Prepare

准备 azd 用于部署的Azure项目:为Azure开发者CLI(azd)工作流程生成azure.yaml,基础设施(Bicep/Terraform)和多克文件. 仅当用户明确想要使用 azd 作为部署工具时使用, 或项目已经有一个 azure 。 雅姆尔文件。 不使用: 非az…