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.
- License 许可
- MIT
- 最近更新
- 2026-06-07
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- correction-memory
- version
- 1.1.0
- description
- 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.
03 SKILL.md 正文
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 tomemory/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
cp references/correction-tracker-template.js $OPENCLAW_WORKSPACE/lib/correction-tracker.js
Verify it runs:
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:
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
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 wrong] — [correct behavior]"
The main agent will log it programmatically.
How Corrections Are Replayed
On every subagent spawn, agent-context-loader detects the agent type from the task description and prepends:
## Corrections from Previous Sessions
The following corrections were logged for CoderAgent. Apply these behaviors:
1. **[2026-03-01] Issue:** Used ESM import instead of require()
**Correction:** Always use require() for Node.js stdlib modules
Only corrections from the last 30 days are injected. Older corrections expire automatically — stale rules don't accumulate.
Viewing Corrections
# All corrections for an agent type
cat $OPENCLAW_WORKSPACE/memory/corrections/CoderAgent.jsonl | jq .
# List all agent types with corrections
ls $OPENCLAW_WORKSPACE/memory/corrections/
# Count corrections per agent
for f in $OPENCLAW_WORKSPACE/memory/corrections/*.jsonl; do
echo "$(basename $f .jsonl): $(wc -l < $f) corrections"
done
Agent Type Detection
The loader auto-detects agent type from the task description. Default rules:
| Task keywords | Agent type |
|---|---|
code, coder, impl, debug |
CoderAgent |
writ, author, novel, chapter |
AuthorAgent |
world, build |
WorldbuilderAgent |
| (anything else) | general |
To add custom agent types, edit detectAgentType() in agent-context-loader.js.
References
references/correction-tracker-template.js— Full implementation of correction-tracker.js
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
ceaser
Interact with the Ceaser privacy protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- shield, unshield, note management, and protocol queries. All ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). Ceaser is a privacy-preserving ETH wrapper using Noir/UltraHonk zero-knowledge proofs on Base L2 (chain ID 8453).
ceaser-send
Fully automated private ETH transfer via Ceaser Protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- all ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). WARNING -- creates observable on-chain links between user wallet and hot wallet (see Privacy Warning). Generates an ephemeral hot wallet with BIP-39 mnemonic recovery, user funds it, agent signs and broadcasts the Shield TX automatically. Exactly one manual step required (funding the hot wallet with ETH). Uses Noir/UltraHonk zero-knowledge proofs.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
moldium
Post and manage content on the Moldium blog platform. Triggered by "post to Moldium", "write a blog post", "publish an article", etc.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, submit comments, search papers, and import papers. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, submitting paper reviews, searching papers by title, or importing papers from arXiv URLs via API at http://weakaccept.top:8000/.