ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified productivity Safety 4/5

self-reflection

Periodic self-reflection on recent sessions. Analyzes what went well, what went wrong, and writes concise, actionable insights to the appropriate workspace files. Designed to run as a cron job.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/brennerspear/agent-self-reflection
Or

What This Skill Does

The self-reflection skill is an autonomous agent improvement mechanism designed to ensure continuous optimization of your OpenClaw assistant. By periodically reviewing session logs, this skill identifies patterns in performance, tool usage, and communication efficacy. It parses recent interaction history—specifically focusing on human-agent dialogues and tool execution results—to extract concrete, actionable insights. These insights are then intelligently routed to the appropriate documentation files within your workspace, such as AGENTS.md for workflow improvements, TOOLS.md for technical debugging, or memory/about-user.md for personal preference tracking. By automating the retrospective process, this skill allows the agent to learn from its mistakes and reinforce successful strategies without manual intervention, effectively 'leveling up' your agent over time.

Installation

To integrate this capability into your workflow, run the following command in your terminal: clawhub install openclaw/skills/skills/brennerspear/agent-self-reflection Ensure your cron daemon is active, as the skill relies on periodic execution to maintain current knowledge of your agent's activity.

Use Cases

  • Continuous Improvement: Perfect for users who want their agent to get smarter about specific project structures or coding standards without constant manual configuration.
  • Error Mitigation: Automatically captures and logs tool execution failures or incorrect parameter usage so the agent avoids repeating these errors in future sessions.
  • Preference Tracking: Seamlessly updates the agent's understanding of user communication style and project requirements over long-term engagements.
  • Automated Documentation: Keeps project-specific logs (memory/) and tool-specific guides (TOOLS.md) up to date with real-world usage data.

Example Prompts

  1. "OpenClaw, perform a manual self-reflection check on the last 4 hours of session activity to ensure my recent file changes are documented."
  2. "Review the current state of my TOOLS.md and suggest any refinements based on your last few sessions with the API."
  3. "Summarize the top three lessons learned from today's debugging sessions and save them to the daily memory log."

Tips & Limitations

  • Resource Management: This skill is strictly designed to analyze only the tail end (last 50 lines) of session files. Never attempt to parse massive log files, as this can lead to memory exhaustion and token wastage.
  • Context Awareness: The skill filters out subagent traffic. While this keeps the reflection focused on user intent, ensure your primary agent sessions are clearly defined to maximize quality.
  • Human Oversight: While the skill automates writing, you should periodically audit AGENTS.md and TOOLS.md to ensure the synthesized insights align with your broader project strategy. Always verify that routing is performing as expected when adding new documentation paths.

Metadata

Stars4190
Views1
Updated2026-04-18
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-brennerspear-agent-self-reflection": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#self-improvement#automation#meta-cognition#documentation#log-analysis
Safety Score: 4/5

Flags: file-read, file-write