lucasye378

Self-Improvement Agent

AI 智能体v1.0.0
作者:lucasye378更新于 2026-05-11self-improvement-agent@clawhub_lucasye378/self-improvement-agent
上下文管理记忆增强#Self Improvement#Self Improving

据 AlphaMoat 统计,截至 2026-09,Self-Improvement Agent 累计下载 3,923 次、获 2 个星标,在全部 5,078 个 AI 技能中排名第 2,640 位,在「AI 智能体」分类(969 个)中排名第 517 位。

累计安装
280
累计下载
3,923
星标
2
全站排名
#2,640
全站前 52% · 「AI 智能体」前 54%
平台累计安装累计下载星标评论
ClawHub ↗421,5982-
SkillHub ↗2803,9231—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

按模板将错误写入 .learnings/ERRORS.md,将纠正和方法经验写入 .learnings/LEARNINGS.md,将缺失功能写入 .learnings/FEATURE_REQUESTS.md。可关联重复条目、更新状态并定期回顾;只有广泛适用的经验才提升到项目指导文件。

资料发布于 2026-10-26

可以用来做什么

  • 记录命令失败和用户纠正

什么时候用

  • 遇到重复错误或发现过时知识时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

记录这次失败的原因、上下文和建议修复方法

月度数据趋势

累计下载3,923
792,1444,2082026-03 · 累计下载 3642026-05 · 累计下载 1,0882026-07 · 累计下载 1,9442026-08 · 累计下载 2,6492026-09 · 累计下载 3,92326-0326-09
星标2
0122026-03 · 星标 -2026-05 · 星标 -2026-07 · 星标 22026-08 · 星标 22026-09 · 星标 226-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,923—2
2026-082,649+36.3%2
2026-071,944—2
2026-051,088—-
2026-03364—-

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

6.5 KB · ClawHub v1.0.0
---
name: self-improving-agent
description: "Captures learnings, errors, and corrections for continuous improvement. Use when: (1) A command fails unexpectedly, (2) User corrects you ('No, that's wrong...', 'Actually...'), (3) User requests a missing capability, (4) An external API or tool fails, (5) You realize your knowledge is outdated, (6) A better approach is found for a recurring task. Also review `.learnings/` before major tasks. Trigger words: 'actually', 'wrong', 'outdated', 'I wish you could', 'why can't you', non-zero exit code."
---

# Self-Improvement Skill

Log learnings and errors to markdown files. Important patterns get promoted to project memory files.

## Quick Reference
展开全部(共 232 行)

| Situation | Action |
|-----------|--------|
| Command/operation fails | Log to `.learnings/ERRORS.md` |
| User corrects you | Log to `.learnings/LEARNINGS.md` (category: `correction`) |
| User wants missing feature | Log to `.learnings/FEATURE_REQUESTS.md` |
| API/external tool fails | Log to `.learnings/ERRORS.md` |
| Knowledge was outdated | Log to `.learnings/LEARNINGS.md` (category: `knowledge_gap`) |
| Found better approach | Log to `.learnings/LEARNINGS.md` (category: `best_practice`) |
| Similar to existing entry | Link with `**See Also**`, bump priority |
| Broadly applicable learning | Promote to workspace files (see below) |

## Promotion Targets

When a learning proves broadly applicable, elevate it:

| Learning Type | Promote To |
|---------------|------------|
| Behavioral patterns | `SOUL.md` |
| Workflow patterns | `AGENTS.md` |
| Tool gotchas | `TOOLS.md` |
| Project facts | `CLAUDE.md` or workspace prompt files |

## Logging Format

### Learning Entry

```markdown
## [LRN-YYYYMMDD-XXX] category

**Logged**: ISO-8601 timestamp
**Priority**: low | medium | high | critical
**Status**: pending | resolved | promoted | in_progress

### Summary
One-line description of what was learned

### Details
Full context: what happened, what was wrong, what's correct

### Suggested Action
Concrete fix or improvement

### Metadata
- Source: conversation | error | user_feedback
- Related Files: path/to/file.ext
- Tags: tag1, tag2
- See Also: LRN-YYYYMMDD-XXX (if related)
```

### Error Entry

```markdown
## [ERR-YYYYMMDD-XXX] command_or_tool

**Logged**: ISO-8601 timestamp
**Priority**: high
**Status**: pending

### Summary
Brief description of what failed

### Error
```
Paste actual error output here
```

### Context
- Command/operation attempted
- Input or parameters used
- Environment details

### Suggested Fix
If identifiable, how to resolve it

### Metadata
- Reproducible: yes | no | unknown
- Related Files: path/to/file.ext
```

### Feature Request Entry

```markdown
## [FEAT-YYYYMMDD-XXX] capability_name

**Logged**: ISO-8601 timestamp
**Priority**: medium
**Status**: pending

### Requested Capability
What the user wanted to do

### User Context
Why they needed it

### Complexity Estimate
simple | medium | complex
```

## ID Generation

`TYPE-YYYYMMDD-XXX` — e.g. `LRN-20250322-001`, `ERR-20250322-A3F`

## Resolving Entries

When fixed:
1. Set **Status**: `resolved` or `promoted`
2. Add resolution block:

```markdown
### Resolution
- **Resolved**: 2025-01-16T09:00:00Z
- **Commit/PR**: abc123 or #42
- **Notes**: What was done
```

## Promoting to Workspace Files

**When**: Learning applies across files, prevents recurring mistakes, or any contributor should know it.

**How**: Distill into a concise rule. Add to target file. Set original entry to `promoted`.

Example learning:
> Project uses pnpm workspaces. `npm install` fails because lock file is `pnpm-lock.yaml`.

Promote to `CLAUDE.md`:
```markdown
## Build & Dependencies
- Package manager: **pnpm** (not npm) — always use `pnpm install`
```

## Recurring Pattern Detection

Before logging, search for related entries:
```bash
grep -r "keyword" .learnings/
```

If similar entry exists:
- Link with `**See Also**: LRN-...`
- Increment `Recurrence-Count`
- Consider systemic fix (promote to AGENTS.md, create tech debt ticket)

**Promote to permanent prompt guidance** when a pattern:
- Occurs 3+ times
- Spans 2+ distinct tasks
- Within a 30-day window

## OpenClaw Inter-Session Tools

Share learnings across sessions:

| Tool | Use |
|------|-----|
| `sessions_list` | View active/recent sessions |
| `sessions_history(sessionKey, limit)` | Read another session's transcript |
| `sessions_send(sessionKey, message)` | Send a learning to another session |
| `sessions_spawn(task, label, mode)` | Spawn a background sub-agent |

**Example**: After a session ends, promote its key learnings to workspace files.
Use `sessions_history` to review what another session discovered.

## Periodic Review

Check `.learnings/` at natural breakpoints:
- Before starting a new major task
- After completing a feature
- Weekly during active development

Quick status:
```bash
grep -h "Status.*pending" .learnings/*.md | wc -l  # count pending
grep -B3 "Priority.*high" .learnings/*.md | grep "^##"  # high priority items
```

## Detection Triggers

**Log immediately when you notice:**

| Signal | → Entry |
|--------|---------|
| Non-zero exit code, exception, timeout | `ERRORS.md` |
| User says "No, that's wrong...", "Actually..." | `LEARNINGS.md` (correction) |
| User provides info you didn't know | `LEARNINGS.md` (knowledge_gap) |
| "Can you also...", "I wish you could..." | `FEATURE_REQUESTS.md` |
| Found a better approach mid-task | `LEARNINGS.md` (best_practice) |
| Repeated mistake (2+ times) | Promote to workspace file |

## Best Practices

1. **Log immediately** — context is freshest right after the issue
2. **Be specific** — future you needs to understand quickly
3. **Suggest concrete fixes** — not just "investigate"
4. **Link related files** — makes fixes easier
5. **Promote aggressively** — broadly applicable learnings belong in workspace files, not hidden in `.learnings/`
6. **Use consistent IDs** — enables `See Also` linking

## Installation (OpenClaw)

```bash
clawhub install self-improving-agent
```

Manual:
```bash
git clone https://github.com/pskoett/self-improving-agent.git ~/.openclaw/skills/self-improving-agent
```

Create log directory:
```bash
mkdir -p ~/.openclaw/workspace/.learnings
```

## Detailed Topics

For complete documentation, see:
- **OpenClaw integration**: `references/openclaw-integration.md`
- **Hook setup**: `references/hooks-setup.md`
- **Full entry examples**: `references/examples.md`
- **Skill extraction workflow**: `references/skill-extraction.md`
- **Other agents (Claude Code, Codex, Copilot)**: `references/other-agents.md`

「AI 智能体」分类下的热门技能

self-improving agentAI 智能体

记录自身发现以实现自我改进的技能

↓ 129.0万★ 4,521pskoett
Find SkillsAI 智能体

帮助用户发现和安装智能体技能,当用户询问如「如何做X」、「找X的技能」、「有能做...的吗」等问题时

↓ 110.3万★ 1,778桂皮
Agent BrowserAI 智能体

给 AI agent 用的浏览器自动化命令行技能。

↓ 90.9万★ 991Nicolas Kleiber
Self-Improving + Proactive AgentAI 智能体

自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。

↓ 44.4万★ 1,606Iván
Skill VetterAI 智能体

在安装第三方技能之前,按清单审查来源、权限与危险模式的技能。

↓ 33.0万★ 1,323spclaudehome
ontologyAI 智能体

类型化知识图谱,用于结构化智能体记忆与可组合技能。适用于以下场景:创建/查询实体(人物、项目、任务、事件、文档)、关联相关对象、强制执行约束、将多步操作规划为图谱变换,或当技能需要共享状态时。触发关键词包括"记住""我知道关于什么""将X链接到Y""显示依赖关系"、实体增删改查操作,以及跨技能数据访问。

↓ 29.4万★ 788oswalpalash
Proactive AgentAI 智能体

将 AI 代理从任务执行者转变为能够预见需求、持续优化的主动伙伴。现已支持 WAL Protocol、Working Buffer、Autonomous Crons 及经过实战验证的模式。属于 Hal Stack 🦞。

↓ 28.8万★ 913halthelobster
Skill CreatorAI 智能体

创建有效技能指南。当用户希望创建新技能(或更新现有技能)以利用专业知识、工作流程或工具集成扩展 Claude 的能力时,应使用此技能。

↓ 23.8万★ 473chindden

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。