session-memory
Manages cross-session learning and memory persistence for Claude Code, enabling task continuity and context retention across sessions.
Introduction
The session-memory skill is a sophisticated mechanism designed to solve the problem of context loss between isolated Claude Code execution sessions. By creating a dedicated persistence layer within the .claude/memory/ directory, this skill ensures that project decisions, implementation patterns, and task histories survive session restarts. It is intended for software developers and engineers who require long-term project continuity and wish to maintain a single source of truth for architectural choices and development workflows.
-
Automatically tracks session logs using unique environment variables for auditability and trace history.
-
Maintains distinct files for critical project data: session-log.md for history, decisions.md for rationale, and patterns.md for reusable coding standards.
-
Supports JSON-based project context management via context.json to store stack information, project phases, and metadata.
-
Integrates with Agent Trace logs to allow the agent to reconstruct the recent state of the filesystem and previous tool execution history upon resume.
-
Implements a tiered memory architecture (Layer 1-3) that differentiates between global tool usage patterns and project-specific knowledge.
-
Provides seamless support for --resume workflows in Claude Code, facilitating the restoration of complex, multi-stage development tasks.
-
Use this skill when you need to resume work after a break or when queried about history, project state, or past technical decisions.
-
Ensure important architectural decisions are moved to decisions.md (SSOT) to prevent knowledge degradation.
-
Leverage the /recap command to quickly review current session progress before initiating a full state restoration.
-
Exclude highly volatile, ephemeral data from long-term storage to keep repositories clean.
-
Use with version control caution: while decisions and patterns should be shared in Git, session logs and context states should generally remain local.
-
Be aware that sensitive credentials or PII should never be committed to memory files.
Repository Stats
- Stars
- 614
- Forks
- 64
- Open Issues
- 4
- Language
- Shell
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- Apr 28, 2026, 12:00 PM