360 Secure SkillHub
360 安全技能中心

6层记忆

在指定工作区安装或修复分层记忆文件(热点状态、本地索引、决策记录、精选长期记忆)与本地维护脚本,并按用户确认添加定时执行、校验记忆层级;运行偏本地,不涉及云同步或外部上传。

ashu2025-rgb
ashu2025-rgb
热度 51.95
最近更新 2026-05-11 17:40:52
分类:知识依赖:代码执行 / 读写文件应用场景:笔记整理 / 工作流 / 自动化脚本

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add six-layer-memory
Metadata
name
six-layer-memory
description
Set up or repair a local-first six-layer memory structure for an OpenClaw/Codex workspace. Use when a user wants durable HOT/WARM/COLD/CURATED memory files, local maintenance helpers, and per-workspace memory hygiene. This public package does not include cloud sync, external API upload, secret collection, cookies, or login-state handling.
version
2.0.4

Six-Layer Memory

Use this skill when the user wants a workspace to keep memory proactively instead of relying on chat context alone.

What this skill sets up

  • HOT: memory/SESSION-STATE.md
  • WARM: local vector/index refresh when source material changes
  • COLD: memory/decisions/
  • CURATED: MEMORY.md plus daily logs
  • LOCAL-AUTO: optional local maintenance log and digest checks, with no external API calls

Workflow

  1. Pick the target workspace.
  2. Run scripts/install_workspace.sh <workspace>.
  3. Review the created files before adding any schedule.
  4. Add periodic execution only after the user confirms the schedule:
0 6 * * * /usr/bin/python3 <workspace>/memory/auto_memory_6layer.py --workspace <workspace> --daily --source memory-daily
  1. Validate with memory/check_memory_layers.sh.

Bundled scripts

  • scripts/install_workspace.sh
  • scripts/auto_memory_6layer.py
  • scripts/memory_writer.py
  • scripts/check_memory_layers.sh

Notes

  • This skill is designed per workspace. Repeat installation for each agent workspace.
  • Do not overwrite HOT state with synthetic “all good” status text.
  • Prefer one canonical HOT file path: memory/SESSION-STATE.md.
  • Keep MEMORY.md for durable facts only. Put operational notes elsewhere.
  • Do not store API keys, access tokens, cookies, login state, or customer private data in public skill files, shared templates, or examples.
  • If a user wants cloud sync, treat it as a separate private extension: explain the risks, ask for explicit confirmation, and keep keys outside the published skill.

References

  • Local-first guide: references/local-first-guide.md