self-reflection

Continuous self-improvement through structured reflection and memory

7 stars

Best use case

self-reflection is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Continuous self-improvement through structured reflection and memory

Teams using self-reflection should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/self-reflection/SKILL.md --create-dirs "https://raw.githubusercontent.com/Demerzels-lab/elsamultiskillagent/main/public/skills/hopyky/self-reflection/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/self-reflection/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How self-reflection Compares

Feature / Agentself-reflectionStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Continuous self-improvement through structured reflection and memory

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 🪞 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

Related Skills

self-love-confidence

7
from Demerzels-lab/elsamultiskillagent

Build self-love and confidence with affirmations, wins logging, and inner critic management

agent-selfie

7
from Demerzels-lab/elsamultiskillagent

AI agent self-portrait generator. Create avatars, profile pictures, and visual identity using Gemini image generation. Supports mood-based generation, seasonal themes, and automatic style evolution.

self-taught-ml-career-path

7
from Demerzels-lab/elsamultiskillagent

Discussion about self-taught machine learning career paths and success stories. Use when exploring alternative education paths, self-study strategies, or career development in ML without formal PhD training.

d-examples-of-self-taught-people-who-made-signific-96d5680b

7
from Demerzels-lab/elsamultiskillagent

Most high profile work income across seems to be from people with PhDs, either in academia or industry. There's also a hiring bias towards formal degrees.

asked-chatgpt-to-turn-me-and-itself-into-animals-t-aedd4d88

7
from Demerzels-lab/elsamultiskillagent

cute 😇.

recursive-self-improvement

7
from Demerzels-lab/elsamultiskillagent

递归自我改进系统,能够自动检测错误并修复,或持续优化和重构。包含修复模式和优化模式,支持并发执行、自动化测试、性能监控、智能调度、自适应学习、错误预测和异常恢复。用于需要持续自我优化的系统。

self-improvement

7
from Demerzels-lab/elsamultiskillagent

Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.

islamic-daily-reflection

7
from Demerzels-lab/elsamultiskillagent

Daily Islamic reflections with Python script.

agent-self-reflection

7
from Demerzels-lab/elsamultiskillagent

Periodic self-reflection on recent sessions.

self-integration

7
from Demerzels-lab/elsamultiskillagent

Connect to any external app and perform actions on it.

agent-self-governance

7
from Demerzels-lab/elsamultiskillagent

Self-governance protocol for autonomous agents: WAL (Write-Ahead Log), VBR (Verify Before Reporting), ADL.

self-evolve

7
from Demerzels-lab/elsamultiskillagent

Autonomous self-evolution skill: grants the agent full authority to modify its own configuration, skills, prompts.