self-enhance

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Self-Enhance

自我增强

Review recent work and produce specific, actionable file edits that improve agent performance over time. No reports, no reflections — only changes.
回顾近期工作,生成具体、可执行的文件修改内容,逐步提升Agent的性能。不生成报告,不做反思——只产出变更内容。

When to Use

适用场景

  • End of a sprint or work session
  • Weekly on a schedule (cron)
  • After a session with multiple mistakes or corrections from your human
  • When explicitly triggered:
    /self-enhance
  • 冲刺阶段或工作会话结束时
  • 按计划每周执行(通过cron)
  • 在出现多次错误或收到人类用户多次纠正的会话后
  • 手动触发:
    /self-enhance

Process

执行流程

Step 1: Gather Context

步骤1:收集上下文信息

Read these sources to understand what happened recently:
undefined
读取以下来源,了解近期工作情况:
undefined

Recent memory (last 7 days)

近期记忆(过去7天)

memory/YYYY-MM-DD.md files
memory/YYYY-MM-DD.md 文件

Recent git activity across active projects

活跃项目的近期Git活动

git -C /path/to/project log --oneline --since="7 days ago"
git -C /path/to/project log --oneline --since="7 days ago"

Current identity and process files

当前身份与流程文件

SOUL.md AGENTS.md HEARTBEAT.md
SOUL.md AGENTS.md HEARTBEAT.md

Project configs for active projects

活跃项目的配置文件

{project}/CLAUDE.md {project}/.claude/skills/
undefined
{project}/CLAUDE.md {project}/.claude/skills/
undefined

Step 2: Identify Patterns

步骤2:识别规律

Look for these specific signals — not vague "areas for improvement":
Repeated mistakes:
  • Same type of error made more than once (e.g., guessing DB schema, wrong CLI flags)
  • Corrections from your human that addressed the same root cause
  • Tasks that failed or required redo
Process gaps:
  • Steps that should be automatic but were skipped (e.g., checking schema before writing DB tasks)
  • Tools used incorrectly multiple times
  • Information that was assumed instead of verified
Missing configuration:
  • Project CLAUDE.md missing critical context that caused agent errors
  • Skills that should be installed but aren't
  • Broken symlinks or stale config
Workflow inefficiencies:
  • Tasks that took too long due to a fixable process issue
  • Repeated manual steps that could be automated
  • Communication patterns that wasted cycles (asking instead of doing, or doing instead of asking)
寻找以下具体信号——而非模糊的“改进方向”:
重复出现的错误:
  • 同一类型的错误出现多次(例如,猜测数据库 schema、使用错误的CLI参数)
  • 人类用户针对同一根本原因做出的多次纠正
  • 失败或需要重做的任务
流程漏洞:
  • 本应自动执行但被跳过的步骤(例如,编写数据库任务前未检查schema)
  • 多次被错误使用的工具
  • 被主观假设而非验证的信息
缺失的配置:
  • 项目CLAUDE.md文件缺失导致Agent出错的关键上下文
  • 应安装但未安装的技能
  • 损坏的符号链接或过期的配置
工作流低效问题:
  • 因可修复的流程问题导致耗时过长的任务
  • 可自动化的重复手动步骤
  • 浪费时间的沟通模式(本该执行却询问,或本该询问却直接执行)

Step 3: Produce Changes

步骤3:生成变更内容

For each pattern identified, make a specific file edit. Not a note. Not a reminder. An actual change.
Target files and what to change:
FileWhen to edit
SOUL.md
New behavioral principle learned from mistakes
AGENTS.md
Process change (e.g., new pre-flight check)
HEARTBEAT.md
New periodic check needed
{project}/CLAUDE.md
Missing context that caused agent errors
{project}/.claude/skills/
New project skill needed
memory/YYYY-MM-DD.md
Capture the enhancement session itself
Rules for changes:
  • Every edit must trace back to a specific incident or pattern
  • Don't add generic advice ("be more careful") — add specific checks ("verify table names against schema before writing DB tasks")
  • Don't duplicate existing rules — check what's already there first
  • Keep files concise — if adding a rule makes the file bloated, consolidate instead
  • Remove outdated rules that no longer apply
针对识别出的每个规律,做出具体的文件修改。不是备注,不是提醒,而是实际的变更。
目标文件及修改方向:
文件适用编辑场景
SOUL.md
从错误中总结出的新行为准则
AGENTS.md
流程变更(例如,新增预检查步骤)
HEARTBEAT.md
需要新增的周期性检查项
{project}/CLAUDE.md
补充导致Agent出错的缺失上下文
{project}/.claude/skills/
新增项目所需的技能
memory/YYYY-MM-DD.md
记录本次增强会话内容
变更规则:
  • 每一处修改都必须对应具体的事件或规律
  • 不要添加通用建议(如“更仔细一些”)——要添加具体检查项(如“编写数据库任务前,对照schema验证表名”)
  • 不要重复已有规则——先检查已存在的内容
  • 保持文件简洁——若添加规则导致文件臃肿,应先整合现有内容
  • 删除不再适用的过时规则

Step 4: Output Summary

步骤4:输出总结

After making changes, produce a brief summary:
undefined
完成修改后,生成一份简短的总结:
undefined

Self-Enhance Summary — YYYY-MM-DD

自我增强总结 —— YYYY-MM-DD

Patterns Found

识别出的规律

  • [pattern]: [evidence from recent work]

Changes Made

已完成的变更

  • [file]: [what was added/changed and why]

No Action Needed

无需处理的领域

  • [areas reviewed that were already covered]

Post this summary to the relevant channel (Discord sprint channel, or direct to your human).
  • [已检查且无需改进的领域]

将此总结发布至相关渠道(如Discord冲刺频道,或直接发送给人类用户)。

What This Skill Does NOT Do

本技能不包含以下功能

  • Write reflection docs or journal entries
  • Produce reports without file changes
  • Add vague platitudes ("be more thorough")
  • Run without recent context (needs at least a few days of memory)
  • Override changes your human made to identity/config files
  • 撰写反思文档或日志条目
  • 不生成文件变更的情况下产出报告
  • 添加空泛的陈词滥调(如“更彻底一些”)
  • 在无近期上下文的情况下运行(至少需要几天的记忆数据)
  • 覆盖人类用户对身份/配置文件做出的变更

Automation

自动化设置

To run weekly via cron:
bash
openclaw cron add --label "self-enhance" --schedule "0 9 * * 1" --task "Run the self-enhance skill: review last 7 days of memory files and git activity, identify process gaps, and make specific file edits. Post summary to #sprint channel."
Or trigger manually anytime: just say
/self-enhance
or "run self-enhance."
通过cron每周执行:
bash
openclaw cron add --label "self-enhance" --schedule "0 9 * * 1" --task "Run the self-enhance skill: review last 7 days of memory files and git activity, identify process gaps, and make specific file edits. Post summary to #sprint channel."
或随时手动触发:只需输入
/self-enhance
或“run self-enhance”。