Skip to content
Back to skills

Self Reflection

ASecurity

Continuous self-improvement through structured reflection and memory

  • 2,128 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added June 6, 2026
ai-agentsgobashgitapi

Works with

  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned June 6, 2026

npx -y skills add LeoYeAI/openclaw-master-skills --skill self-reflection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Self Reflection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Self Reflection
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/leoyeai-self-reflection/badge)](https://www.skillsdirectory.com/skills/leoyeai-self-reflection)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: self-reflection
description: Continuous self-improvement through structured reflection and memory
version: 1.1.1
metadata: {"openclaw":{"emoji":"πŸͺž","requires":{"bins":["jq","date"]}}}
---

# πŸͺž 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

```bash
# 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`:

```json
{
  "agents": {
    "defaults": {
      "heartbeat": {
        "every": "60m",
        "activeHours": { "start": "08:00", "end": "22:00" }
      }
    }
  }
}
```

Add to your workspace `HEARTBEAT.md`:

```markdown
## 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`:

```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](https://github.com/hopyky)

## License

MIT

Files in this skill

  • README.md10.4 KB
  • SKILL.md2.6 KB
  • self-reflection.example.json166 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.