AGENT SKILL

Microsoft 应用删除

delete-app

通过 `ms app delete` 删除 Microsoft 应用。当用户要求删除应用时使用;务必要求明确确认。

License 许可
MIT
最近更新
2026-11-06
Stars
★ 36
Forks
12

01 前言 Front Matter

name
delete-app
description
Deletes a Microsoft App via `ms app delete`. Use when the user asks to delete an app; always require explicit confirmation.
allowed-tools
Read Grep Glob Bash AskUserQuestion

03 SKILL.md 正文

? Shared Instructions: shared-instructions.md — Cross-cutting concerns. Two confirmations required; never auto---force.

Delete App

Removes the app from the service. The local workspace is NOT deleted by this skill — the user can clean it up afterward (this skill suggests the command but doesn't run it).

Workflow

  1. Memory Bank → 2. Resolve App ID → 3. Verify with Show → 4. First Confirmation → 5. Try Non-Force Delete → 6. If Service Says Force Required: Second Confirmation → 7. Suggest Local Cleanup → 8. Update Memory Bank

Step 1: Check Memory Bank

Read memory-bank.md for app slug + GUID + environment.

Step 2: Resolve App ID

test -f ms.config.json && APP_ID=$(node -p "require('./ms.config.json').appId" 2>/dev/null) || true

If no ms.config.json, ask the user for the app slug or GUID. Optionally invoke /list-apps to discover.

Step 3: Verify with Show

Before the destructive call, fetch the app metadata so the user sees what they're about to delete:

BIN=ms
$BIN app show --app "$APP_ID" --json

Display: display name, slug, app GUID, environment, version, creation date, last modified, share count if available.

Step 4: First Confirmation

"About to delete the app <display-name> (slug <slug>, GUID <guid>) from environment <env-name>. This removes the app from the service for all users — playing the app stops working immediately. Continue?"

Wait for explicit yes. If no, STOP — do not delete.

Step 5: Try Non-Force Delete

$BIN app delete --app "$APP_ID" --non-interactive

ms app delete is idempotent: if the app is already gone (HTTP 204) it emits a warning rather than erroring. Treat both existed: true and existed: false outcomes as success.

Step 6: If Service Says Force Required

If the service returns a non-2xx with a message like "delete requires --force" (the app has active shares, child resources, etc.), DO NOT auto-add --force. Instead, ask a second confirmation:

"The service requires --force to delete this app. Reason from the service: <verbatim message>. Adding --force will remove the app and any associated state (shares, etc.) immediately. Are you sure?"

Wait for an explicit second yes. Only then:

$BIN app delete --app "$APP_ID" --force --non-interactive

Never short-circuit the two confirmations into one. The service's --force requirement is the signal that downstream state will be affected.

Step 7: Suggest Local Cleanup

After successful delete, surface (do NOT run automatically):

App removed from service.

To clean up local workspace:
  cd ..
  rm -rf <project-dir>

Or keep the workspace if you intend to recreate / re-link to a new app.

Step 8: Update Memory Bank

If memory-bank.md exists, append a "Deleted" note with the timestamp and the app GUID, but do NOT delete the memory bank itself — the user may want the history.


Failure Modes

Error Action
App '<id>' not found in environment '<env>' Idempotent path — the app is already gone. Emit a success note and update memory bank (mark deleted).
403 not authorized The account doesn't have Owner permissions on the app. Surface the error; suggest $BIN app share review or a different account.
5xx from the service Transient. Retry once after 5s; if still failing, STOP and surface verbatim — do not loop.

04 同仓库更多 Skills

microsoft
microsoft/managed-apps

Microsoft 托管应用状态与附件管理

state

使用 `ms project state` CLI schema 命令和生成的 TypeScript 客户端,存储与查询 Microsoft 托管应用的内置状态和文件附件。首先,在用户登录 CLI 后运行 `ms feature status --name state --json`;如果 `feature.enabled` 不为 `true`,则推荐替代的连接器或数据源。

软件开发工程师低代码应用开发
★ 36
microsoft
microsoft/managed-apps

Microsoft 应用共享与访问控制

share

通过 `ms app share` / `ms app unshare` 与用户共享(或取消共享)Microsoft 应用。在需要更新应用访问控制时使用。

IT 管理员身份与访问管理
★ 36
microsoft
microsoft/managed-apps

Microsoft App 共享链接管理

share-link

通过 `ms app share link create`、`ms app share link list` 和 `ms app share link revoke` 管理 Microsoft App 的租户级共享链接。适用于希望通过 URL(而非指定主体)来分发应用访问权限的场景。

软件开发工程师身份与访问管理
★ 36
microsoft
microsoft/managed-apps

Microsoft App 浏览器预览

play

通过 `ms app play` 在浏览器中打开 Microsoft App。适用于打开已部署的线上版本或云端托管的预览版本(主分支或特定提交 SHA),而无需启动本地开发服务器。

软件开发工程师开发环境与工具链管理
★ 36
microsoft
microsoft/managed-apps

可用连接器列表查询

list-connectors

列出当前活动环境中可用的连接器——包括每个连接器是被组织策略允许还是阻止——以及已接入 Microsoft App 的连接绑定数据源。适用于在添加数据源之前发现可用的连接器及其操作。

软件开发工程师应用连接器集成
★ 36
microsoft
microsoft/managed-apps

Microsoft 应用列表查询

list-apps

通过 `ms app list --json` 以及可选的 `ms app show --json` 发现活动环境中的受管理应用。在列出或定位应用时使用。

软件开发工程师Microsoft 应用生命周期管理
★ 36