Files
market/skills/delete-agent/SKILL.md
Yige 22b128f185 feat(skills): 独立维护智能体生命周期操作说明 (#90)
## 中文

### 变更
- 新增 `clone-agent` 内置 Skill,覆盖私有数据复制和团队分发边界
- 将 Smart routing、reasoning、头像和确认流程迁入 action-specific Skills
- 修正 `update-agent` 与当前 ManageAgent 白名单的漂移
- 保持所有市场 Skill 按需加载,并加入 builtin 清单

### 验证
- `uv run --quiet scripts/i18n/test_validate_i18n.py`
- `uv run --quiet scripts/i18n/validate-i18n.py`
- `uv run --quiet scripts/i18n/translate.py --check`
- 公共信息边界检查通过

## English

### Changes
- Add the built-in `clone-agent` Skill for private-data copy and
team-distribution boundaries
- Move Smart routing, reasoning, avatar, and confirmation workflows into
action-specific Skills
- Align `update-agent` with the current ManageAgent configuration
whitelist
- Keep every marketplace Skill on-demand and add the new Skill to the
built-in manifest

### Verification
- `uv run --quiet scripts/i18n/test_validate_i18n.py`
- `uv run --quiet scripts/i18n/validate-i18n.py`
- `uv run --quiet scripts/i18n/translate.py --check`
- Public information boundary review passed
2026-08-25 16:13:09 +08:00

5.8 KiB
Raw Blame History

name, description, version, type, risk_level, status, disable-model-invocation, tags, metadata, market
name description version type risk_level status disable-model-invocation tags metadata market
delete-agent 安全删除指定的智能体及其关联数据。删除前会验证智能体状态支持可选地删除所有会话历史。Use when 用户需要删除不再使用的智能体。 2.6.0 meta high enabled true
agent
deletion
meta
author updated_at i18n
desirecore 2026-08-25
default_locale source_locale locales zh-CN en-US
en-US zh-CN
zh-CN
en-US
name short_desc description body source_hash translated_by
删除智能体 安全删除智能体及其关联数据,支持多重确认与可选历史清理 安全删除指定的智能体及其关联数据。删除前会验证智能体状态支持可选地删除所有会话历史。Use when 用户需要删除不再使用的智能体。 ./SKILL.zh-CN.md sha256:b401869e91222236 human
name short_desc description body source_hash translated_by
Delete Agent Safely delete an Agent and its associated data, with multi-step confirmation and optional history cleanup Safely delete a specified Agent and its associated data. Verifies the Agent's state before deletion and optionally removes all session history. Use when the user needs to delete an Agent that is no longer in use. ./SKILL.md sha256:b401869e91222236 human
icon category maintainer compatible_agents channel required_client_version
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><defs><linearGradient id="da2-a" x1="2" y1="7" x2="16" y2="21" gradientUnits="userSpaceOnUse"><stop stop-color="#FF9500"/><stop offset="1" stop-color="#FF3B30"/></linearGradient></defs><circle cx="9" cy="7" r="4" fill="url(#da2-a)" fill-opacity="0.15" stroke="url(#da2-a)" stroke-width="1.5"/><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" fill="url(#da2-a)" fill-opacity="0.1" stroke="url(#da2-a)" stroke-width="1.5"/><circle cx="19" cy="11" r="4" fill="#FF3B30" fill-opacity="0.12"/><line x1="16.5" y1="11" x2="21.5" y2="11" stroke="#FF3B30" stroke-width="2" stroke-linecap="round"/></svg> productivity
name verified
DesireCore Official true
latest 10.0.90

delete-agent skill

L0: One-Sentence Summary

Safely delete a specified Agent and its associated data (filesystem, in-memory state, optional conversation history).

L1: Overview

Meta-skill: list candidates → confirm intent (irreversible) → ask whether to delete history → execute via ManageAgent(action='delete'). Use it to clean up Agents that are no longer used, test/experimental, or need storage reclaimed. Its value is what the tool can't give: candidate filtering with status guidance, and intent confirmation before deletion. The tool guarantees the multi-way refusals (core agent / self / active state) and team cascading.

L2: Detailed Spec

Flow: list deletable Agents → confirm intent and target → ask whether to delete history → execute → receipt.

Stage 1: List Candidates

When the user hasn't named a specific Agent, fetch the list with ManageAgent(action='list') and group by status: offline / error are safe to delete; online / busy / recovery are marked "stop first" (the tool will refuse them) and excluded from the rest of the flow. For details, use ManageAgent(action='get', id). E.g.:

Deletable: Legal Advisor (legal-assistant, offline), Test Bot (test-bot, offline)
Stop first: Data Analyst (data-analyst, online)

Stage 2: Confirm Intent

Confirm the target Agent (name/ID) with the user, explicitly state it is irreversible (config, skills, tools will be permanently deleted), show basic info, and wait for confirmation.

Stage 3: Ask About Deletion Options

Ask whether to also delete all of the Agent's conversation history: yes → deleteRuns=true; no → deleteRuns=false (default, omittable, keeps history).

Stage 4: Execute Deletion

Before the call, reconfirm the target and the deleteRuns choice. The tool submits deletion to the current approval chain; whether an additional dialog appears depends on the caller's approval mode. Do not promise that a dialog will appear unless an approval event is actually shown. Execute:

ManageAgent(action='delete', id='legal-assistant', deleteRuns=true)

After confirmation the deletion completes, including team cascading: a team whose supervisor is the target is disbanded; membership is removed where the target is a member.

Stage 5: Receipt

From the tool's return (cleaned paths, deleted run count, memory-cleanup details), produce a user-friendly report (no internal paths), e.g. " Deleted XXX; cleaned filesystem / scheduler / subscriptions / MCP / N conversation records / team cascade".

Deletion Scope and Boundaries

  • Always deleted: AgentFS directory (config/persona/rules/skills/tools/memory), user preference data, in-memory state (scheduler/queue/message subscriptions/MCP connections), registry entry. Optionally deleted (deleteRuns=true): conversation history and topic index. Team cascade (automatic): supervisor → disband team, member → remove. Kept: other Agents, user config, global settings, market cache.
  • Explain tool refusals to the user with a next step: the core agent (desirecore / core / bound UUID) cannot be deleted; the caller can't delete itself; active state (online/busy/recovery) needs stopping in the UI first or waiting until idle; a non-existent ID means the Agent is already gone or the ID is wrong.
  • Always done via ManageAgent (action='list' | 'get' | 'delete'). Deletion is high risk: complete this skill's explicit intent confirmation first, then follow the approval result returned by the tool.