Self-Improvement Agent

v1.0.0

Captures learnings, errors, and corrections for continuous improvement. Use when: (1) A command fails unexpectedly, (2) User corrects you ('No, that's wrong....

0· 375·3 current·3 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (capture learnings, errors, promotions) match the included files: templates, logging formats, promotion rules, hook handlers, and helper scripts. The files and scripts relate to recording and promoting learnings and to optional local setup; nothing obvious is requested that is unrelated to logging and skill extraction.
Instruction Scope
SKILL.md and helpers instruct the agent to log to .learnings/*, promote recurring items to workspace files, and optionally use inter-session APIs (sessions_history, sessions_send, sessions_spawn) to share learnings across sessions. Those inter-session calls are consistent with cross-session knowledge sharing but are sensitive because they read other sessions' transcripts. Scripts reference the CLAUDE_TOOL_OUTPUT environment variable (used by the error detector) which is a platform-provided variable but isn't listed in requires.env — this is expected for hooks but worth noting.
Install Mechanism
No remote install or downloads. This is effectively an instruction-only skill with bundled local scripts and a hook handler. The scripts and handler are plain-text, no obfuscated code, and the extract-skill and activator scripts operate on local paths. There are no URLs, package registry installs, or archive extracts.
Credentials
The skill declares no required environment variables or credentials. However: (1) the error detector reads CLAUDE_TOOL_OUTPUT (a platform-provided variable) when run as a hook, and (2) scripts may write files under the skills or workspace directories when executed (e.g., extract-skill.sh). No secrets or unrelated service credentials are requested.
Persistence & Privilege
always:false (not force-included). The skill provides an OpenClaw hook and shell scripts that, if enabled in your project-level or user-level hook config, will run during agent bootstrap and on PostToolUse. Hook scripts run with the same permissions as your agent process, so enabling them (especially at user/global scope) grants regular execution in your sessions — this is expected for hooks but you should enable only where you trust the code.
Assessment
This skill appears coherent and implements a local 'log learnings' workflow. Key things to consider before installing or enabling hooks: - No credentials are requested, and there are no remote downloads; the code is local and readable. Review the scripts (activator.sh, error-detector.sh, extract-skill.sh) and handler.js/handler.ts yourself before enabling. - Enabling the provided hook(s) (project or user-level) will cause the scripts/handler to run automatically during agent bootstrap or after tool use; those scripts run with the same permissions as your agent and can read/write files in the workspace and skills directories. If you prefer limited scope, enable the hook only at the project level (not user/global) or keep PostToolUse hooks disabled. - The skill suggests using inter-session APIs (sessions_history, sessions_send). If you enable those behaviors, sessions_history can expose other session transcripts — enable only if you are comfortable sharing session content between sessions. - If you install, set script permissions intentionally (chmod +x) and prefer absolute paths in hook configs to avoid surprises. If you want minimal exposure, use the activator reminder only (no PostToolUse error detector) and avoid running extract-skill.sh unless you explicitly want to create new skill files. Overall: coherent and reasonable for its stated purpose, but treat hook/script activation as an explicit opt-in action and review them before enabling globally.

Like a lobster shell, security has layers — review code before you run it.

agentvk974tvdmsbvsbhh1hwtaphwga583dbw1latestvk974tvdmsbvsbhh1hwtaphwga583dbw1learningsvk974tvdmsbvsbhh1hwtaphwga583dbw1memoryvk974tvdmsbvsbhh1hwtaphwga583dbw1openclawvk974tvdmsbvsbhh1hwtaphwga583dbw1self-improvementvk974tvdmsbvsbhh1hwtaphwga583dbw1
375downloads
0stars
1versions
Updated 3w ago
v1.0.0
MIT-0

Self-Improvement Skill

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

Quick Reference

SituationAction
Command/operation failsLog to .learnings/ERRORS.md
User corrects youLog to .learnings/LEARNINGS.md (category: correction)
User wants missing featureLog to .learnings/FEATURE_REQUESTS.md
API/external tool failsLog to .learnings/ERRORS.md
Knowledge was outdatedLog to .learnings/LEARNINGS.md (category: knowledge_gap)
Found better approachLog to .learnings/LEARNINGS.md (category: best_practice)
Similar to existing entryLink with **See Also**, bump priority
Broadly applicable learningPromote to workspace files (see below)

Promotion Targets

When a learning proves broadly applicable, elevate it:

Learning TypePromote To
Behavioral patternsSOUL.md
Workflow patternsAGENTS.md
Tool gotchasTOOLS.md
Project factsCLAUDE.md or workspace prompt files

Logging Format

Learning Entry

## [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

## [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

## [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:
### 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:

## Build & Dependencies
- Package manager: **pnpm** (not npm) — always use `pnpm install`

Recurring Pattern Detection

Before logging, search for related entries:

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:

ToolUse
sessions_listView 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:

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, timeoutERRORS.md
User says "No, that's wrong...", "Actually..."LEARNINGS.md (correction)
User provides info you didn't knowLEARNINGS.md (knowledge_gap)
"Can you also...", "I wish you could..."FEATURE_REQUESTS.md
Found a better approach mid-taskLEARNINGS.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)

clawhub install self-improving-agent

Manual:

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

Create log directory:

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

Comments

Loading comments...