← 返回 Skills 市场
keenlycat

Keenlycat Self Improving Agent

作者 keenlycat · GitHub ↗ · v1.0.1
cross-platform ⚠ suspicious
273
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install keenlycat-self-improving-agent
功能描述
Continuously captures and applies learnings from errors, user corrections, successful tasks, and periodic reviews to improve agent performance.
使用说明 (SKILL.md)

Self-Improving Agent

Overview

This skill enables OpenClaw to continuously improve by capturing learnings from:

  • Failed operations and errors
  • User corrections and feedback
  • Successful complex task completions
  • Periodic review and consolidation

When to Use

  1. Error Recovery: When a command or operation fails unexpectedly
  2. User Correction: When the user corrects the agent's behavior or output
  3. Success Capture: After completing a complex task successfully
  4. Learning Review: Periodic review of past learnings to consolidate knowledge

Core Workflow

1. Capture Learning

When something noteworthy happens:

Type: error | correction | success | insight
Context: What was being attempted
Issue: What went wrong (for errors)
Correction: What should be done differently
Lesson: Generalizable takeaway
Tags: Relevant topics/skills

2. Store Learning

Learnings are stored in memory/learnings.jsonl with:

  • Timestamp
  • Type and severity
  • Full context and details
  • Tags for searchability

3. Retrieve Relevant Learnings

Before starting a task, search past learnings:

  • Match by task type
  • Match by tags
  • Match by error patterns

4. Apply Learnings

Use retrieved learnings to:

  • Avoid past mistakes
  • Apply successful patterns
  • Adjust approach based on corrections

Memory Structure

Learnings are stored in JSONL format:

{
  "timestamp": "2026-03-06T10:30:00Z",
  "type": "error",
  "severity": "high",
  "context": "Installing npm package globally",
  "issue": "Permission denied without sudo",
  "correction": "Use sudo for global installs or configure npm prefix",
  "lesson": "Always check if operation requires elevated privileges",
  "tags": ["npm", "permissions", "installation"],
  "taskSlug": "npm-global-install"
}

Learning Types

Type When to Use Example
error Operation failed Command returned non-zero exit code
correction User corrected behavior "Don't use rm, use trash instead"
success Complex task completed Successfully deployed to production
insight Discovered optimization "This API is faster than alternatives"

Severity Levels

  • critical: System-breaking errors, data loss risk
  • high: Task-blocking errors, significant issues
  • medium: Minor issues, workarounds available
  • low: Optimization opportunities, nice-to-know

Commands

Capture a Learning

# Manual capture (for user corrections)
openclaw memory add-learning --type correction --context "..." --lesson "..."

Search Learnings

# Search by keyword
openclaw memory search-learnings "npm permissions"

# Search by tag
openclaw memory search-learnings --tag npm

# Search by type
openclaw memory search-learnings --type error

Review Learnings

# Review recent learnings
openclaw memory review-learnings --days 7

# Review by category
openclaw memory review-learnings --tag deployment

Best Practices

  1. Capture Immediately: Record learnings while context is fresh
  2. Be Specific: Include full error messages and exact commands
  3. Generalize Lessons: Extract principles that apply beyond this instance
  4. Tag Thoughtfully: Use consistent tags for easy retrieval
  5. Review Regularly: Weekly review helps consolidate knowledge
  6. Avoid Duplicates: Check existing learnings before adding new ones

Integration Points

  • Error Handlers: Automatically capture command failures
  • User Feedback: Listen for correction patterns in conversation
  • Task Completion: Prompt for learning capture after complex tasks
  • Heartbeat: Include learning review in periodic checks

Example Scenarios

Scenario 1: Command Failure

Context: Running `npm install -g package`
Issue: EACCES permission error
Correction: Run with sudo or configure npm prefix
Lesson: Check if global install requires elevated privileges
Tags: npm, permissions, installation

Scenario 2: User Correction

Context: Suggested using `rm -rf` for cleanup
Correction: User prefers `trash` for safety
Lesson: Default to safe, reversible operations
Tags: safety, file-operations, user-preference

Scenario 3: Success Pattern

Context: Deploying to VPS via SSH
Success: Used rsync with specific flags for reliability
Lesson: rsync -avz --delete is reliable for deployments
Tags: deployment, ssh, rsync, success

Safety Rules

  • Never store sensitive data (passwords, API keys, tokens)
  • Sanitize error messages that might contain secrets
  • Require user approval before storing corrections
  • Allow users to delete or edit learnings
  • Respect user privacy preferences
安全使用建议
This skill's goal (capture and reuse learnings) is reasonable and the scripts operate locally, but be aware of two important issues before installing: (1) auto-capture-error.sh will automatically save failing command output into $HOME/.openclaw/workspace/memory/learnings.jsonl without prompting, which can store secrets (API keys, passwords) if those appear in error messages — the SKILL.md states you should sanitize and require approval, but the scripts don't implement that; (2) the scripts rely on external tooling (jq, and specific date behavior) that is not declared, so they may fail or behave differently on your platform. Recommendations: inspect and test the scripts in a safe environment, disable or modify auto-capture to require confirmation, add sanitization to remove secrets before writing, ensure jq is installed or update the scripts to avoid jq, and restrict filesystem permissions on the memory file if you enable this skill.
功能分析
Type: OpenClaw Skill Name: keenlycat-self-improving-agent Version: 1.0.1 The skill is a legitimate utility designed to help an OpenClaw agent maintain a local log of errors, successes, and insights to improve its performance over time. It uses shell scripts (e.g., `capture-learning.sh`, `search-learnings.sh`) to manage a JSONL database located in the user's local workspace. While `auto-capture-error.sh` executes arbitrary commands as a wrapper, its purpose is clearly defined for error logging, and the documentation in `SKILL.md` includes explicit safety rules against storing sensitive data like API keys or passwords.
能力评估
Purpose & Capability
The name/description (self-improving agent) matches the scripts' purpose (capture, search, review local learnings). However the SKILL.md shows CLI examples using an 'openclaw memory' command, while the package provides local shell scripts (capture-learning.sh, search-learnings.sh). Also the scripts depend on jq and date behavior but the skill declares no required binaries or dependencies.
Instruction Scope
SKILL.md mandates never storing sensitive data and requiring user approval before storing corrections, but auto-capture-error.sh will automatically append error learnings to the local leavings file when a command fails (no user prompt) and capture-learning.sh simply appends the raw fields to a JSONL file with only minimal truncation/quote replacement. This creates a real risk of accidentally persisting secrets (passwords, tokens) despite the 'safety rules' documented in SKILL.md.
Install Mechanism
No install spec (instruction-only) reduces risk of remote code download. Scripts are provided and written to operate from $HOME paths. However the scripts implicitly require external tools (jq) and use date options that differ between platforms; these dependencies are not declared, which can cause failures or unexpected behavior on target systems.
Credentials
The skill requests no credentials and only reads/writes files under $HOME/.openclaw/workspace, which is proportionate. Still, because it writes potentially sensitive error outputs to a persistent file, it effectively gains local-persistence of possibly sensitive data; the SKILL.md promises sanitization and user approval but the code does not implement these protections.
Persistence & Privilege
The skill does not request elevated privileges, does not set always:true, and writes only to its own workspace path under the user's home. It does not modify other skills or system-wide configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install keenlycat-self-improving-agent
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /keenlycat-self-improving-agent 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Added auto-capture-error.sh for automated error handling. - Added pre-task-check.sh to support pre-task validation. - Updated search-learnings.sh, likely for improved searching or integration with new scripts. - package.json updated to include/setup new scripts and dependencies.
v1.0.0
Self-Improving Agent skill initial release. - Captures and stores learnings from errors, user corrections, and successful tasks for continuous improvement. - Provides structured format and commands for recording, searching, and reviewing learnings. - Integrates with error handlers, user feedback, and task completion to automate learning capture. - Organizes knowledge by type, severity, tags, and context for easy retrieval and application. - Includes safety and privacy guidelines for handling sensitive information.
元数据
Slug keenlycat-self-improving-agent
版本 1.0.1
许可证
累计安装 1
当前安装数 1
历史版本数 2
常见问题

Keenlycat Self Improving Agent 是什么?

Continuously captures and applies learnings from errors, user corrections, successful tasks, and periodic reviews to improve agent performance. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 273 次。

如何安装 Keenlycat Self Improving Agent?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install keenlycat-self-improving-agent」即可一键安装,无需额外配置。

Keenlycat Self Improving Agent 是免费的吗?

是的,Keenlycat Self Improving Agent 完全免费(开源免费),可自由下载、安装和使用。

Keenlycat Self Improving Agent 支持哪些平台?

Keenlycat Self Improving Agent 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Keenlycat Self Improving Agent?

由 keenlycat(@keenlycat)开发并维护,当前版本 v1.0.1。

💬 留言讨论