← 返回 Skills 市场
impkind

ACC Error Memory

作者 ImpKind · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
1199
总下载
4
收藏
4
当前安装
1
版本数
在 OpenClaw 中安装
/install acc-error-memory
功能描述
Error pattern tracking for AI agents. Detects corrections, escalates recurring mistakes, learns mitigations. The 'something's off' detector from the AI Brain series.
使用说明 (SKILL.md)

Anterior Cingulate Memory ⚡

Conflict detection and error monitoring for AI agents. Part of the AI Brain series.

The anterior cingulate cortex (ACC) monitors for errors and conflicts. This skill gives your AI agent the ability to learn from mistakes — tracking error patterns over time and becoming more careful in contexts where it historically fails.

The Problem

AI agents make mistakes:

  • Misunderstand user intent
  • Give wrong information
  • Use the wrong tone
  • Miss context from earlier in conversation

Without tracking, the same mistakes repeat. The ACC detects and logs these errors, building awareness that persists across sessions.

The Solution

Track error patterns with:

  • Pattern detection — recurring error types get escalated
  • Severity levels — normal (1x), warning (2x), critical (3+)
  • Resolution tracking — patterns clear after 30+ days
  • Watermark system — incremental processing, no re-analysis

Configuration

ACC_MODELS (Model Agnostic)

The LLM screening and calibration scripts are model-agnostic. Set ACC_MODELS to use any CLI-accessible model:

# Default (Anthropic Claude via CLI)
export ACC_MODELS="claude --model haiku -p,claude --model sonnet -p"

# Ollama (local)
export ACC_MODELS="ollama run llama3,ollama run mistral"

# OpenAI
export ACC_MODELS="openai chat -m gpt-4o-mini,openai chat -m gpt-4o"

# Single model (no fallback)
export ACC_MODELS="claude --model haiku -p"

Format: Comma-separated CLI commands. Each command is invoked with the prompt appended as the final argument. Models are tried in order — if the first fails/times out (45s), the next is used as fallback.

Scripts that use ACC_MODELS:

  • haiku-screen.sh — LLM confirmation of regex-filtered error candidates
  • calibrate-patterns.sh — Pattern calibration via LLM classification

Quick Start

1. Install

cd ~/.openclaw/workspace/skills/anterior-cingulate-memory
./install.sh --with-cron

This will:

  • Create memory/acc-state.json with empty patterns
  • Generate ACC_STATE.md for session context
  • Set up cron for analysis 3x daily (4 AM, 12 PM, 8 PM)

2. Check current state

./scripts/load-state.sh
# ⚡ ACC State Loaded:
# Active patterns: 2
# - tone_mismatch: 2x (warning)
# - missed_context: 1x (normal)

3. Manual error logging

./scripts/log-error.sh \
  --pattern "factual_error" \
  --context "Stated Python 3.9 was latest when it's 3.12" \
  --mitigation "Always web search for version numbers"

4. Check for resolved patterns

./scripts/resolve-check.sh
# Checks patterns not seen in 30+ days

Scripts

Script Purpose
preprocess-errors.sh Extract user+assistant exchanges since watermark
encode-pipeline.sh Run full preprocessing pipeline
log-error.sh Log an error with pattern, context, mitigation
load-state.sh Human-readable state for session context
resolve-check.sh Check for patterns ready to resolve (30+ days)
update-watermark.sh Update processing watermark
sync-state.sh Generate ACC_STATE.md from acc-state.json
log-event.sh Log events for brain analytics

How It Works

1. Preprocessing Pipeline

The encode-pipeline.sh extracts exchanges from session transcripts:

./scripts/encode-pipeline.sh --no-spawn
# ⚡ ACC Encode Pipeline
# Step 1: Extracting exchanges...
# Found 47 exchanges to analyze

Output: pending-errors.json with user+assistant pairs:

[
  {
    "assistant_text": "The latest Python version is 3.9",
    "user_text": "Actually it's 3.12 now",
    "timestamp": "2026-02-11T10:00:00Z"
  }
]

2. Error Analysis (via Cron Agent)

An LLM (configured via ACC_MODELS) analyzes each exchange for:

  • Direct corrections ("no", "wrong", "that's not right")
  • Implicit corrections ("actually...", "I meant...")
  • Frustration signals ("you're not understanding")
  • User confusion caused by the agent

3. Pattern Tracking

Errors are logged with pattern names:

./scripts/log-error.sh --pattern "factual_error" --context "..." --mitigation "..."

Patterns escalate with repetition:

  • 1x → normal (noted)
  • 2x → warning (watch for this)
  • 3+ → critical (actively avoid!)

4. Resolution

Patterns not seen for 30+ days move to resolved:

./scripts/resolve-check.sh
# ✓ Resolved: version_numbers (32 days clear)

Cron Schedule

Default: 3x daily for faster feedback loop

# Add to cron
openclaw cron add --name acc-analysis \
  --cron "0 4,12,20 * * *" \
  --session isolated \
  --agent-turn "Run ACC analysis pipeline..."

State File Format

{
  "version": "2.0",
  "lastUpdated": "2026-02-11T12:00:00Z",
  "activePatterns": {
    "factual_error": {
      "count": 3,
      "severity": "critical",
      "firstSeen": "2026-02-01T10:00:00Z",
      "lastSeen": "2026-02-10T15:00:00Z",
      "context": "Stated outdated version numbers",
      "mitigation": "Always verify versions with web search"
    }
  },
  "resolved": {
    "tone_mismatch": {
      "count": 2,
      "resolvedAt": "2026-02-11T04:00:00Z",
      "daysClear": 32
    }
  },
  "stats": {
    "totalErrorsLogged": 15
  }
}

Event Logging

Track ACC activity over time:

./scripts/log-event.sh analysis errors_found=2 patterns_active=3 patterns_resolved=1

Events append to ~/.openclaw/workspace/memory/brain-events.jsonl:

{"ts":"2026-02-11T12:00:00Z","type":"acc","event":"analysis","errors_found":2,"patterns_active":3}

Integration with OpenClaw

Add to session startup (AGENTS.md)

## Every Session
1. Load hippocampus: `./scripts/load-core.sh`
2. Load emotional state: `./scripts/load-emotion.sh`
3. **Load error patterns:** `~/.openclaw/workspace/skills/anterior-cingulate-memory/scripts/load-state.sh`

Behavior Guidelines

When you see patterns in ACC state:

  • 🔴 Critical (3+) — actively verify before responding in this area
  • ⚠️ Warning (2x) — be extra careful
  • Resolved — lesson learned, don't repeat

Future: Amygdala Integration

Planned: Connect ACC to amygdala so errors affect emotional state:

  • Errors → lower valence, higher alertness
  • Clean runs → maintain positive state
  • Pattern resolution → sense of accomplishment

AI Brain Series

Part Function Status
hippocampus Memory formation, decay, reinforcement ✅ Live
amygdala-memory Emotional processing ✅ Live
vta-memory Reward and motivation ✅ Live
anterior-cingulate-memory Conflict detection, error monitoring ✅ Live
basal-ganglia-memory Habit formation 🚧 Development
insula-memory Internal state awareness 🚧 Development

Philosophy

The ACC in the human brain creates that "something's off" feeling — the pre-conscious awareness that you've made an error. This skill gives AI agents a similar capability: persistent awareness of mistake patterns that influences future behavior.

Mistakes aren't failures. They're data. The ACC turns that data into learning.


Built with ⚡ by the OpenClaw community

安全使用建议
This skill generally does what it says (tracks and escalates recurring error patterns), but review these points before installing: - ACC_MODELS risk: The scripts call whatever CLI commands you list in ACC_MODELS and append conversation text as an argument. If ACC_MODELS contains networked tools (curl, http clients) or untrusted binaries, your transcripts can be exfiltrated. Before running, set ACC_MODELS to only trusted, vetted model CLIs (e.g., a local Ollama command or an official provider CLI you control). - Undeclared env var: ACC_MODELS is used by the code but not declared in the registry metadata. Also be aware WORKSPACE and AGENT_ID affect where files are read/written. - Data exposure: The skill reads raw session transcripts (~/.openclaw/agents/.../sessions). If those transcripts contain sensitive user data, the calibration/screening steps will send that content to configured models. Don’t enable cron or run the pipeline on sensitive data until you’re comfortable with the configured models. - Inspect the code & datasets: Look through learned-patterns.json, acc-state.json, and brain-events.jsonl after running to ensure nothing unexpected is recorded. Consider running the scripts in a sandboxed account or with a local-only model configuration first. - jq mismatch: The metadata indicates jq is required but most logic runs in python3; confirm jq is actually needed for your environment. If you want to proceed: set ACC_MODELS explicitly to trusted commands, run encode/quick-check on non-sensitive data, and avoid enabling the cron job until you’ve validated behavior. If you’re unsure, err on the side of not installing or running with production transcripts.
功能分析
Type: OpenClaw Skill Name: acc-error-memory Version: 1.0.0 The skill is classified as suspicious due to a significant vulnerability in its design, specifically the `ACC_MODELS` configuration. This environment variable, used by `scripts/calibrate-patterns.sh` and `scripts/haiku-screen.sh`, allows the execution of arbitrary CLI commands via `subprocess.run`. While the skill itself does not set a malicious value for `ACC_MODELS` or instruct the agent to do so, this capability presents a critical Remote Code Execution (RCE) risk if an attacker can control this environment variable. The prompt injection surfaces in `SKILL.md` and `scripts/analyze-day.sh` are benign and align with the stated purpose of error tracking and agent self-correction.
能力评估
Purpose & Capability
The scripts implement error detection, logging, escalation, calibration, and resolution exactly as the description claims (reading transcripts, pattern matching, LLM screening, state files under ~/.openclaw/workspace/memory). This functionality is coherent with the skill name and description. Minor mismatch: registry metadata requires 'jq' but most shipped scripts use python3; jq is not obviously needed in the visible files.
Instruction Scope
Runtime instructions and scripts read session transcripts (~/.openclaw/agents/.../sessions and ~/.openclaw/sessions) and send extracted exchanges to model CLIs configured by ACC_MODELS for classification. That networked LLM invocation is consistent with purpose but is a privacy/exfiltration vector: ACC_MODELS is treated as a comma-separated list of arbitrary CLI commands and each command is invoked with the conversation prompt appended. If ACC_MODELS points to a network-capable CLI (curl, http client, or any custom program), transcripts (user messages) can be sent to external endpoints. The skill also writes persistent state files and logs in the workspace, which is expected behavior.
Install Mechanism
There is no remote install/download step — the repo provides an install.sh and multiple local scripts that create and update state files. No external archive or IP/shortened URL downloads are used in the provided files. install.sh only creates workspace files and prints a cron command for the user to add; it does not automatically register a system cron by itself.
Credentials
Registry metadata lists no required env vars, but the runtime expects and uses several environment variables (ACC_MODELS, WORKSPACE, AGENT_ID, possibly others). In particular, ACC_MODELS (not declared in requires.env) controls which CLI commands are invoked with user transcripts. That is a significant discrepancy: an undeclared env var determines external endpoints (via whatever CLI is supplied). The skill requests no credentials, which is appropriate, but the undeclared ACC_MODELS and the ability to call arbitrary CLIs is a proportionality and transparency concern.
Persistence & Privilege
The skill writes persistent state (acc-state.json, learned-patterns.json, brain-events.jsonl, watermark files) into the user's workspace and can be scheduled via a cron job (the installer prints the cron command but does not add it silently). It does not request always:true or modify other skills. Autonomous invocation (disable-model-invocation=false) is the platform default — combined with the above ACC_MODELS issue, this increases risk because scheduled/automated runs could repeatedly send transcripts to configured CLIs without per-run approval.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install acc-error-memory
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /acc-error-memory 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: watermark-based error detection, 3-tier cost optimization (regex→Haiku→Opus), self-improving regex calibration, model-agnostic config
元数据
Slug acc-error-memory
版本 1.0.0
许可证
累计安装 4
当前安装数 4
历史版本数 1
常见问题

ACC Error Memory 是什么?

Error pattern tracking for AI agents. Detects corrections, escalates recurring mistakes, learns mitigations. The 'something's off' detector from the AI Brain series. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1199 次。

如何安装 ACC Error Memory?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install acc-error-memory」即可一键安装,无需额外配置。

ACC Error Memory 是免费的吗?

是的,ACC Error Memory 完全免费(开源免费),可自由下载、安装和使用。

ACC Error Memory 支持哪些平台?

ACC Error Memory 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 ACC Error Memory?

由 ImpKind(@impkind)开发并维护,当前版本 v1.0.0。

💬 留言讨论