microsoft/aspire-skills/aspire-orchestration
Claude Code and agent skill by microsoft/aspire-skills
- vendor
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
**WORKFLOW SKILL** — Manage Aspire lifecycle in VS Code or the CLI. WHEN: "start or stop my Aspire app", "aspire_apphost_start", "aspire_apphost_stop", "notEditorOwned", "ambiguousSession", "aspire start", "aspire stop", "aspire wait", resource restart, file-lock errors (MSB3491 or CS2012), port conflicts, git worktrees, "--isolated", "aspire update --self", "aspire update --migrate", "aspire describe --include-hidden", "aspire stop --force", "aspire stop --force --volumes", integration discove…
Install
npx vskill@latest install microsoft/aspire-skills/aspire-orchestrationSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as microsoft/aspire-skills/aspire-orchestration.
Aspire Orchestration
MANDATORY COMPLIANCE — This skill prevents agent self-harm in Aspire projects.Violating these rules causes file locks, orphaned processes, and user frustration (#15801).
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. npm, Nix, Homebrew, WinGet, mise, and the install scripts are supported alongside the NativeAOT .NET global tool.
Detection
Activate when ANY signal is present:
| Signal | How to Detect | Confidence | |
|---|---|---|---|
| C# AppHost | .csproj containing Aspire.AppHost.Sdk | ✅ Definitive | |
| File-based C# AppHost | apphost.cs or .cs file with #:sdk Aspire.AppHost.Sdk | ✅ Definitive | |
| TypeScript AppHost | Current apphost.mts or legacy apphost.ts file in project | ✅ Definitive | |
| Go AppHost | apphost.go next to an aspire.config.json whose appHost.language is go | ✅ Definitive | |
| Aspire config | aspire.config.json in project root | High | |
| Aspire settings | .aspire/ directory present | High | |
| Generated TS or Go modules | .aspire/modules/ directory present | High | |
| Service defaults | <IsAspireSharedProject>true or a *.ServiceDefaults.csproj project reference | Medium |
See detection.md for detailed fingerprinting. Go AppHosts require Aspire 17.0 or later. A Go service wired into a C# or TypeScript AppHost does not make it a Go AppHost.
VS Code AppHost Lifecycle
When the agent host exposes aspire_apphost_start or aspire_apphost_stop, use the matching tool before running aspire start or aspire stop in a terminal, except when starting from a git worktree requires --isolated and the tool cannot request it. If the tool is listed as deferred, load its contract with the host's tool-discovery mechanism first; do not treat an unloaded deferred tool as unavailable.
Pass the exact selected appHostPath discovered by Aspire to editor lifecycle tools. In a multi-root workspace, that tool contract may require a selector such as repo-a~1/MyApp.AppHost/MyApp.AppHost.csproj.
The CLI --apphost flag does not understand that selector namespace. Before any CLI start/stop fallback, resolve the selected AppHost to its actual filesystem project path and pass that path to --apphost; never copy a multi-root selector verbatim. That CLI project path may be workspace-relative (MyApp.AppHost/MyApp.AppHost.csproj) or absolute (/workspaces/repo-a/MyApp.AppHost/MyApp.AppHost.csproj or C:\workspaces\repo-a\MyApp.AppHost\MyApp.AppHost.csproj); use the current platform's native path syntax. If several AppHosts are discovered and the user's target is unclear, ask which one to use instead of guessing, invoking the tool for every AppHost, or issuing an unscoped CLI command.
If the selected appHostPath is already a normal workspace-relative project path such as MyApp.AppHost/MyApp.AppHost.csproj, reuse it unchanged for CLI fallbacks; do not convert it to an absolute path just for the CLI.
An unclear target is a hard stop. Ask one clarifying question and wait for the user to name an AppHost. Do not call a lifecycle tool or terminal command until the target is resolved, and do not offer commands that bypass this gate. Stop multiple AppHosts only when the user explicitly requests all of them.
For starts, call aspire_apphost_start with mode run and the exact selected appHostPath unless the user explicitly asks to attach a debugger. In a git worktree, the editor tool does not currently request Aspire's isolated state. Resolve the selected AppHost to its filesystem path and use aspire start --non-interactive --isolated --apphost <filesystem-path> instead.
run mode has no debugger attached, but it still has an editor-owned Aspire session that aspire_apphost_stop can stop. After a stop call, follow this result matrix exactly:
| Tool result | Next action | CLI stop allowed? | |
|---|---|---|---|
stopped or notRunning | Report the result; take no further stop action | No | |
alreadyStopping, controller editor | Report that the editor stop is already in progress; take no further stop action | No | |
alreadyStarting, controller editor | Retry aspire_apphost_stop once; if it repeats, report that startup is still in progress and take no further stop action | No | |
notEditorOwned, controller external | If the user requested that exact AppHost be stopped, resolve it to its filesystem path and run aspire stop --non-interactive --apphost <filesystem-path> | Yes | |
failed, controller unknown | Retry aspire_apphost_stop once; if the same result repeats, use the same exact-target CLI command above | Only after the retry | |
ambiguousSession | Stop nothing and have the user disambiguate in the editor | Never | |
| Any other refusal or failure | Resolve or report that result; do not change mechanisms | No |
The rows are mutually exclusive. Act only on the current result; do not offer a command from another row as a speculative future workaround. Re-evaluate only after a new tool result is returned.
`ambiguousSession` is a terminal safety refusal. Do not run or offer a CLI fallback, and do not ask whether the user wants one. User confirmation cannot make an ambiguous editor session safe to terminate from the CLI.
Use direct Aspire CLI lifecycle commands only when the matching editor tool is unavailable, for isolated worktree starts, or for a stop result explicitly marked as allowed above. When a CLI fallback is allowed, keep the target exact by resolving the selected AppHost to its filesystem path first.
Safety Guardrails
| Situation | ✅ ALWAYS Do | ❌ NEVER Do | |
|---|---|---|---|
| Start an Aspire app | aspire_apphost_start with mode run and the exact selected appHostPath when available; in a git worktree, use aspire start --non-interactive --isolated --apphost <filesystem-path> even when aspire_apphost_start is available | dotnet run on AppHost | |
| Wait for resource ready | aspire wait <resource> | curl / HTTP polling loops | |
| Code changed in a resource | Prefer resource commands, runtime watch/HMR, dashboard actions, or IDE-managed debugging | dotnet build against locked files | |
| Task complete | aspire_apphost_stop with the exact selected appHostPath when available; follow its result matrix | Use an unapproved CLI fallback | |
| Check running AppHosts | aspire ps | Manual process inspection | |
| Check resource status | aspire describe | aspire ps --resources (removed in 13.5) | |
| Remove persistent resources | Confirm the exact AppHost and that its persistent resource instances will be removed before aspire stop --force --apphost <filesystem-path>; explain that --force alone preserves persistent volumes | Combining --force with --all, or using it for an ordinary stop | |
| Delete Aspire-owned volumes | Aspire CLI 13.6+ only. After explicit approval naming the exact AppHost and accepting that every named volume Aspire created and owns for it is deleted, which can span several databases and caches: aspire stop --force --volumes --apphost <filesystem-path> | Adding --volumes to routine shutdown, lock recovery, or a single-resource fix without approval for that broader data scope | |
| Working in git worktree | aspire start --non-interactive --isolated --apphost <filesystem-path> | aspire_apphost_start when it cannot request isolation | |
| Running from AI agent | Load available lifecycle tools first; resolve CLI --apphost fallbacks to <filesystem-path>; add --non-interactive | Assuming interactive terminal | |
| Editing unfamiliar API | aspire docs search <topic> then aspire docs api search <query> for API reference | Guessing API shape | |
| C# AppHost API inspection | Use dotnet-inspect skill (if available) for local symbols | Guessing overloads or builder chains | |
| Adding custom dashboard/resource commands | aspire docs search "custom resource commands" first | Inventing WithCommand patterns without docs | |
| Installing Aspire support | Use aspire add or aspire init |
See safety-guardrails.md for detailed rules and recovery patterns.
Default Workflow
- Confirm workspace is Aspire — identify the AppHost
- If the workspace is a git worktree, resolve the selected AppHost to a filesystem project path and use
aspire start --non-interactive --isolated --apphost <filesystem-path>even whenaspire_apphost_startis available, because the editor tool cannot request isolation. Otherwise, start withaspire_apphost_startin moderunusing the exact selectedappHostPathwhen available; if that tool is unavailable, resolve the selected AppHost to a filesystem project path and useaspire start --non-interactive --apphost <filesystem-path> aspire wait <resource>before interacting with any resourceaspire describeto inspect state, then work- If AppHost code changed, restart through the same lifecycle routing; if only one resource changed, prefer the resource's commands/watch/HMR/debug workflow
- Stop with
aspire_apphost_stopusing the exact selectedappHostPathwhen available; useaspire stop --non-interactive --apphost <filesystem-path>only for the documented fallback outcomes
Quick Reference
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 18 Nov 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/aspire-orchestration/SKILL.md
Popularity
- Repository stars
- 94
- Repository forks
- 12
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 2 Oct 2026, a month ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/microsoft/aspire-skills/aspire-orchestration)