TopRank Skills

Home / Claw Skills / Others / correction-memory
Official OpenClaw rules 15%

correction-memory

Makes agent corrections persistent and reusable. When you override, reject, or correct an agent's output, this skill logs the correction and automatically injects it into future spawns of the same agent type. Solves "agent keeps making the same mistake across sessions." Installs correction-tracker lib + injection hook into agent-context-loader. Works standalone or alongside intent-engineering skill.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 correction-memory 技能。 若已安装,则直接安装 correction-memory 技能。

Overview

Skill Key
donovanpankratz-del/correction-memory
Author
donovanpankratz-del
Source Repo
openclaw/skills
Version
1.1.0
Source Path
skills/donovanpankratz-del/correction-memory
Latest Commit SHA
9bfc60be99e97cfb69f2c3d2212ed092c70417bf

Extracted Content

SKILL.md excerpt

# Correction Memory

## The Problem

When you correct an agent, that correction evaporates after the session. Next time you spawn the same agent type, it makes the same mistake. There's no memory of what you've already taught it.

## What This Skill Installs

- **`lib/correction-tracker.js`** — logs corrections per agent type to `memory/corrections/[AgentType].jsonl`
- **Hook into `agent-context-loader.js`** — correction preamble prepended to spawns automatically (if intent-engineering is also installed)

## Installation

### Step 1 — Install correction-tracker

```bash
cp references/correction-tracker-template.js $OPENCLAW_WORKSPACE/lib/correction-tracker.js
```

Verify it runs:

```bash
node $OPENCLAW_WORKSPACE/lib/correction-tracker.js
```

### Step 2 — Wire agent-context-loader (if using intent-engineering)

If `lib/agent-context-loader.js` is installed (from intent-engineering skill), correction injection is **automatic** — no wiring needed. The loader checks for `correction-tracker.js` at startup and loads it if present.

If you are NOT using intent-engineering, add this to your spawn logic manually:

```javascript
const { buildCorrectionPreamble } = require('./lib/correction-tracker');

const agentType   = 'CoderAgent'; // or whatever agent you're spawning
const corrections = buildCorrectionPreamble(agentType, workspaceRoot);
const fullTask    = corrections ? corrections + '\n\n---\n\n' + originalTask : originalTask;
```

## Logging Corrections

### Programmatic

```javascript
const { logCorrection } = require('./lib/correction-tracker');

logCorrection(
  'CoderAgent',                                    // agent type
  'Used ESM import instead of require()',          // what was wrong
  'Always use require() for Node.js stdlib modules', // correct behavior
  workspaceRoot,
  { session_channel: 'discord' }                  // optional metadata
);
```

### Via main agent (natural language)

Just tell the main agent:

> "Note that [AgentType]: [what it did wron...

Related Claw Skills