self-reflection — Claude Code skill: what it does, how to install
self-reflection stores mistakes and operational lessons in local markdown memory so the agent avoids repeated failures.
no license 162 installs ★ 675 updated 2026-03-07
npx skills add sundial-org/awesome-openclaw-skills --skill self-reflection -a claude-codeWhat self-reflection does
This tool schedules periodic reviews for coding agents. Triggered during recurring heartbeats or manual inspection via self-reflection check, the agent inspects recent steps, reviews saved notes, and logs new solutions with self-reflection log.
Lessons live in a markdown log file, while interval states stay inside a JSON config file. You can read previous entries, view metrics, or restart the counter directly from the shell. Your local environment must have both jq and date installed for the execution scripts to parse files.
What it helps with
- log agent errors together with verified fixes
- run scheduled checks to see if review time arrived
- load previous operational lessons into context
- track review statistics and reset timers
Example prompts for the agent
- Run self-reflection check to see if an update is needed
- Store a fix using self-reflection log "network" "no retry flag" "pass --retry 3"
- Print the last entries with self-reflection read 5
How to install self-reflection
1Skills CLI (Vercel)
npx skills add sundial-org/awesome-openclaw-skills --skill self-reflection -a claude-code2Manually: put the files in place
~/.claude/skills/self-reflection/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/self-reflection/
1Skills CLI (Vercel)
npx skills add sundial-org/awesome-openclaw-skills --skill self-reflection -a codex2Manually: put the files in place
.agents/skills/self-reflection/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add sundial-org/awesome-openclaw-skills --skill self-reflection -a cursor2Manually: put the files in place
.cursor/skills/self-reflection/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install sundial-org/awesome-openclaw-skills skills/self-reflection2Manually: put the files in place
.github/skills/self-reflection/SKILL.md1Skills CLI (Vercel)
npx skills add sundial-org/awesome-openclaw-skills --skill self-reflection -a gemini-cli2Platform CLI
gemini skills install https://github.com/sundial-org/awesome-openclaw-skills --path skills/self-reflectionManually: put the files in place
.devin/skills/self-reflection/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add sundial-org/awesome-openclaw-skills --skill self-reflection -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about self-reflection
How to install self-reflection in Claude Code?
Run npx skills add sundial-org/awesome-openclaw-skills --skill self-reflection -a claude-code. The file will be placed in ~/.claude/skills/self-reflection/SKILL.md.
What does self-reflection do?
It gives the agent a memory log for mistakes and solutions, checking on an interval whether it is time to record insights.
What dependencies are required?
The skill requires jq and date present in your shell path to manipulate json state and calculate intervals.