360 Secure SkillHub
360 安全技能中心

Memory Audit Guardian

这是专为OpenClaw打造的内存治理审计工具,核心对SOUL.md等核心文件做结构化审计,覆盖角色边界、内存大小与token预算、QMD路由、检索规范四大维度。适用于用户需审计优化内存质量、降token开销、验证角色边界、检查QMD路由或定期健康检查的场景。输出含评分、风险、修复建议的规范周报,提供可落地行动方案。

markisadesigner1992-eng
markisadesigner1992-eng
热度 76.08
最近更新 2026-05-11 17:28:50
分类:安全依赖:读写文件 / 内部调用大模型应用场景:报告撰写 / 任务管理

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add memory-audit-guardian
Metadata
name
memory-audit-guardian
description
Weekly memory governance audit for OpenClaw. Use when user asks to audit/optimize memory quality, reduce token overhead, verify MEMORY/TOOLS/AGENTS role boundaries, validate QMD routing quality, or run a periodic memory health check.

Memory Audit Guardian

Run a structured memory-system audit and output an actionable weekly report.

Audit Scope

  1. File-role boundaries
    • SOUL: persona only
    • USER: user profile only
    • MEMORY: durable high-value facts only
    • daily memory: event logs
    • TOOLS: execution rules
    • AGENTS: governance/policy
  2. Size & token budget
    • Core files total target: 8-10KB (soft target)
    • MEMORY.md warning threshold: >3KB
  3. QMD routing quality
    • Ensure MEMORY contains only QMD entry + protocol + 20-40 anchors
    • Reject full keyword dumps in MEMORY
  4. Retrieval discipline
    • top-k 3-5 snippets
    • no full-document dump unless explicitly requested

Procedure

  1. Read core files: SOUL.md, USER.md, MEMORY.md, TOOLS.md, AGENTS.md
  2. Compute file sizes and detect threshold breaches
  3. Detect duplication/conflict across files
  4. Check MEMORY for noise patterns (long lists, stale one-offs)
  5. Verify QMD routing fields exist and are minimal
  6. Produce report with:
    • score (A/B/C)
    • risks
    • fixes this week
    • add-3/remove-3 keyword suggestions

Output Format

  • Executive summary (5 lines max)
  • Findings:
    • role-boundary issues
    • size/token risks
    • QMD routing issues
  • Action plan (this week)
  • Report path suggestion: memory/memory-audit-YYYY-WW.md

Guardrails

  • Do not overwrite user files without explicit request.
  • Prefer append/update with minimal edits.
  • Keep MEMORY concise; move detail to references or daily logs.