/health-wellness:rem-sleepfrom health-wellness
Consolidates session logs into durable long-term memory files. Processes raw experience into MEMORY.md by extracting decisions, facts, and lessons.
Ships in health-wellness. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Like biological REM sleep, this skill processes raw experience (session logs) into consolidated long-term memory.
Works with: OpenClaw, Claude Code, or any agent with session logs and memory files.
Periodic "sleep cycles" that:
Process recent session logs → extract significant events → update MEMORY.md
Review MEMORY.md → remove stale/outdated entries → merge duplicates → compress
Run both consolidate then defrag.
Option A: Using grep/jq (no extra software)
# OpenClaw session logs location
SESSIONS_DIR="$HOME/.openclaw/agents/main/sessions"
# Search for patterns in recent sessions
grep -r "decision\|learned\|important\|remember\|TODO" "$SESSIONS_DIR" --include="*.jsonl" | head -100
# Parse JSONL and search content
find "$SESSIONS_DIR" -name "*.jsonl" -mtime -3 -exec cat {} \; | \
jq -r 'select(.content) | .content' 2>/dev/null | \
grep -i "decision\|learned\|important"
Option B: Using Repo Prompt (if installed)
# More powerful semantic search
rp -e 'search "decision" --context-lines 2'
rp -e 'search "learned" --context-lines 2'
rp -e 'search "important" --context-lines 2'
Option C: Using memory_search (OpenClaw built-in)
If your agent has the memory_search tool, use it to semantically search memory files:
memory_search("decisions made this week")
memory_search("lessons learned")
From search results, look for:
Two-tier system:
memory/YYYY-MM-DD.md): Raw events, specific detailsConsolidation prompt:
Review these session excerpts. Extract significant information that should be remembered long-term. Focus on: decisions, facts about people/projects, lessons learned, and preferences. Format as bullet points suitable for MEMORY.md.
Read MEMORY.md and identify:
STALE: [entry] — reason it's outdated
DUPLICATE: [entry A] ≈ [entry B]
INCONSISTENT: [entry A] vs [entry B]
BLOAT: [verbose entry] → [compressed version]
Ensure MEMORY.md has logical sections:
Recommended cadence:
Trigger options:
# Native search (no dependencies)
grep -r "pattern" ~/.openclaw/agents/main/sessions --include="*.jsonl"
# With Repo Prompt
rp -e 'search "PATTERN" --context-lines 2'
# Helper script (if using Repo Prompt)
./scripts/gather-sessions.sh [days_back]
rem-sleep/
├── SKILL.md # This file
├── README.md # GitHub readme
└── scripts/
└── gather-sessions.sh # Helper script (requires Repo Prompt)
PRs welcome! Ideas for improvement:
What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/fitness-coachCreate personalized workout plans and provide exercise guidance/healthkitRead, write, and query Apple Health data using HealthKit. Covers HKHealthStore authorization, sample queries, statistics queries, statistics collection queries for charts, saving HKQuantitySample data, background delivery, workout sessions with HKWorkoutSession and HKLiveWorkoutBuilder, HKUnit, and HKQuantityTypeIdentifier values. Use when integrating with Apple Health, displaying health metrics, recording workouts, or enabling background health data delivery./mental-health-psychoeducationComprehensive psychoeducation on mental health conditions, therapy modalities, evidence-based coping techniques, psychiatric medications, and self-assessment frameworks. Educational resource only — not medical advice, diagnosis, or treatment. Use when learning about mental health concepts, understanding therapy options, exploring coping strategies, or recognizing when to seek professional help. Trigger on "mental health", "therapy types", "coping strategies", "anxiety", "depression", "ADHD", "psychiatric medication", "when should I see a therapist".Other plugins' skills for the same job
npx claudepluginhub firstsun-dev/skills --plugin health-wellness