archive-protocol

archive-protocol is a skill for Claude Code, Codex from UnicomAI/wanwu. It costs 87 tokens per session (1,361 once invoked), scanned A, original, Apache-2.0.

An archiving procedure for files created during a task, including plans, reports, summaries, and JSON results.

In plain words
What is it for?
Use it whenever a task creates files that must be archived with session, timestamp, path, and completion records.
Why use it?
It ensures generated work is moved into a designated archive and checked after saving.

Skill for Claude CodeCodex

About the project

Wanwu is an enterprise platform for building AI agents, workflows, retrieval-augmented applications, and managing models in multi-tenant environments. It is designed for developers and enterprise teams delivering AI applications and integrations. The catalogue entries provide skills and agents for using the platform.

UnicomAI/wanwu · 2,456 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/unicomai/wanwu/archive-protocol
Any agent
npx skills add UnicomAI/wanwu --skill archive-protocol
Clone the repo
git clone --depth 1 https://github.com/UnicomAI/wanwu

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for archive-protocol

README.md
[![agentmods](https://agentmods.dev/badge/skills/unicomai/wanwu/archive-protocol.svg)](https://agentmods.dev/skills/unicomai/wanwu/archive-protocol)
Your own site
<a href="https://agentmods.dev/skills/unicomai/wanwu/archive-protocol"><img src="https://agentmods.dev/badge/skills/unicomai/wanwu/archive-protocol.svg" alt="Measured on agentmods" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,361 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00087 $0.01361
Opus 5 $0.00044 $0.00681
Sonnet 5 $0.00017 $0.00272
Haiku 4.5 $0.00009 $0.00136

Measured 2d ago against content hash 267de1f53596, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

archive-protocol scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

configs/microservice/bff-service/configs/agent-skills/ontology/archive-protocol/SKILL.md · 95 lines

How it starts

The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.

全局归档协议

只要当前任务需要写入任何文件,就必须执行本协议。

归档物包括但不限于:PLAN.mdreport.mdsummary.mdresult.jsonnotes.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):
    • 单个文件归档
      {
        "name": "archive",
        "arguments": {
          "kind": "file",
          "sourcePath": "result.json"
        }
      }
      
    • 整个目录归档(推荐用于多文件结果)
      {
        "name": "archive",
        "arguments": {
          "kind": "file",
          "sourcePath": "my_results_folder"
        }
      }
      
  3. 后续操作:归档成功后,工作区原文件/目录已删除。若需再次查看或编辑,必须使用工具返回的 JSON 卡片中的 subpatharchive_root 拼接出的完整路径 访问归档区文件。
  4. 异常处理:工具返回错误提示(如 Archive blocked)时须立刻停止归档流程,引用错误原因告知用户并等待下一步指示;禁止在失败后自行补写文件或回执。

Read the full file on GitHub · 95 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 95 lines · 87 tokens per session scan A 267de1f53596

Subscribe to this mod's changes

archive-protocol is a skill published in the GitHub repository UnicomAI/wanwu (2,456 stars, last pushed yesterday), licensed Apache-2.0. It adds 87 tokens to every session and 1,361 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.