--- name: aspire-init description: >- **WORKFLOW SKILL** - First-run flow for adding Aspire to a repo. Picks `aspire new` (greenfield) or `aspire init` (existing repo), drops the AppHost skeleton, then hands off to `aspireify` for resource wiring. USE FOR: aspire init, aspire new, aspire-starter, aspire-ts-starter, aspire-py-starter, add Aspire to existing repo, scaffold Aspire app, bootstrap Aspire, no AppHost detected, install aspireify, apphost.mts, generated .aspire/modules. DO NOT USE FOR: AppHost wiring on an existing AppHost (use aspireify), start/stop/wait (use aspire-orchestration), deploy/publish (use aspire-deployment), logs/traces (use aspire-monitoring), repo that already has an AppHost. INVOKES: aspire CLI (init, new, doctor), aspireify (handoff after skeleton drop). FOR SINGLE OPERATIONS: Run `aspire init` or `aspire new TEMPLATE` directly. license: MIT metadata: author: Microsoft version: "0.0.4" --- # Aspire Init > **First-run only.** This skill owns the skeleton drop and template choice for repositories > that do not yet have an Aspire AppHost. Once the skeleton is in place, hand off to > [`aspireify`](https://github.com/microsoft/aspire-skills/blob/main/skills/aspireify/SKILL.md) for the actual resource wiring. ## Prerequisites | Requirement | Install | |-------------|---------| | .NET 10.0 SDK | https://dotnet.microsoft.com/download | | Node.js `^20.19.0`, `^22.13.0`, or `>=24` (TypeScript AppHost) | https://nodejs.org | | Aspire CLI (curl installer) | `curl -sSL https://aspire.dev/install.sh \| bash` | | Aspire CLI (npm) | `npm install -g @microsoft/aspire-cli` | | Aspire CLI (NativeAOT global tool) | `dotnet tool install -g Aspire.Cli` (.NET 10 required) | | Diagnose missing prerequisites | `aspire doctor` | > Aspire also supports Nix, Homebrew, WinGet, mise, and the curl/PowerShell installers. > Use the installation method already owned by the user's environment. ## Detection Activate **only** when adding Aspire to a workspace that does not yet have one. Confirm ALL of the following before running `aspire init`: | Signal | How to Detect | Meaning | |--------|---------------|---------| | No C# AppHost | No `.csproj` containing `Aspire.AppHost.Sdk` | OK to init | | No file-based AppHost | No `apphost.cs` with `#:sdk Aspire.AppHost.Sdk` | OK to init | | No TypeScript AppHost | No current `apphost.mts` or legacy `apphost.ts` in the repo | OK to init | | No Aspire config | No `aspire.config.json` in repo root | OK to init | | User intent | Explicit "add Aspire", "scaffold Aspire", "aspire init" | OK to init | If **any** AppHost signal is already present, **do not run `aspire init`**. Route to [`aspireify`](https://github.com/microsoft/aspire-skills/blob/main/skills/aspireify/SKILL.md) (re-wire) or [`aspire-orchestration`](https://github.com/microsoft/aspire-skills/blob/main/skills/aspire-orchestration/SKILL.md) (lifecycle). ## Decision: `aspire new` vs `aspire init` | Situation | Command | Why | |-----------|---------|-----| | Empty directory or brand-new project | `aspire new