docs(update-agent): 改名改用 Edit 同步 agent.json 与 persona.md 标题 (#43)

## 变更 / Changes

update-agent 技能:纯改名场景改为用 **Edit 工具同时更新两个文件**——`agent.json` 的 `name` 字段 与
`persona.md` 的首行标题(`# 名称`),避免两者脱节;并强调不实际编辑文件不得声称已改名。

The update-agent skill now instructs: for a pure display-name change,
use the **Edit tool to update both files** — the `name` field in
`agent.json` and the first-line title heading (`# Name`) in `persona.md`
— so the display name and persona title never fall out of sync. Also
emphasizes never claiming a rename is done without actually editing the
files.

## 背景 / Context

此前改名只改了 `agent.json` 的 name,`persona.md`
标题残留旧名(显示名与人格文档脱节);且模型有时只口头声称完成而不真正落盘。本改动通过技能引导修正这两点。

Previously renaming only touched `agent.json`'s name while
`persona.md`'s title kept the old name (desync), and the model would
sometimes claim completion without actually writing. This skill guidance
fixes both.

## 改动范围 / Scope

- `skills/update-agent/SKILL.md`(+3)
- `skills/update-agent/SKILL.zh-CN.md`(+3)
- 纯文档/技能引导改动,version 保持 3.0.4 不变

Co-authored-by: 张馨元 <zhangxy@iynss.com>
This commit is contained in:
Zxy-y
2026-07-07 22:30:26 +08:00
committed by GitHub
parent a4718379d9
commit a59f223e56
2 changed files with 7 additions and 1 deletions

View File

@@ -35,7 +35,7 @@ metadata:
description: >-
Safely update an existing Agent's config, persona, principles, skills, and memory, producing reviewable diffs that are applied and committed only after confirmation. Use when the user asks to modify Agent behavior, install/uninstall skills, adjust config, roll back changes, or revise rules.
body: ./SKILL.md
source_hash: sha256:a58c60b086945340
source_hash: sha256:a920af860d6f6a19
translated_by: human
translated_at: '2026-05-03'
market:
@@ -200,6 +200,8 @@ diff_metadata:
Apply the change by reading and writing files directly through AgentFS. **Do not call HTTP APIs, and do not operate Git directly** (version management is handled automatically by the backend).
> **Renaming an Agent's display name — you MUST edit two files to keep them in sync.** If the user wants to change the Agent's **display name** (e.g. "rename X to Y"), use the Edit tool to update **both**: (1) the `name` field in `agent.json`, and (2) the first-line title heading (`# Name`) in `persona.md`. Editing only one leaves the display name and the persona title out of sync. **Never claim the rename is done without actually editing the files** — if no edit runs, nothing changes on disk and the Agent list will not refresh.
**AgentFS root directory**: `${DESIRECORE_ROOT}/agents/<agentId>/`
**Read file**: Use the `cat` command to read the current contents of the target file.
@@ -246,6 +248,7 @@ git show <commit>:persona.md
| User Intent | Target File | AgentFS Path |
| ---------------------------- | --------------- | ---------------------------------------------- |
| **Rename (display name)** | `agent.json` **+** `persona.md` | Edit BOTH: `name` in `agent.json` AND the `# Title` first line in `persona.md` |
| Modify personality/style | `persona.md` | `${DESIRECORE_ROOT}/agents/<agentId>/persona.md` |
| Modify behavioral rules | `principles.md` | `${DESIRECORE_ROOT}/agents/<agentId>/principles.md` |
| Install/uninstall skills | `skills/` | `${DESIRECORE_ROOT}/agents/<agentId>/skills/` |