archive-protocol
The archive-protocol skill enforces a mandatory global file archival system for all generated outputs including PLAN.md, reports, JSON files, and code projects. Use this skill whenever a task requires writing any deliverable files by executing a standardized workflow that automatically moves completed work from the temporary workspace into a timestamped archive directory, validates the transfer through read-back verification, and outputs status confirmation in a JSON code block.
git clone --depth 1 https://github.com/UnicomAI/wanwu /tmp/archive-protocol && cp -r /tmp/archive-protocol/configs/microservice/bff-service/configs/agent-skills/ontology/archive-protocol ~/.claude/skills/archive-protocolSKILL.md
# 全局归档协议
只要当前任务需要写入任何文件,就必须执行本协议。
归档物包括但不限于:`PLAN.md`、`report.md`、`summary.md`、`result.json`、`notes.md`。
## 【身份文件】
若任务需要人格/身份设定,只认:
- `SOUL.md`
- `IDENTITY.md`
未确认可读或已注入上下文前,不得声称「已成功读取」。
# 归档协议 (Archive Protocol)
## 【核心规则:必须全量归档】
**所有生成的成果性内容(无论是单个文件还是整个目录/文件夹),在任务完成后必须彻底搬移(Move)至归档区。**
工作区(Workspace)仅作为临时加工场,任务结束后的合规状态是:**工作区不留任何生成物,全部进入 `archives/`。**
## 【绝对路径硬性边界】
**所有文件(包括工作区临时文件、PLAN.md、归档物、报告、JSON 等)的保存路径必须落在以下根目录之下,禁止越界:**
```
/home/root/workspace/{WORKSPACE_ID}/workspace/
```
- `{WORKSPACE_ID}` 由当前会话上下文给定,由 `archive` 工具拼接,**不得手填、不得使用其它前缀**。
- 工作区与归档区都必须以该绝对前缀开头:
- 工作区临时文件:`/home/root/workspace/{WORKSPACE_ID}/workspace/<相对路径>`
- 归档区文件:`/home/root/workspace/{WORKSPACE_ID}/workspace/archives/{ARCHIVE_ID}/...`
- 任何写入到该前缀**之外**的路径(如 `/tmp/...`、`/root/...`、`./xxx`、其它绝对路径)都视为越界,必须立即终止并报错;禁止用软链接、相对路径 `..` 跳出该根。
- `archive` 工具返回卡片中的 `archive_root` 必须以 `/home/root/workspace/` 开头;不满足则视为执行异常。
## 【归档路径规则】
路径执行双轨制,严禁混淆,并且**只能**由 `archive` 工具写入。**注意:归档操作会将文件或目录从工作区物理搬移(Move)至归档区,原位置将不再存在。**
1. **计划文件(PLAN.md 专属)**:工具参数 `{"kind":"plan","sourcePath":"PLAN.md"}`。归档后,如需修改计划,应**直接编辑** `archives/{ARCHIVE_ID}/PLAN.md`(绝对路径:`/home/root/workspace/{WORKSPACE_ID}/workspace/archives/{ARCHIVE_ID}/PLAN.md`)。
2. **普通归档物(单个文件或整个目录)**:工具参数 `{"kind":"file","sourcePath":"result_dir"}`。支持归档单个文件或包含多个文件的目录。
## 【目录归档模式】
当你的输出包含多个文件(如前端项目、代码包、多份分析报告)时,**必须执行以下流程**:
1. 在工作区创建一个专用文件夹(如 `output/`),位置必须在 `/home/root/workspace/{WORKSPACE_ID}/workspace/` 之下。
2. 将所有相关文件放入该文件夹。
3. **调用 `archive` 工具对整个文件夹进行归档**(`sourcePath` 指向文件夹路径)。
4. 归档成功后,整个文件夹及其内容将移入 `archives/{ARCHIVE_ID}/{TIMESTAMP}/`(绝对路径:`/home/root/workspace/{WORKSPACE_ID}/workspace/archives/{ARCHIVE_ID}/{TIMESTAMP}/`)。
## 【写入后强制校验】
任何归档文件写入后,必须立即回读校验。未完成校验前,不得声称「已成功归档」。调度 `archive` 工具会在写入后自动回读并输出状态卡片。
## 输出
请在最终输出的结尾,把archive工具的输出卡片也输出出来。必须以markdown的json代码块输出。
## 【工具执行指引】
**所有归档物生成都必须通过 `archive` 工具** 完成;禁止直接写 `archives/` 目录。推荐流程:
1. **准备源文件**:在工作区临时目录编写内容。
2. **调用工具**(工具会自动解析 session,生成 `TIMESTAMP`):
- **单个文件归档**:
```json
{
"name": "archive",
"arguments": {
"kind": "file",
"sourcePath": "result.json"
}
}
```
- **整个目录归档(推荐用于多文件结果)**:
```json
{
"name": "archive",
"arguments": {
"kind": "file",
"sourcePath": "my_results_folder"
}
}
```
3. **后续操作**:归档成功后,工作区原文件/目录已删除。若需再次查看或编辑,**必须使用工具返回的 JSON 卡片中的 `subpath` 或 `archive_root` 拼接出的完整路径** 访问归档区文件。
4. **异常处理**:工具返回错误提示(如 `Archive blocked`)时须立刻停止归档流程,引用错误原因告知用户并等待下一步指示;禁止在失败后自行补写文件或回执。万悟平台 SSE 子会话递归嵌套与三明治序列渲染架构指南。涵盖 parentId 领养、order 绝对排序、动静 Chunk 分层及 Vue 2 响应式引用协议。
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
Build apps with the Claude API or Anthropic SDK. TRIGGER when: code imports `anthropic`/`@anthropic-ai/sdk`/`claude_agent_sdk`, or user asks to use Claude API, Anthropic SDKs, or Agent SDK. DO NOT TRIGGER when: code imports `openai`/other AI SDK, general programming, or ML/data-science tasks.
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.