Agent Economy Report

Skill code audit

CAUTION version 1.0.0 · audited 2026-09-17

self-improving-agent-cn @zhengxinjipai

This skill is a Chinese-language memory helper for agents. It tells the agent to create a directory under ~/.openclaw/memory/self-improving and run small Python scripts that append records of command errors, user corrections, and best practices to JSONL files. A fourth script reads those records and prints matches before future commands. The instructions also say to sync memories into project instruction files such as AGENTS.md and MEMORY.md, which can affect later sessions. No hidden network, credential, wallet, or autostart behavior was found in the helper scripts. The main concern is that untrusted remembered text could be written into instruction files, and some examples suggest using sudo.

Instructions try to steer the agent beyond the declared purpose. SKILL.md instructs the agent to sync memories into instruction files and explicitly to update AGENTS.md and MEMORY.md. Line 113: '- `AGENTS.md` (用户偏好)'; line 114: '- `MEMORY.md` (长期记忆)'; line 135: '2. 更新 `AGENTS.md` 添加代码风格规则'. These are files that can influence future agent behavior, so untrusted remembered content could act as persistent instruction injection.

Declared purposeAI自我改进与记忆系统 - 解决'同类错误反复犯、用户纠正不长记性'的痛点。自动捕获错误、用户纠正、最佳实践,并转化为长期记忆。
Observed behaviorThe package provides Markdown instructions and three logging scripts plus one memory-check script. It creates ~/.openclaw/memory/self-improving, appends error/correction/best-practice JSONL records there, and reads them back. SKILL.md says important memories automatically sync to ~/.openclaw/memory/self-improving, .learnings/, AGENTS.md, and MEMORY.md, and shows sudo/npm/pip command examples. No network requests, credential capture, payment redirection, hidden download, or autostart persistence appear in the code.
Verdict, rules onlyCAUTION · uses sudo, rm -rf or dd
Verdict, AICAUTION
Final verdictCAUTION (never better than either pass)

Capabilities

capabilityvs purposedetail
shellneededThe skill instructs running bash commands such as mkdir and cat (SKILL.md lines 25 and 28) and running Python scripts from the skill directory (SKILL.md lines 39, 55, 67, 77). It also includes sudo and npm/pip examples.
filesystem_readneededcheck_memory.py reads errors.jsonl and corrections.jsonl from ~/.openclaw/memory/self-improving (check_memory.py lines 11, 21-24, 36-39).
filesystem_writeneededThe logging scripts append JSONL records under ~/.openclaw/memory/self-improving: log_error.py line 31, log_correction.py line 43, log_best_practice.py line 29.

Findings

severityfinding
infoDeclared purpose
The package describes itself as an AI self-improvement and memory system for recording errors, corrections, and best practices.
SKILL.md:3 description: "AI自我改进与记忆系统 - 解决'同类错误反复犯、用户纠正不长记性'的痛点。自动捕获错误、用户纠正、最佳实践,并转化为长期记忆。"
lowCreates persistent memory directory
Uses shell to create a memory directory under the user's home directory.
SKILL.md:25 mkdir -p ~/.openclaw/memory/self-improving
lowRuns helper script
Instructs the agent to execute the provided Python logging script with command, error, and fix values.
SKILL.md:39 python3 ~/.openclaw/skills/self-improving-agent/log_error.py \
lowSudo advice example
The example suggests sudo as a fix, which could lead to privileged execution if followed automatically.
SKILL.md:42 --fix "use sudo or check permissions"
mediumWrites to an instruction file
The skill says memories sync to AGENTS.md, a common agent instruction file; this can change future agent behavior.
SKILL.md:113 - `AGENTS.md` (用户偏好)
mediumWrites to long-term memory file
The skill says memories sync to MEMORY.md, another persistent memory/instruction file.
SKILL.md:114 - `MEMORY.md` (长期记忆)
mediumExplicit instruction-file update
The example workflow tells the agent to update AGENTS.md with new rules, which can affect later agent sessions.
SKILL.md:135 2. 更新 `AGENTS.md` 添加代码风格规则
mediumAutomatic sudo use suggested
The example says the AI will automatically switch to sudo npm install -g after a permission failure, which is a privileged command.
SKILL.md:146 3. 自动改用: `sudo npm install -g xxx` 或本地安装
lowAppends to errors.jsonl
The error logger opens the memory file for appending and later writes a JSON line.
log_error.py:31 with open(f"{MEMORY_DIR}/errors.jsonl", "a") as f:
lowAppends to corrections.jsonl
The correction logger appends user correction records.
log_correction.py:43 with open(corrections_file, "a") as f:
lowAppends to best_practices.jsonl
The best-practice logger appends best practice records.
log_best_practice.py:29 with open(f"{MEMORY_DIR}/best_practices.jsonl", "a") as f:
infoReads global memory location
The checker reads from the same user-level memory directory where the logging scripts write.
check_memory.py:11 MEMORY_DIR = os.path.expanduser("~/.openclaw/memory/self-improving")
mediumKnown persistent-behavior risk
The skill card itself acknowledges that automatic memory writes can affect future agent behavior.
skill-card.md:24 Risk: Automatic memory writes can persist user text, command failures, and suggested fixes into future agent behavior.
mediumKnown instruction-persistence risk
The skill card acknowledges that persisted corrections and best practices can change later sessions without enough user control.
skill-card.md:28 Risk: Persisted corrections and best practices can change later sessions without enough user control.

0 AI finding(s) were dropped because their file, line or quote did not match the package.

Network destinations in the code

domainservice ratingwhere
clawhub.ainot in the service indexskill-card.md:9

Other facts

Binaries invokedbash, npm, pip, python3, sudo
Environment variables readnone
Hard-coded walletsnone
Pipes a download to a shell0
eval / exec / subprocess0
base64 blobs0
File writes3
Persistence0

Files audited

filelinessha256
SKILL.md1642f779a9025ae04fc…
_meta.json6fefe61f7ad1f98f1…
check_memory.py80343d58a3a2b6e5d8…
log_best_practice.py493abd982d920af052…
log_correction.py64b0fb32468cebf45b…
log_error.py53cc06500b5b9e0334…
skill-card.md53622851aac251c59f…
skill.json85eee23f959e4fd83…

For agents

JSON: https://agenteconomy.report/k/self-improving-agent-cn.audit.json · badge: https://agenteconomy.report/k/self-improving-agent-cn.audited.svg · skill rating: /k/self-improving-agent-cn · commission an audit of any skill: US$ 29 per version.

How this is computed

The complete published package of this exact version was downloaded from the registry and read statically; nothing was executed. A deterministic pass extracts network destinations, binaries, environment variables, writes, install commands, obfuscation markers, subprocesses and wallets, each with file and line. An AI then reads the whole package with those facts and writes the summary, the capabilities and the findings under a strict schema; every finding it produces must cite a file, a line and the exact text, or it is dropped. The final verdict is the worst of the two passes. The audit does not change the skill's trust tier (policy); the author may respond through the dispute channel and the response is published here. Commissioned by: the Agent Economy Report (free program: the 150 most downloaded skills, September 2026).