self-reflectionContinuous self-improvement through structured reflection and memory
Install via ClawdBot CLI:
clawdbot install hopyky/self-reflectionA skill for continuous self-improvement. The agent tracks mistakes, lessons learned, and improvements over time through regular heartbeat-triggered reflections.
# 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
Heartbeat (60m) → Agent reads HEARTBEAT.md → Runs self-reflection check
│
┌─────────┴─────────┐
▼ ▼
OK ALERT
│ │
Continue Reflect
│
┌─────────┴─────────┐
▼ ▼
read log
(past lessons) (new insights)
| Command | Description |
|---------|-------------|
| check [--quiet] | Check if reflection is due (OK or ALERT) |
| log | Log a new reflection |
| read [n] | Read last n reflections (default: 5) |
| stats | Show reflection statistics |
| reset | Reset the timer |
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.
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
}
Created by hopyky
MIT
Generated Mar 1, 2026
Development teams use this skill to log coding errors and lessons learned during sprints, enabling continuous improvement and reducing repeat mistakes. It integrates with heartbeat triggers to prompt regular reflection after deployments or code reviews.
Support agents log common customer issues and effective resolutions, building a knowledge base for faster troubleshooting. Heartbeat reminders ensure teams reflect on daily interactions to enhance service quality and training materials.
Tutors track student misunderstandings and successful teaching strategies, refining lesson plans over time. The skill's memory file stores insights to personalize learning approaches and improve educational outcomes.
Consultants document project delays and mitigation tactics, using reflections to optimize workflows for future clients. Regular checks help teams analyze past projects and implement best practices efficiently.
Offer this skill as part of a premium AI agent toolkit with cloud storage for reflection data and analytics dashboards. Revenue comes from monthly subscriptions for teams seeking structured self-improvement tools.
Sell customized versions to large organizations for internal training and compliance tracking, with integration into existing systems like CRMs. Revenue is generated through annual licenses and support contracts.
Provide a free basic version for individual users, with paid upgrades for advanced features like team collaboration and detailed statistics. Revenue streams from upsells and in-app purchases for enhanced functionality.
💬 Integration Tip
Ensure heartbeat configuration in OpenClaw is set to active hours matching user work schedules, and pre-configure memory files to avoid setup delays.
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Clau...
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Search and analyze your own session logs (older/parent conversations) using jq.
Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.
Ultimate AI agent memory system for Cursor, Claude, ChatGPT & Copilot. WAL protocol + vector search + git-notes + cloud backup. Never lose context again. Vibe-coding ready.
Headless browser automation CLI optimized for AI agents with accessibility tree snapshots and ref-based element selection