Skip to content

[release/17.0] Remove static Aspire skill copies during aspire agent init - #22277

Merged
Jose Perez Rodriguez (joperezr) merged 6 commits into
release/17.0from
backport-22080
Nov 17, 2026
Merged

Jose Perez Rodriguez (joperezr) merged 6 commits into
release/17.0from
backport-22080

Conversation

@ellahathaway

@ellahathaway Ella Hathaway (ellahathaway) commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

Manual backport of #22080

Older Aspire CLIs copied Aspire skills into project and user-profile skill folders such as .agents/skills/aspire. The configured Aspire plugin or OpenCode catalog replaces those copies. For Copilot and Claude Code, a configured fork can serve as the replacement when it retains the aspire@aspire-skills identity, but the copies go stale and nothing removes them. On main, aspire doctor and aspire agent init only tell users to delete them by hand, and many users do not notice.

This PR lets aspire agent init remove them:

  • After init configures the Aspire skill sources, it lists the copies that the plugin now replaces at the selected scope and asks whether to delete them. The prompt defaults to No. See When aspire agent init deletes copies below for the exact rules.
  • A new --remove-skill-copies option answers the prompt ahead of time: --remove-skill-copies deletes the copies and
    --remove-skill-copies=false keeps them. Omitting it asks in an interactive terminal and keeps the copies in non-interactive runs, so nothing is deleted unless the user opts in.
  • After the existing 🤖 Configured sources in ... line, init reports the result on one line: 📁 Removed copied Aspire skills in ... or 📁 Kept copied Aspire skills in ....
  • If --remove-skill-copies is passed but the plugin does not replace the copies at the selected scope (for example, the default source is disabled), init keeps them and explains why in a dim note.
  • The option and behavior also apply to aspire init, aspire new, and aspire mcp init, which chain into agent init.
  • Detection only looks where older CLIs wrote copies (their --skill-location choices): .agents/skills, .claude/skills, .github/skills, and .opencode/skill in each directory from the current directory up to the workspace root, and ~/.agents/skills. It does not read agent-specific settings such as CLAUDE_CONFIG_DIR or OpenCode skills.paths, so it never inspects files the CLI did not write.
  • AspireSkillsCheck (aspire-skill-sources) now warns in the Environment category instead of AppHost. It reports both user-level copies and copies in the workspace that doctor runs in. The fix points to aspire agent init, and the details list each copy with the agents that read it, so users know which agents and scope to select.

Relates to #19726

Before and after

Example workspace:

repo/
  aspire.config.json          {"skillSources":{"default":{}}}
  .agents/skills/aspire/SKILL.md
  .agents/skills/aspire-deployment/SKILL.md
  .agents/skills/my-team-skill/SKILL.md
  .claude/skills/aspire/SKILL.md
  .github/skills/aspire-init/SKILL.md
~/.agents/skills/aspire/SKILL.md
~/.agents/skills/aspire-deployment/SKILL.md

aspire doctor

Before:

AppHost
  🚨 Local Aspire skill files may override plugin skills
       Delete these files, then run 'aspire agent init --skills aspire'.
       Files:
         .agents/skills/aspire/SKILL.md
         .claude/skills/aspire/SKILL.md
         ~/.agents/skills/aspire/SKILL.md

After:

Environment
  🚨 Found static copies of Aspire skills.
       Run 'aspire agent init' to configure skill sources and remove these copies.
       Details:
       .agents/skills/aspire (copilot, opencode)
       .claude/skills/aspire (claude)
       ~/.agents/skills/aspire (copilot, opencode)

With --format json, the copies are in details and there is no files field:

{
  "category": "environment",
  "name": "aspire-skill-sources",
  "status": "warning",
  "message": "Found static copies of Aspire skills.",
  "fix": "Run 'aspire agent init' to configure skill sources and remove these copies.",
  "details": ".agents/skills/aspire (copilot, opencode)\n.claude/skills/aspire (claude)\n~/.agents/skills/aspire (copilot, opencode)"
}

aspire agent init --help

The same option appears in aspire init --help, aspire new --help, and aspire mcp init --help.

  --remove-skill-copies    Remove copied Aspire skills when the Aspire skills plugin replaces them at the selected scope. Defaults to false

aspire agent init

Before, at either scope, init shows this warning before the skills prompt, then configures sources and leaves the copies in place:

🚨 Local Aspire skill files may override plugin skills
     .agents/skills/aspire/SKILL.md
     .claude/skills/aspire/SKILL.md
     ~/.agents/skills/aspire/SKILL.md

After, selecting only GitHub Copilot and choosing Project for Where should skills and tools be installed?, then answering y:

🚨 Found copied Aspire skills that the Aspire skills plugin now provides:
     .agents/skills/aspire
     .agents/skills/aspire-deployment
     .github/skills/aspire-init
Delete 3 copied skill folders? [y/N]: y
🤖 Configured sources in .github/copilot/settings.json (GitHub Copilot)
📁 Removed copied Aspire skills in .agents/skills/aspire, .agents/skills/aspire-deployment, .github/skills/aspire-init

Answering n, or pressing Enter, shows the same warning and prompt, then keeps all three folders:

Delete 3 copied skill folders? [y/N]: N
🤖 Configured sources in .github/copilot/settings.json (GitHub Copilot)
📁 Kept copied Aspire skills in .agents/skills/aspire, .agents/skills/aspire-deployment, .github/skills/aspire-init

.claude/skills/aspire is not listed because Claude Code was not selected, and the ~/.agents/skills copies are not listed because the scope is Project.

With --remove-skill-copies, there is no warning or prompt and the copies are deleted:

🤖 Configured sources in .github/copilot/settings.json (GitHub Copilot)
📁 Removed copied Aspire skills in .agents/skills/aspire, .agents/skills/aspire-deployment, .github/skills/aspire-init

With --remove-skill-copies=false, or in a non-interactive run without the option, there is no warning or prompt and the copies are kept:

🤖 Configured sources in .github/copilot/settings.json (GitHub Copilot)
📁 Kept copied Aspire skills in .agents/skills/aspire, .agents/skills/aspire-deployment, .github/skills/aspire-init

With --remove-skill-copies when aspire.config.json disables the default source, the plugin does not replace the copies, so init keeps them and adds a dim note:

📁 Kept copied Aspire skills in .agents/skills/aspire, .agents/skills/aspire-deployment, .github/skills/aspire-init
   Copies are only removed when the Aspire skills plugin is configured and enabled at the selected scope for every selected agent.

Choosing Global behaves the same way for ~/.agents/skills/aspire and ~/.agents/skills/aspire-deployment, with
~/.copilot/settings.json in the Configured sources line.

In every case my-team-skill is kept, and the default source is registered for each selected agent (for example
.github/copilot/settings.json gains the aspire@aspire-skills plugin).

When aspire agent init deletes copies

Init deletes copies only when the user opts in, either by passing --remove-skill-copies or by answering y at the prompt. It considers copies in the same run, right after it configures skill sources, and only when all of these are true:

  • The aspire skill is selected. It is selected by default.
  • Every skill source registration succeeded, and for each selected agent the configuration init saved, or already found unchanged, at the selected scope registers the Aspire replacement: the aspire@aspire-skills plugin in enabledPlugins for Copilot and Claude Code, or the built-in Aspire catalog for OpenCode. For Copilot and Claude Code, the plugin identity is what matters, so a configured fork or repository override retaining aspire@aspire-skills counts as a replacement. A registration that only exists at another scope (for example a user-level plugin during a Project run, or an inline OPENCODE_CONFIG_CONTENT catalog) does not count, so a committed project never loses its copies without a committed replacement. Additional unrelated plugins and catalogs do not count.
  • The merged settings for that scope still enable the plugin. A higher-precedence file, such as .github/copilot/settings.local.json, .claude/settings.local.json, or managed settings, that sets aspire@aspire-skills to false keeps the copies.
  • The copy is in the chosen scope. Project scope checks each directory from the current directory up to the workspace root, and Global scope checks ~/.agents/skills.
  • A selected agent reads the folder: .agents/skills (Copilot, OpenCode), .claude/skills (Claude Code), .github/skills (Copilot), .opencode/skill (OpenCode), or ~/.agents/skills (Copilot, OpenCode). A Copilot-only run keeps .claude/skills/aspire.
  • The folder is named like a skill older CLIs copied: aspire, aspire-deployment, aspire-init, aspire-monitoring, aspire-orchestration, aspire-project-v2-migration, or aspireify. Other skills are untouched.

Init checks the settings, not the agent's plugin cache. The agent downloads the plugin the next time it starts. A copy reached through a linked folder below the workspace or user profile is reported as an error and kept, since the link target may be shared. If a delete fails, init reports it, still deletes the other copies, and exits with an error. aspire doctor keeps listing any copies that remain.

Validation

  • dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class "*.AgentInitCommandTests" --filter-class "*.AgentInitClientSelectionTests" --filter-class "*.AspireSkillsCheckTests" --filter-class "*.DoctorCommandTests" --filter-class "*.LocalAspireSkillsTests" --filter-class "*.InitCommandTests" --filter-class "*.NewCommandTests" --filter-class "*.McpInitCommandTests" --filter-class "*.SkillSourceTests" --filter-class "*.OpenCodeAgentClientTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true": passed (666 total, 665 succeeded, 1 skipped, 0 failed). The skipped test needs symbolic link privileges. New tests cover --remove-skill-copies (true, false, and omitted in interactive and non-interactive runs), the option on aspire init and aspire new, the dim note when the plugin does not replace the copies, registrations that only exist at another scope, unchanged registrations at the selected scope, and a higher-precedence false override.
  • dotnet build tests/Aspire.Cli.EndToEnd.Tests/Aspire.Cli.EndToEnd.Tests.csproj: succeeded. The updated AgentCommandTests and DoctorCommandTests E2E scenarios were not run locally because they need Docker.
  • Manual testing with a locally built CLI in a real terminal: created copies in a project and in the user profile, then ran aspire agent init at Project scope answering y and n. The interactive output above is from those runs. Earlier manual runs covered Copilot, Claude Code, and OpenCode, registrations at only the other scope, and aspire doctor listing the copies that remain.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
  • Did you add <remarks /> and <code /> elements on your triple slash comments?
    - [ ] Yes
    - [ ] No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

## Description

Older Aspire CLIs copied Aspire skills into project and user-profile
skill folders such as `.agents/skills/aspire`. Configured skill sources
(the `microsoft/aspire-skills` plugin for Copilot and Claude Code, or
the OpenCode catalog) replace those copies, but the copies go stale and
nothing removes them. On main, `aspire doctor` and `aspire agent init`
only tell users to delete them by hand, and many users do not notice.

This PR lets `aspire agent init` remove them:

- After init configures the Aspire skill sources, it lists the copies
that the plugin now replaces at the selected scope and asks whether to
delete them. The prompt defaults to No. See **When `aspire agent init`
deletes copies** below for the exact rules.
- A new `--remove-skill-copies` option answers the prompt ahead of time:
`--remove-skill-copies` deletes the copies and
`--remove-skill-copies=false` keeps them. Omitting it asks in an
interactive terminal and keeps the copies in non-interactive runs, so
nothing is deleted unless the user opts in.
- After the existing `🤖 Configured sources in ...` line, init reports
the result on one line: `📁 Removed copied Aspire skills in ...` or `📁
Kept copied Aspire skills in ...`.
- If `--remove-skill-copies` is passed but the plugin does not replace
the copies at the selected scope (for example, the default source is
disabled), init keeps them and explains why in a dim note.
- The option and behavior also apply to `aspire init`, `aspire new`, and
`aspire mcp init`, which chain into agent init.
- Detection only looks where older CLIs wrote copies (their
`--skill-location` choices): `.agents/skills`, `.claude/skills`,
`.github/skills`, and `.opencode/skill` in each directory from the
current directory up to the workspace root, and `~/.agents/skills`. It
does not read agent-specific settings such as `CLAUDE_CONFIG_DIR` or
OpenCode `skills.paths`, so it never inspects files the CLI did not
write.
- `AspireSkillsCheck` (`aspire-skill-sources`) now warns in the
Environment category instead of AppHost. It reports both user-level
copies and copies in the workspace that doctor runs in. The fix points
to `aspire agent init`, and the details list each copy with the agents
that read it, so users know which agents and scope to select.

Relates to #19726

### Before and after

Example workspace:

```text
repo/
  aspire.config.json          {"skillSources":{"default":{}}}
  .agents/skills/aspire/SKILL.md
  .agents/skills/aspire-deployment/SKILL.md
  .agents/skills/my-team-skill/SKILL.md
  .claude/skills/aspire/SKILL.md
  .github/skills/aspire-init/SKILL.md
~/.agents/skills/aspire/SKILL.md
~/.agents/skills/aspire-deployment/SKILL.md
```

#### `aspire doctor`

Before:

```text
AppHost
  🚨 Local Aspire skill files may override plugin skills
       Delete these files, then run 'aspire agent init --skills aspire'.
       Files:
         .agents/skills/aspire/SKILL.md
         .claude/skills/aspire/SKILL.md
         ~/.agents/skills/aspire/SKILL.md
```

After:

```text
Environment
  🚨 Found static copies of Aspire skills.
       Run 'aspire agent init' to configure skill sources and remove these copies.
       Details:
       .agents/skills/aspire (copilot, opencode)
       .claude/skills/aspire (claude)
       ~/.agents/skills/aspire (copilot, opencode)
```

With `--format json`, the copies are in `details` and there is no
`files` field:

```json
{
  "category": "environment",
  "name": "aspire-skill-sources",
  "status": "warning",
  "message": "Found static copies of Aspire skills.",
  "fix": "Run 'aspire agent init' to configure skill sources and remove these copies.",
  "details": ".agents/skills/aspire (copilot, opencode)\n.claude/skills/aspire (claude)\n~/.agents/skills/aspire (copilot, opencode)"
}
```

#### `aspire agent init --help`

The same option appears in `aspire init --help`, `aspire new --help`,
and `aspire mcp init --help`.

```text
  --remove-skill-copies    Remove copied Aspire skills when the Aspire skills plugin replaces them at the selected scope. Defaults to false
```

#### `aspire agent init`

Before, at either scope, init shows this warning before the skills
prompt, then configures sources and leaves the copies in place:

```text
🚨 Local Aspire skill files may override plugin skills
     .agents/skills/aspire/SKILL.md
     .claude/skills/aspire/SKILL.md
     ~/.agents/skills/aspire/SKILL.md
```

After, selecting only GitHub Copilot and choosing **Project** for `Where
should skills and tools be installed?`, then answering `y`:

```text
🚨 Found copied Aspire skills that the Aspire skills plugin now provides:
     .agents/skills/aspire
     .agents/skills/aspire-deployment
     .github/skills/aspire-init
Delete 3 copied skill folders? [y/N]: y
🤖 Configured sources in .github/copilot/settings.json (GitHub Copilot)
📁 Removed copied Aspire skills in .agents/skills/aspire, .agents/skills/aspire-deployment, .github/skills/aspire-init
```

Answering `n`, or pressing Enter, shows the same warning and prompt,
then keeps all three folders:

```text
Delete 3 copied skill folders? [y/N]: N
🤖 Configured sources in .github/copilot/settings.json (GitHub Copilot)
📁 Kept copied Aspire skills in .agents/skills/aspire, .agents/skills/aspire-deployment, .github/skills/aspire-init
```

`.claude/skills/aspire` is not listed because Claude Code was not
selected, and the `~/.agents/skills` copies are not listed because the
scope is Project.

With `--remove-skill-copies`, there is no warning or prompt and the
copies are deleted:

```text
🤖 Configured sources in .github/copilot/settings.json (GitHub Copilot)
📁 Removed copied Aspire skills in .agents/skills/aspire, .agents/skills/aspire-deployment, .github/skills/aspire-init
```

With `--remove-skill-copies=false`, or in a non-interactive run without
the option, there is no warning or prompt and the copies are kept:

```text
🤖 Configured sources in .github/copilot/settings.json (GitHub Copilot)
📁 Kept copied Aspire skills in .agents/skills/aspire, .agents/skills/aspire-deployment, .github/skills/aspire-init
```

With `--remove-skill-copies` when `aspire.config.json` disables the
default source, the plugin does not replace the copies, so init keeps
them and adds a dim note:

```text
📁 Kept copied Aspire skills in .agents/skills/aspire, .agents/skills/aspire-deployment, .github/skills/aspire-init
   Copies are only removed when the Aspire skills plugin is configured and enabled at the selected scope for every selected agent.
```

Choosing **Global** behaves the same way for `~/.agents/skills/aspire`
and `~/.agents/skills/aspire-deployment`, with
`~/.copilot/settings.json` in the `Configured sources` line.

In every case `my-team-skill` is kept, and the default source is
registered for each selected agent (for example
`.github/copilot/settings.json` gains the `aspire@aspire-skills`
plugin).

### When `aspire agent init` deletes copies

Init deletes copies only when the user opts in, either by passing
`--remove-skill-copies` or by answering `y` at the prompt. It considers
copies in the same run, right after it configures skill sources, and
only when all of these are true:

- The `aspire` skill is selected. It is selected by default.
- Every skill source registration succeeded, and for each selected agent
the configuration init saved, or already found unchanged, at the
selected scope registers the default `microsoft/aspire-skills` source:
the `aspire@aspire-skills` plugin in `enabledPlugins` for Copilot and
Claude Code, or its skill catalog for OpenCode. A registration that only
exists at another scope (for example a user-level plugin during a
Project run, or an inline `OPENCODE_CONFIG_CONTENT` catalog) does not
count, so a committed project never loses its copies without a committed
replacement. Other configured sources do not count either, because they
do not replace the copied Aspire skills.
- The merged settings for that scope still enable the plugin. A
higher-precedence file, such as `.github/copilot/settings.local.json`,
`.claude/settings.local.json`, or managed settings, that sets
`aspire@aspire-skills` to `false` keeps the copies.
- The copy is in the chosen scope. Project scope checks each directory
from the current directory up to the workspace root, and Global scope
checks `~/.agents/skills`.
- A selected agent reads the folder: `.agents/skills` (Copilot,
OpenCode), `.claude/skills` (Claude Code), `.github/skills` (Copilot),
`.opencode/skill` (OpenCode), or `~/.agents/skills` (Copilot, OpenCode).
A Copilot-only run keeps `.claude/skills/aspire`.
- The folder is named like a skill older CLIs copied: `aspire`,
`aspire-deployment`, `aspire-init`, `aspire-monitoring`,
`aspire-orchestration`, `aspire-project-v2-migration`, or `aspireify`.
Other skills are untouched.

Init checks the settings, not the agent's plugin cache. The agent
downloads the plugin the next time it starts. A copy reached through a
linked folder below the workspace or user profile is reported as an
error and kept, since the link target may be shared. If a delete fails,
init reports it, still deletes the other copies, and exits with an
error. `aspire doctor` keeps listing any copies that remain.

### Validation

- `dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj
--no-launch-profile -- --filter-class "*.AgentInitCommandTests"
--filter-class "*.AgentInitClientSelectionTests" --filter-class
"*.AspireSkillsCheckTests" --filter-class "*.DoctorCommandTests"
--filter-class "*.LocalAspireSkillsTests" --filter-class
"*.InitCommandTests" --filter-class "*.NewCommandTests" --filter-class
"*.McpInitCommandTests" --filter-class "*.SkillSourceTests"
--filter-class "*.OpenCodeAgentClientTests" --filter-not-trait
"quarantined=true" --filter-not-trait "outerloop=true"`: passed (666
total, 665 succeeded, 1 skipped, 0 failed). The skipped test needs
symbolic link privileges. New tests cover `--remove-skill-copies` (true,
false, and omitted in interactive and non-interactive runs), the option
on `aspire init` and `aspire new`, the dim note when the plugin does not
replace the copies, registrations that only exist at another scope,
unchanged registrations at the selected scope, and a higher-precedence
`false` override.
- `dotnet build
tests/Aspire.Cli.EndToEnd.Tests/Aspire.Cli.EndToEnd.Tests.csproj`:
succeeded. The updated `AgentCommandTests` and `DoctorCommandTests` E2E
scenarios were not run locally because they need Docker.
- Manual testing with a locally built CLI in a real terminal: created
copies in a project and in the user profile, then ran `aspire agent
init` at Project scope answering `y` and `n`. The interactive output
above is from those runs. Earlier manual runs covered Copilot, Claude
Code, and OpenCode, registrations at only the other scope, and `aspire
doctor` listing the copies that remain.

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [ ] Yes
    - If yes, did you have an API Review for it?
      - [ ] Yes
      - [ ] No
- Did you add `<remarks />` and `<code />` elements on your triple slash
comments?
      - [ ] Yes
      - [ ] No
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
    - If yes, have you done a threat model and had a security review?
      - [ ] Yes
      - [ ] No
  - [x] No

---------

Co-authored-by: Copilot App <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22277

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22277"

@ellahathaway Ella Hathaway (ellahathaway) changed the title [release/18.0] Remove static Aspire skill copies during aspire agent init [release/17.0] Remove static Aspire skill copies during aspire agent init Nov 13, 2026
@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot November 13, 2026 22:08
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The removal check can delete existing guidance when default marketplace and plugin names point to a custom repository, without establishing an Aspire replacement; it must verify the saved and effective sources and add regression coverage.

1 open issue
2 files not reviewed
  • src/Aspire.Cli/Resources/AgentCommandStrings.Designer.cs: Generated file
  • src/Aspire.Cli/Resources/DoctorCommandStrings.Designer.cs: Generated file
What changed in this PR

Backports #22080 to release/17.0, adding opt-in cleanup of copied Aspire skills as the CLI moves to agent-managed plugins and catalogs.

Changes:

  • Adds --remove-skill-copies and interactive confirmation to agent initialization and chained commands.
  • Restricts cleanup by scope, selected agents, replacement registration, and linked-folder safeguards.
  • Updates doctor guidance, localized resources, and tests for detection and cleanup behavior.
File Description
tests/​Aspire.Cli.Tests/​Utils/​AspireSkillsCheckTests.cs Tests workspace and user-level diagnostics.
tests/​Aspire.Cli.Tests/​Snapshots/​InitCommandTests.InitCommand_Help_ShowsFileBasedOption.verified.txt Includes the cleanup option in help.
tests/​Aspire.Cli.Tests/​Snapshots/​DoctorCommandTests.DoctorCommand_Json_IncludesStaticSkillsGuidance.verified.json Updates structured diagnostic output.
tests/​Aspire.Cli.Tests/​Snapshots/​DoctorCommandTests.DoctorCommand_HumanReadable_IncludesStaticSkillsGuidance.verified.txt Updates human-readable diagnostic output.
tests/​Aspire.Cli.Tests/​Commands/​NewCommandTests.cs Tests cleanup option forwarding.
tests/​Aspire.Cli.Tests/​Commands/​InitCommandTests.cs Tests opt-in cleanup through init.
tests/​Aspire.Cli.Tests/​Commands/​AgentInitCommandTests.cs Covers cleanup decisions, safeguards, and failures.
tests/​Aspire.Cli.Tests/​Commands/​AgentInitClientSelectionTests.cs Updates selection and cleanup expectations.
tests/​Aspire.Cli.Tests/​Agents/​LocalAspireSkillsTests.cs Tests legacy directory discovery and scope.
tests/​Aspire.Cli.EndToEnd.Tests/​DoctorCommandTests.cs Updates terminal and JSON assertions.
tests/​Aspire.Cli.EndToEnd.Tests/​AgentCommandTests.cs Exercises interactive cleanup confirmation.
src/​Aspire.Cli/​Utils/​EnvironmentChecker/​EnvironmentCheckResult.cs Removes the separate files field.
src/​Aspire.Cli/​Utils/​EnvironmentChecker/​AspireSkillsCheck.cs Reports copies and readers under Environment.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.zh-Hant.xlf Synchronizes doctor localization resources.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.zh-Hans.xlf Synchronizes doctor localization resources.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.tr.xlf Synchronizes doctor localization resources.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.ru.xlf Synchronizes doctor localization resources.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.pt-BR.xlf Synchronizes doctor localization resources.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.pl.xlf Synchronizes doctor localization resources.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.ko.xlf Synchronizes doctor localization resources.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.ja.xlf Synchronizes doctor localization resources.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.it.xlf Synchronizes doctor localization resources.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.fr.xlf Synchronizes doctor localization resources.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.es.xlf Synchronizes doctor localization resources.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.de.xlf Synchronizes doctor localization resources.
src/​Aspire.Cli/​Resources/​xlf/​DoctorCommandStrings.cs.xlf Synchronizes doctor localization resources.
src/​Aspire.Cli/​Resources/​xlf/​AgentCommandStrings.zh-Hant.xlf Adds cleanup localization resources.
src/​Aspire.Cli/​Resources/​xlf/​AgentCommandStrings.zh-Hans.xlf Adds cleanup localization resources.
src/​Aspire.Cli/​Resources/​xlf/​AgentCommandStrings.tr.xlf Adds cleanup localization resources.
src/​Aspire.Cli/​Resources/​xlf/​AgentCommandStrings.ru.xlf Adds cleanup localization resources.
src/​Aspire.Cli/​Resources/​xlf/​AgentCommandStrings.pt-BR.xlf Adds cleanup localization resources.
src/​Aspire.Cli/​Resources/​xlf/​AgentCommandStrings.pl.xlf Adds cleanup localization resources.
src/​Aspire.Cli/​Resources/​xlf/​AgentCommandStrings.ko.xlf Adds cleanup localization resources.
src/​Aspire.Cli/​Resources/​xlf/​AgentCommandStrings.ja.xlf Adds cleanup localization resources.
src/​Aspire.Cli/​Resources/​xlf/​AgentCommandStrings.it.xlf Adds cleanup localization resources.
src/​Aspire.Cli/​Resources/​xlf/​AgentCommandStrings.fr.xlf Adds cleanup localization resources.
src/​Aspire.Cli/​Resources/​xlf/​AgentCommandStrings.es.xlf Adds cleanup localization resources.
src/​Aspire.Cli/​Resources/​xlf/​AgentCommandStrings.de.xlf Adds cleanup localization resources.
src/​Aspire.Cli/​Resources/​xlf/​AgentCommandStrings.cs.xlf Adds cleanup localization resources.
src/​Aspire.Cli/​Resources/​DoctorCommandStrings.resx Revises detection and remediation messages.
src/​Aspire.Cli/​Resources/​DoctorCommandStrings.Designer.cs Aligns doctor resource accessors.
src/​Aspire.Cli/​Resources/​AgentCommandStrings.resx Defines cleanup prompts and result messages.
src/​Aspire.Cli/​Resources/​AgentCommandStrings.Designer.cs Exposes cleanup resource strings.
src/​Aspire.Cli/​Commands/​NewCommand.cs Forwards cleanup choice to agent init.
src/​Aspire.Cli/​Commands/​McpInitCommand.cs Exposes the cleanup option.
src/​Aspire.Cli/​Commands/​InitCommand.cs Forwards cleanup choice to agent init.
src/​Aspire.Cli/​Commands/​DoctorCommand.cs Removes separate file-list rendering.
src/​Aspire.Cli/​Commands/​AgentInitCommand.cs Implements confirmation, cleanup guards, and reporting.
src/​Aspire.Cli/​Agents/​OpenCode/​OpenCodeAgentClient.cs Removes client-specific copy discovery.
src/​Aspire.Cli/​Agents/​IAgentClient.cs Removes the local-discovery interface member.
src/​Aspire.Cli/​Agents/​Copilot/​CopilotAgentClient.cs Removes client-specific copy discovery.
src/​Aspire.Cli/​Agents/​ClaudeCode/​ClaudeCodeAgentClient.cs Removes client-specific copy discovery.
src/​Aspire.Cli/​Agents/​AspireSkills/​LocalAspireSkills.cs Centralizes legacy copy locations and reader mappings.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the opt-in legacy skill cleanup backport.

No open issues 🎉

1 resolved since last review
2 files not reviewed
  • src/Aspire.Cli/Resources/AgentCommandStrings.Designer.cs: Generated file
  • src/Aspire.Cli/Resources/DoctorCommandStrings.Designer.cs: Generated file

Review effort: Balanced

@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The tests still reference a removed resource property, preventing compilation, and three empty-warning assertions conflict with the source explanation and trust warning still emitted.

2 open issues
2 files not reviewed
  • src/Aspire.Cli/Resources/AgentCommandStrings.Designer.cs: Generated file
  • src/Aspire.Cli/Resources/DoctorCommandStrings.Designer.cs: Generated file

Review effort: Balanced

Keep the source explanation and trust warning expectations from #22271 and drop the obsolete local skill copy warning removed by #22080.

Co-authored-by: Copilot App <[email protected]>
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the opt-in legacy skill-copy cleanup backport.

No open issues 🎉

2 resolved since last review
2 files not reviewed
  • src/Aspire.Cli/Resources/AgentCommandStrings.Designer.cs: Generated file
  • src/Aspire.Cli/Resources/DoctorCommandStrings.Designer.cs: Generated file

Review effort: Balanced

foreach (var directory in directories)
// Older CLIs left no ownership stamp, so the directory name is the only signal.
var path = Path.GetFullPath(Path.Combine(skillsDirectory, name));
if (Directory.Exists(path))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder what else can we do here to avoid the case where the skill was a user-authored one where name clashed, as for now we are just deleting their skills in this particular case. It may be the best thing we can do anyway, but just something to think about.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I'm honestly not sure it's worth fixing. Older copies have no ownership marker, so the folder name is all we have. We could technically compare files against hashes from every skills release, but older CLIs never checked for custom changes either: updating the skills just overwrote whatever was in these folders. So deleting here doesn't add much risk compared to what users already had, and it still only happens after the prompt or an explicit --remove-skill-copies.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

…pies

List each copied skill folder's files and warn that deletion includes user changes, both when prompting and when --remove-skill-copies is passed. Report plugin configuration before the deletion warning and summarize deletions with a count.

Co-authored-by: Copilot App <[email protected]>
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The recursive preview follows directory symlinks and junctions, potentially traversing shared checkouts and causing excessive output and long delays before confirmation.

1 open issue
2 files not reviewed
  • src/Aspire.Cli/Resources/AgentCommandStrings.Designer.cs: Generated file
  • src/Aspire.Cli/Resources/DoctorCommandStrings.Designer.cs: Generated file

Review effort: Balanced

Recursive enumeration follows directory symlinks and junctions, so a link inside a copied skill folder made the preview list its target's files even though deletion removes only the link.

Co-authored-by: Copilot App <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

3 / 101 PR test projects · 4 PR jobs, from 53 changed files.

Selected PR test projects (3 / 101)

Aspire.Cli.EndToEnd.Tests, Aspire.Cli.Tests, Infrastructure.Tests

Selected PR jobs (4)

cli-starter-validation, extension-e2e, polyglot, typescript-api-compat


How these were chosen — grouped by what changed

📦 affected project Aspire.Cli
→ 1 test: Aspire.Cli.EndToEnd.Tests

🔧 src/Aspire.Cli/Resources/AgentCommandStrings.resx (changed source)
→ 1 directly: Infrastructure.Tests

🔧 src/Aspire.Cli/Resources/DoctorCommandStrings.Designer.cs (changed source)
→ 1 via the project graph: Aspire.Cli.EndToEnd.Tests

🔧 src/Aspire.Cli/Resources/DoctorCommandStrings.resx (changed source)
→ 1 directly: Infrastructure.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/AgentCommandTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.EndToEnd.Tests/DoctorCommandTests.cs (changed test)
→ 1 directly: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.Tests/Agents/LocalAspireSkillsTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Commands/AgentInitClientSelectionTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Commands/AgentInitCommandTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Commands/InitCommandTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Commands/NewCommandTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Snapshots/DoctorCommandTests.DoctorCommand_HumanReadable_IncludesStaticSkillsGuidance.verified.txt (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Snapshots/DoctorCommandTests.DoctorCommand_Json_IncludesStaticSkillsGuidance.verified.json (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Snapshots/InitCommandTests.InitCommand_Help_ShowsFileBasedOption.verified.txt (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Utils/AspireSkillsCheckTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

Job reasons

Job Triggered by
cli-starter-validation affected project Aspire.Cli
extension-e2e • src/Aspire.Cli/Agents/AspireSkills/LocalAspireSkills.cs, src/Aspire.Cli/Agents/ClaudeCode/ClaudeCodeAgentClient.cs, src/Aspire.Cli/Agents/Copilot/CopilotAgentClient.cs, src/Aspire.Cli/Agents/IAgentClient.cs, src/Aspire.Cli/Agents/OpenCode/OpenCodeAgentClient.cs, src/Aspire.Cli/Commands/AgentInitCommand.cs, src/Aspire.Cli/Commands/DoctorCommand.cs, src/Aspire.Cli/Commands/InitCommand.cs, src/Aspire.Cli/Commands/McpInitCommand.cs, src/Aspire.Cli/Commands/NewCommand.cs, src/Aspire.Cli/Resources/AgentCommandStrings.Designer.cs, src/Aspire.Cli/Resources/AgentCommandStrings.resx, src/Aspire.Cli/Resources/DoctorCommandStrings.Designer.cs, src/Aspire.Cli/Resources/DoctorCommandStrings.resx, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.cs.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.de.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.es.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.fr.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.it.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.ja.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.ko.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.pl.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.pt-BR.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.ru.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.tr.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.zh-Hans.xlf, src/Aspire.Cli/Resources/xlf/AgentCommandStrings.zh-Hant.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.cs.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.de.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.es.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.fr.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.it.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.ja.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.ko.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.pl.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.pt-BR.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.ru.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.tr.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.zh-Hans.xlf, src/Aspire.Cli/Resources/xlf/DoctorCommandStrings.zh-Hant.xlf, src/Aspire.Cli/Utils/EnvironmentChecker/AspireSkillsCheck.cs, src/Aspire.Cli/Utils/EnvironmentChecker/EnvironmentCheckResult.cs
• affected project Aspire.Cli
polyglot affected project Aspire.Cli
typescript-api-compat affected project Aspire.Cli

Selection computed for commit 9ff6e80.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed for a linked-directory preview edge case that can enumerate external files before link validation, causing excessive output and delays before confirmation.

No open issues 🎉

1 resolved since last review
2 files not reviewed
  • src/Aspire.Cli/Resources/AgentCommandStrings.Designer.cs: Generated file
  • src/Aspire.Cli/Resources/DoctorCommandStrings.Designer.cs: Generated file

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@joperezr
Jose Perez Rodriguez (joperezr) merged commit ada71fb into release/17.0 Nov 17, 2026
432 of 436 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.0 milestone Nov 17, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

excluded → base_branch_is_release, title_release_prefix. This is a manual backport of #22080 to release/17.0 (title prefixed [release/17.0], body "Manual backport of ..."), so docs belong with the original forward PR. Triggered signals (4): cli_command_file_changed, cli_option_added (--remove-skill-copies in AgentInitCommand.cs), cli_resource_strings_changed, pr_body_has_cli_flag_mention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants