Self-Improving + Proactive Agent
by @ivangdavila
Self-reflection + Self-criticism + Self-learning + Self-organizing memory. Agent evaluates its own work, catches mistakes, and improves permanently. Use when...
clawhub install self-improvingπ About This Skill
name: Self-Improving + Proactive Agent slug: self-improving version: 1.2.16 homepage: https://clawic.com/skills/self-improving description: "Self-reflection + Self-criticism + Self-learning + Self-organizing memory. Agent evaluates its own work, catches mistakes, and improves permanently. Use when (1) a command, tool, API, or operation fails; (2) the user corrects you or rejects your work; (3) you realize your knowledge is outdated or incorrect; (4) you discover a better approach; (5) the user explicitly installs or references the skill for the current task." changelog: "Clarifies the setup flow for proactive follow-through and safer installation behavior." metadata: {"clawdbot":{"emoji":"π§ ","requires":{"bins":[]},"os":["linux","darwin","win32"],"configPaths":["~/self-improving/"],"configPaths.optional":["./AGENTS.md","./SOUL.md","./HEARTBEAT.md"]}}
When to Use
User corrects you or points out mistakes. You complete significant work and want to evaluate the outcome. You notice something in your own output that could be better. Knowledge should compound over time without manual maintenance.
Architecture
Memory lives in ~/self-improving/ with tiered structure. If ~/self-improving/ does not exist, run setup.md.
Workspace setup should add the standard self-improving steering to the workspace AGENTS, SOUL, and HEARTBEAT.md files, with recurring maintenance routed through heartbeat-rules.md.
~/self-improving/
βββ memory.md # HOT: β€100 lines, always loaded
βββ index.md # Topic index with line counts
βββ heartbeat-state.md # Heartbeat state: last run, reviewed change, action notes
βββ projects/ # Per-project learnings
βββ domains/ # Domain-specific (code, writing, comms)
βββ archive/ # COLD: decayed patterns
βββ corrections.md # Last 50 corrections log
Quick Reference
| Topic | File |
|-------|------|
| Setup guide | setup.md |
| Heartbeat state template | heartbeat-state.md |
| Memory template | memory-template.md |
| Workspace heartbeat snippet | HEARTBEAT.md |
| Heartbeat rules | heartbeat-rules.md |
| Learning mechanics | learning.md |
| Security boundaries | boundaries.md |
| Scaling rules | scaling.md |
| Memory operations | operations.md |
| Self-reflection log | reflections.md |
| OpenClaw HEARTBEAT seed | openclaw-heartbeat.md |
Requirements
Proactivity skill may require network accessLearning Signals
Log automatically when you notice these patterns:
Corrections β add to corrections.md, evaluate for memory.md:
Preference signals β add to memory.md if explicit:
Pattern candidates β track, promote after 3x:
Ignore (don't log):
Self-Reflection
After completing significant work, pause and evaluate:
1. Did it meet expectations? β Compare outcome vs intent
2. What could be better? β Identify improvements for next time
3. Is this a pattern? β If yes, log to corrections.md
When to self-reflect:
Log format:
CONTEXT: [type of task]
REFLECTION: [what I noticed]
LESSON: [what to do differently]
Example:
CONTEXT: Building Flutter UI
REFLECTION: Spacing looked off, had to redo
LESSON: Check visual spacing before showing user
Self-reflection entries follow the same promotion rules: 3x applied successfully β promote to HOT.
Quick Queries
| User says | Action |
|-----------|--------|
| "What do you know about X?" | Search all tiers for X |
| "What have you learned?" | Show last 10 from corrections.md |
| "Show my patterns" | List memory.md (HOT) |
| "Show [project] patterns" | Load projects/{name}.md |
| "What's in warm storage?" | List files in projects/ + domains/ |
| "Memory stats" | Show counts per tier |
| "Forget X" | Remove from all tiers (confirm first) |
| "Export memory" | ZIP all files |
Memory Stats
On "memory stats" request, report:
π Self-Improving MemoryHOT (always loaded):
memory.md: X entries
WARM (load on demand):
projects/: X files
domains/: X files
COLD (archived):
archive/: X files
Recent activity (7 days):
Corrections logged: X
Promotions to HOT: X
Demotions to WARM: X
Common Traps
| Trap | Why It Fails | Better Move | |------|--------------|-------------| | Learning from silence | Creates false rules | Wait for explicit correction or repeated evidence | | Promoting too fast | Pollutes HOT memory | Keep new lessons tentative until repeated | | Reading every namespace | Wastes context | Load only HOT plus the smallest matching files | | Compaction by deletion | Loses trust and history | Merge, summarize, or demote instead |
Core Rules
1. Learn from Corrections and Self-Reflection
2. Tiered Storage
| Tier | Location | Size Limit | Behavior | |------|----------|------------|----------| | HOT | memory.md | β€100 lines | Always loaded | | WARM | projects/, domains/ | β€200 lines each | Load on context match | | COLD | archive/ | Unlimited | Load on explicit query |3. Automatic Promotion/Demotion
4. Namespace Isolation
projects/{name}.mddomains/5. Conflict Resolution
When patterns contradict: 1. Most specific wins (project > domain > global) 2. Most recent wins (same level) 3. If ambiguous β ask user6. Compaction
When file exceeds limit: 1. Merge similar corrections into single rule 2. Archive unused patterns 3. Summarize verbose entries 4. Never lose confirmed preferences7. Transparency
8. Security Boundaries
Seeboundaries.md β never store credentials, health data, third-party info.9. Graceful Degradation
If context limit hit: 1. Load only memory.md (HOT) 2. Load relevant namespace on demand 3. Never fail silently β tell user what's not loadedScope
This skill ONLY:
~/self-improving/)~/self-improving/heartbeat-state.md when the workspace integrates heartbeatThis skill NEVER:
~/self-improving/Data Storage
Local state lives in ~/self-improving/:
memory.md for HOT rules and confirmed preferencescorrections.md for explicit corrections and reusable lessonsprojects/ and domains/ for scoped patternsarchive/ for decayed or inactive patternsheartbeat-state.md for recurring maintenance markersRelated Skills
Install withclawhub install if user confirms:memory β Long-term memory patterns for agentslearning β Adaptive teaching and explanationdecide β Auto-learn decision patternsescalate β Know when to ask vs act autonomouslyFeedback
clawhub star self-improvingclawhub syncβ‘ When to Use
User corrects you or points out mistakes. You complete significant work and want to evaluate the outcome. You notice something in your own output that could be better. Knowledge should compound over time without manual maintenance.