Skip to content
Agentmart
Submit a tool

audit-dirty-memories

随机抽检 default memory 的长期记忆,回溯 source_ref 原始上下文,识别疑似脏记忆并向用户汇报证据。

Skill by namei32

IndexedMIT
Write a review

Chalk Labs

Need help deploying audit-dirty-memories?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/namei32-audit-dirty-memories

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

随机抽检 default memory 的长期记忆,回溯 source_ref 原始上下文,识别疑似脏记忆并向用户汇报证据。

Use cases: security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/audit-dirty-memories

What's inside

Skill name
audit-dirty-memories
Description
随机抽检 default memory 的长期记忆,回溯 source_ref 原始上下文,识别疑似脏记忆并向用户汇报证据。
License
MIT
Instructions
177 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (2)

  • SKILL.md
  • sample_memory_for_audit.py · scripts/

SKILL.md (first lines)

# Audit Dirty Memories

## 目标

随机抽检一条尚未审计、且带 `source_ref` 的 default memory 长期记忆。

如果原始上下文与记忆摘要一致,静默记录“已审计”并结束本轮。
如果原始上下文不能支持该摘要,或摘要明显把提问、计划、否定、条件写错成事实,
向用户说明这条记忆为什么可疑,并给出证据,等待用户在被动回复链路里纠正。

这个 skill 只做调查和汇报,不做 `forget_memory` 或 `memorize`。

## 状态来源

```text
default_memory:audit-dirty-memories
├─ scratchpad
│  └─ 自然语言前情:上一轮做到哪一步、下次怎么接
├─ cursor
│  └─ 结构化游标:active_memory_id / source_ref / summary / stage
└─ journal
   └─ append-only 记录:entry_type=memory_audited 的已审计 memory_id
```

- `local_context.cursor` 是未完成候选的结构化来源。
- `local_context.journal_recent` 只用于快速了解最近审计结果。
- 已审计去重由固定脚本读取 Drift `skill_journal` 完成。
- 不读取、不创建 `history.json`、`state.json`、`audited.md`。

## 固定脚本

```bash
python3 skills/audit-dirty-memories/scripts/sample_memory_for_audit.py sample --drift-dir .
```

脚本只做抽样:读取 `skill_journal` 里 `entry_type=memory_audited` 的 key,
查询 `../memory/memory2.db`,排除已审计项后返回 1 条候选。

## 工作流程

```text
run
├─ 读 local_context.cursor
│  ├─ 有 active_memory_id -> 继续这条候选
│  └─ 没有 -> shell sample
├─ fetch_messages(source_ref, context=10)
├─ 判断 clean / suspicious_reported / unverifiable_old_source
├─ 必要时 message_push
└─ finish_drift
   ├─ scratchpad_update: 自然语言接续
   ├─ cursor_update: 清空或保留 active 候选
   └─ journal_append: memory_audited
```

1. 先看 `select_skill` 返回的 `local_context.cursor`。
   - 如果有 `active_memory_id`,继续审计这条候选。
   - 如果没有,运行固定抽样命令。
2. 抽样命令:

```json
{
  "command": "python3 skills/audit-dirty-memories/scripts/sample_memory_for_audit.py sample --drift-dir .",
  "cwd": ".",
  "description": "抽样一条待审计记忆",
  "timeout": 60,
  "yield_time_ms": 30000
}
```

3. 如果脚本返回 `{"found": false}`:
   - `finish_drift(status="waiting", message_result="silent")`
   - `briefing` 写“没有可审计候选”
   - `scratchpad_update` 写“等待出现新的、带 source_ref 且尚未审计的 default memory 记忆”
   - `cursor_update` 写 `{"next_action": "sample"}`
4. 如果脚本返回候选,记录 `memory_id`、`memory_type`、`summary`、`source_ref`、`happened_at`。
5. 用 `fetch_messages` 读取原始上下文:
   - `source_ref` 直接传候选的完整值。
   - `context` 固定为 `10`。
   - 如果 `source_ref` 是 JSON 列表字符串,整段原样传给 `fetch_messages`,不要拆开。
   - 如果候选意外仍是 `@post_response` 旧 source,视为 `unverifiable_old_source`。
6. 只做高置信判断:
   - 原文只是提问或讨论,摘要却写成已知事实。
   - 原文只是计划或意图,摘要却写成已经发生。
   - 原文明显是否定,摘要却写成肯定。
   - 原文有明显条件或时间限制,摘要却丢失了限制。
   - 摘要的主体、时间、结果与原文明显冲突。
7. 不要把下面情况报成脏记忆:
   - 摘要只是更短。
   - 省略了不重要细节。
   - 表达方式不同但核心事实一致。
   - 只是感觉奇怪但拿不准。

## 收尾要求

clean 或 unverifiable_old_source:

```json
{
  "skill_used": "default_memory:audit-dirty-memories",
  "status": "completed",
  "briefing": "审计 memory_id=...,结果 clean",
  "message_result": "silent",
  "scratchpad_update": "刚审计 memory_id=...,结果 clean;下次继续随机抽样。",
  "cursor_update": {
    "active_memory_id": null,
    "source_ref": null,
    "summary": null,
    "stage": null,
    "next_action": "sample"
  },
  "journal_append": [
    {
      "entry_type": "memory_audited",
      "key": "...",
      "payload": {
        "result": "clean",
        "source_ref": "...",
        "summary": "..."
      }

From namei32/roxy-agent, MIT.

More from namei32/roxy-agent

Signals

Stars
0
Forks
1
Open issues
0
Last commit (this folder)
Aug 7, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from namei32

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get audit-dirty-memories running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying audit-dirty-memories?

CallGet help
Cite this page

audit-dirty-memories skill. Agent Mart. https://agentmart.dev/skills/namei32-audit-dirty-memories (last updated 2026-10-24)