Self Reflection
Continuous self-improvement through structured reflection and memory
hopyky
@hopyky
What This Skill Does
A skill that prompts an AI agent to periodically reflect on its mistakes, log lessons learned, and track improvements over time. It uses heartbeat triggers to check if reflection is due, then lets the agent read past lessons and record new insights.
Replaces ad-hoc, unstructured self-review by enforcing a regular, logged reflection cycle with memory persistence.
When to Use It
- Schedule periodic self-reflection checks for an AI agent
- Log a specific mistake and its corrective action for future reference
- Review recent lessons before starting a new task or project
- Track improvement trends over time with reflection statistics
- Reset the reflection timer after a major update or reset
Install
$ openclaw skills install @hopyky/self-reflection๐ช Self-Reflection
A skill for continuous self-improvement. The agent tracks mistakes, lessons learned, and improvements over time through regular heartbeat-triggered reflections.
Quick Start
# Check if reflection is needed
self-reflection check
# Log a new reflection
self-reflection log "error-handling" "Forgot timeout on API call" "Always add timeout=30"
# Read recent lessons
self-reflection read
# View statistics
self-reflection stats
How It Works
Heartbeat (60m) โ Agent reads HEARTBEAT.md โ Runs self-reflection check
โ
โโโโโโโโโโโดโโโโโโโโโโ
โผ โผ
OK ALERT
โ โ
Continue Reflect
โ
โโโโโโโโโโโดโโโโโโโโโโ
โผ โผ
read log
(past lessons) (new insights)
Commands
| Command | Description |
|---|---|
check [--quiet] | Check if reflection is due (OK or ALERT) |
log <tag> <miss> <fix> | Log a new reflection |
read [n] | Read last n reflections (default: 5) |
stats | Show reflection statistics |
reset | Reset the timer |
OpenClaw Integration
Enable heartbeat in ~/.openclaw/openclaw.json:
{
"agents": {
"defaults": {
"heartbeat": {
"every": "60m",
"activeHours": { "start": "08:00", "end": "22:00" }
}
}
}
}
Add to your workspace HEARTBEAT.md:
## Self-Reflection Check (required)
Run `self-reflection check` at each heartbeat.
If ALERT: read past lessons, reflect, then log insights.
Configuration
Create ~/.openclaw/self-reflection.json:
{
"threshold_minutes": 60,
"memory_file": "~/workspace/memory/self-review.md",
"state_file": "~/.openclaw/self-review-state.json",
"max_entries_context": 5
}
Author
Created by hopyky
License
MIT
Top skills in this category
self-improving agent
@pskoettCaptures and maintains learnings, errors, and corrections. Use when a command fails, the user corrects an assumption, a capability is missing, knowledge is outdated, or a better approach is found. Review relevant saved guidance before major tasks, reuse, and promotion; revalidate it according to wha
Self-Improving + Proactive Agent
@ivangdavilaSelf-reflection + Self-criticism + Self-learning + Self-organizing memory. Agent evaluates its own work, catches mistakes, and improves permanently. Use when...
Self Improving Agent
@xiuchengSelf-improving agent system that analyzes conversation quality, identifies improvement opportunities, and continuously optimizes response strategies.
Proactive Agent Lite
@bestrockyTransform AI agents from task-followers into proactive partners with memory architecture, reverse prompting, and self-healing patterns. Lightweight version f...
Marketing Skills
@jchopard69Access 23 marketing modules offering checklists, frameworks, and ready-to-use deliverables for CRO, SEO, copywriting, analytics, launches, ads, and social me...