360 Secure SkillHub
360 安全技能中心

Memory Sync Protocol

将记忆或规则变更按四类分流写入 TOOLS.md、MEMORY.md、AGENTS.md 与 memory/YYYY-MM-DD.md:执行细节入 TOOLS,高层偏好入 MEMORY,治理规则入 AGENTS,当日事件入日志;随后以语义化信息提交 Git,并返回包含更新文件、关键规则与提交信息的同步报告。

markisadesigner1992-eng
markisadesigner1992-eng
热度 81.53
最近更新 2026-05-11 17:28:50
分类:知识依赖:读写文件 / 代码执行应用场景:笔记整理 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add memory-sync-protocol
Metadata
name
memory-sync-protocol
description
Synchronize durable behavior or preference changes across TOOLS.md, MEMORY.md, AGENTS.md, and memory/YYYY-MM-DD.md with one consistent workflow. Use when user says to remember/update rules, skill routing, defaults, operating conventions, or asks for "sync across files" / "记住并同步" / "更新记忆治理".

Memory Sync Protocol

When this skill is triggered, execute the following sequence strictly.

1) Classify the change

  • Execution detail (tool/profile/path/routing trigger) → TOOLS.md
  • Long-term stable preference (high-level) → MEMORY.md
  • Governance/process rule (how to maintain) → AGENTS.md
  • Event log / audit trail (what changed today) → memory/YYYY-MM-DD.md

2) Update files with minimal duplication

  • Write detailed routing/trigger logic in TOOLS.md.
  • Write only high-level summary in MEMORY.md.
  • Avoid copying large sections between files.
  • If adding a new policy, also add short maintenance note in AGENTS.md.

3) Append daily log

  • In memory/YYYY-MM-DD.md, record:
    • what changed,
    • why,
    • affected files.

4) Git discipline

  • Before major rewrites: create a backup commit.
  • After updates: commit with semantic message, e.g.
    • docs(routing): ...
    • docs(memory): ...
    • chore(memory): ...

5) Reply format

Return a concise sync report:

  • Updated files
  • Key rules added/changed
  • Commit hash/message

Guardrails

  • Do not store sensitive secrets in MEMORY/TOOLS unless user explicitly asks.
  • Do not bloat MEMORY with skill inventories or transient logs.
  • Prefer TOOLS for concrete calling rules; MEMORY for durable preference only.