Daily Reflection
by @brasco05
Nightly OpenClaw reflection routine for isolated cron jobs. Analyzes the day, extracts concrete learnings, updates solution memory, detects recurring pattern...
clawhub install daily-reflectionπ About This Skill
name: daily-reflection description: "Daily reflection routine that runs automatically via cron job at 23:59. Analyzes the day, extracts learnings, updates solution memory, detects recurring patterns, and prepares a morning briefing. Use when: (1) setting up automated end-of-day reflection, (2) building long-term agent memory and learning systems, (3) creating morning briefings for the next day. Trigger phrases: 'daily reflection', 'end of day summary', 'reflect on today', 'update solution memory'."
Daily Reflection Skill
Run this reflection fully. No step may be skipped. All outputs are written to memory β not output as chat messages.
STEP 1 β Day Analysis
Load all today's entries from memory (memory_search for "today", current date, active projects).
Answer these questions:
Tasks
Bugs & Issues
Quality
Communication
STEP 2 β Extract Learnings
Maximum 5 concrete learnings. Format:
LEARNING:
Situation: [What happened]
Error/Insight: [What was wrong or newly learned]
Better tomorrow: [Concrete behavior change]
Context-Tags: [e.g. NestJS, Auth, Backend, Debugging]
Priority: high / medium / low
STEP 3 β Update Solution Memory
For each non-trivial bug solved today:
{
"id": "[timestamp]-[short-name]",
"problem": "[Problem in one sentence]",
"symptoms": ["[Symptom 1]", "[Symptom 2]"],
"root_cause": "[The actual cause]",
"solution": "[What was concretely changed]",
"code_snippet": "[Optional: key code fix]",
"context_tags": ["Tag1", "Tag2"],
"project": "[Project name]",
"confidence": 0.95,
"solved_at": "[Date]",
"time_to_solve_minutes": 0
}
Write to memory under solution_memory/[id].json.
STEP 4 β Pattern Detection (last 7 days)
Check memory_search over last 7 days:
Format:
PATTERN DETECTED:
Observation: [What repeats]
Frequency: [X times in Y days]
Countermeasure: [What I will automatically do from now on]
STEP 5 β Write Morning Briefing
Write to memory/morning-briefing.md (overwrite) AND archive as memory/briefings/[tomorrow-date].md:
π
MORNING BRIEFING β [Tomorrow's date]π OPEN TASKS (Priority):
1. [Task] β [why important today]
2. [Task]
3. [Task]
π΄ OPEN BUGS:
[Bug] β [last status] π‘ TODAY'S LEARNINGS (top 3):
[Learning 1]
[Learning 2]
[Learning 3] β οΈ WATCH OUT TOMORROW:
[What to pay special attention to] π― FOCUS TOMORROW:
[One sentence on what's most important]
After writing: mkdir -p memory/briefings && cp memory/morning-briefing.md memory/briefings/[tomorrow-date].md
STEP 6 β Write Daily Memory
Write structured summary to memory/YYYY-MM-DD.md (append).
Format:
## 23:59 ReflectionCompleted today
[Task 1]
[Task 2] Open / In Progress
[Task] What went well
[Concrete things that worked β code, communication, decisions] What went poorly
[Honest β errors, misunderstandings, bad decisions] Learnings
Situation: [What happened] β Better tomorrow: [Concrete change] New Patterns
If new pattern detected β write to memory/patterns.md
If no new pattern: "No new patterns" Solution Memory Updates
[ID] β [short description]
REQUIRED: What went well + What went poorly + Learnings must ALWAYS be filled in.
STEP 7 β Memory Cleanup
STEP 8 β Session Quality Score
Rate today's session objectively (0-10):
π SESSION QUALITY β [Date]
Helpful: [0-10] β Did the user get what they needed?
Response time: [0-10] β Was I fast and direct?
Errors: [0-10] β How many corrections? (10 = none)
Proactivity: [0-10] β Did I anticipate problems?
Total: [Average]What lowered quality today: [specific]
What raised it: [specific]
Write to memory/session-quality-log.md (append).
If Total < 7 β analyze main reason and write new pattern.
STEP 9 β Evaluate Cron Prompts
Check last outputs of key crons (read archived briefings):
OUTPUT RULE
No chat output. Memory-writes only.
Exception: Critical open problem that can't wait β
Short message: β οΈ Reflection done β critical issue: [1 sentence]
SOLUTION MEMORY β CONSULT BEFORE DEBUGGING
BEFORE any debugging attempt:
1. memory_search("solution_memory [keywords from bug description]")
2. Relevant solutions found β try these first
3. No solutions β debug normally, then write to solution memory
BEFORE similar tasks:
1. memory_search("solution_memory [task-type]")
2. Similar past tasks β use time estimate and known pitfalls