rem-sleep

Consolidate session logs into durable memory files and clean stale entries.

3|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/stewnight/rem-sleep-skill --skill rem-sleep
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rem-sleep
Source: https://github.com/stewnight/rem-sleep-skill/tree/main
Command: npx skills add https://github.com/stewnight/rem-sleep-skill --skill rem-sleep

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the challenge of accumulating session logs that are expensive to re-read, leading to important insights being buried and memory loss after context compaction or restarts.

Core Features & Use Cases

  • Memory Consolidation: Processes raw session logs to extract significant patterns and consolidate them into durable memory files.
  • Memory Defragmentation: Reviews and cleans up long-term memory files by removing stale entries, duplicates, and compressing verbose information.
  • Use Case: An AI agent can use this skill periodically to ensure that crucial decisions, learned facts, and important preferences are preserved in its long-term memory, preventing the loss of valuable knowledge.

Quick Start

Run the REM sleep skill to consolidate recent session logs into durable memory.

Frequently Asked Questions about rem-sleep

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I consolidate AI agent session logs into durable memory files?

Memory consolidation processes raw session logs to extract significant patterns and preserve crucial decisions, preventing knowledge loss after context compaction or restarts. This optimization ensures important insights are not buried in expensive log accumulation.

What is the best way to prevent data loss from accumulating session logs?

Preventing data loss from accumulating session logs is achieved through periodic memory maintenance that extracts significant patterns from raw logs and stores them in durable memory files, ensuring crucial decisions and learned facts are preserved.

How does memory defragmentation work for long-term AI knowledge storage?

Memory defragmentation works by reviewing and cleaning up long-term memory files, removing stale entries and duplicates, and compressing verbose information to optimize long-term knowledge storage for AI agents.

Do I need shell scripting to process session logs for memory consolidation?

Yes, you need shell scripting for log searching and parsing to process session logs for memory consolidation. Optional integration with tools like Repo Prompt can provide enhanced semantic search capabilities.

When should I run memory maintenance to optimize long-term knowledge storage?

You should run memory maintenance periodically to ensure crucial decisions, learned facts, and important preferences are preserved in long-term memory, preventing the loss of valuable knowledge before log accumulation becomes expensive to re-read.