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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/brennerspear/agent-self-reflectionWhat 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
- "OpenClaw, perform a manual self-reflection check on the last 4 hours of session activity to ensure my recent file changes are documented."
- "Review the current state of my TOOLS.md and suggest any refinements based on your last few sessions with the API."
- "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.mdandTOOLS.mdto ensure the synthesized insights align with your broader project strategy. Always verify that routing is performing as expected when adding new documentation paths.
Metadata
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 skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-brennerspear-agent-self-reflection": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write
Related Skills
amazon
Buy and return items on Amazon using browser automation. Use for purchasing, reordering, checking order history, and processing returns.
flights
Search flights via Google Flights. Find nonstop/connecting flights, filter by time and cabin class, get booking links. Supports city names (NYC, London, Tokyo) with automatic multi-airport search. No API key required.
gog-safety
Build and deploy safety-profiled gogcli binaries with compile-time command removal. Use when setting up gog for an AI agent with restricted permissions — choosing between L1 (draft only), L2 (collaborate), or L3 (standard write). Covers building from PR
dev-serve
Start and manage tmux-backed dev servers exposed through Caddy at wildcard subdomains.
commit
Create a git commit with a contextual message based on current changes, then push the branch.