{"skill":{"slug":"self-reflection","displayName":"Self Reflection","summary":"Continuous self-improvement through structured reflection and memory","description":"---\nname: self-reflection\ndescription: Continuous self-improvement through structured reflection and memory\nversion: 1.1.1\nmetadata: {\"openclaw\":{\"emoji\":\"🪞\",\"requires\":{\"bins\":[\"jq\",\"date\"]}}}\n---\n\n# 🪞 Self-Reflection\n\nA skill for continuous self-improvement. The agent tracks mistakes, lessons learned, and improvements over time through regular heartbeat-triggered reflections.\n\n## Quick Start\n\n```bash\n# Check if reflection is needed\nself-reflection check\n\n# Log a new reflection\nself-reflection log \"error-handling\" \"Forgot timeout on API call\" \"Always add timeout=30\"\n\n# Read recent lessons\nself-reflection read\n\n# View statistics\nself-reflection stats\n```\n\n## How It Works\n\n```\nHeartbeat (60m) → Agent reads HEARTBEAT.md → Runs self-reflection check\n                                                      │\n                                            ┌─────────┴─────────┐\n                                            ▼                   ▼\n                                           OK              ALERT\n                                            │                   │\n                                       Continue            Reflect\n                                                               │\n                                                     ┌─────────┴─────────┐\n                                                     ▼                   ▼\n                                                   read               log\n                                              (past lessons)     (new insights)\n```\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `check [--quiet]` | Check if reflection is due (OK or ALERT) |\n| `log <tag> <miss> <fix>` | Log a new reflection |\n| `read [n]` | Read last n reflections (default: 5) |\n| `stats` | Show reflection statistics |\n| `reset` | Reset the timer |\n\n## OpenClaw Integration\n\nEnable heartbeat in `~/.openclaw/openclaw.json`:\n\n```json\n{\n  \"agents\": {\n    \"defaults\": {\n      \"heartbeat\": {\n        \"every\": \"60m\",\n        \"activeHours\": { \"start\": \"08:00\", \"end\": \"22:00\" }\n      }\n    }\n  }\n}\n```\n\nAdd to your workspace `HEARTBEAT.md`:\n\n```markdown\n## Self-Reflection Check (required)\nRun `self-reflection check` at each heartbeat.\nIf ALERT: read past lessons, reflect, then log insights.\n```\n\n## Configuration\n\nCreate `~/.openclaw/self-reflection.json`:\n\n```json\n{\n  \"threshold_minutes\": 60,\n  \"memory_file\": \"~/workspace/memory/self-review.md\",\n  \"state_file\": \"~/.openclaw/self-review-state.json\",\n  \"max_entries_context\": 5\n}\n```\n\n## Author\n\nCreated by [hopyky](https://github.com/hopyky)\n\n## License\n\nMIT\n","tags":{"latest":"1.1.1"},"stats":{"comments":0,"downloads":17354,"installsAllTime":190,"installsCurrent":189,"stars":43,"versions":1},"createdAt":1769841628025,"updatedAt":1778485878349},"latestVersion":{"version":"1.1.1","createdAt":1769841628025,"changelog":"Initial ClawHub release: Continuous self-improvement through structured reflection","license":null},"metadata":{"setup":[],"os":null,"systems":null},"owner":{"handle":"hopyky","userId":"s1766gpk3yrn2g3sqwx3m4fek58841en","displayName":"hopyky","image":"https://avatars.githubusercontent.com/u/166903908?v=4"},"moderation":null}