session-manager

Manage Claude session lifecycles with start, end, and snapshot workflows.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/M2AI-jp/thanks4claudecode-fresh --skill session-manager
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-manager
Source: https://github.com/M2AI-jp/thanks4claudecode-fresh/tree/main/.claude/skills/session-manager
Command: npx skills add https://github.com/M2AI-jp/thanks4claudecode-fresh --skill session-manager

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill manages AI session lifecycles, ensures proper context initialization, and preserves work state across sessions, preventing context loss and maintaining productivity.

Core Features & Use Cases

  • Session Tracking: Automatically records session start/end times and manages state transitions
  • Context Preservation: Saves snapshots before compact operations and restores them afterward
  • Required File Enforcement: Ensures critical files are read before work begins
  • Use Case: When you start a new session, this Skill automatically loads your previous work context, verifies all required files are accessible, and tracks your session progress, ensuring seamless continuation of complex tasks.

Quick Start

The session-manager skill automatically activates at session start and end, managing context preservation and ensuring you always have the right files loaded for productive work.

Frequently Asked Questions about session-manager

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

FAQPage Schema
How do I preserve my work context across Claude sessions?

Session-manager automatically saves snapshots of your work state before context compaction and restores them when you resume, ensuring your previous progress and file context load seamlessly without manual intervention.

What happens to my session state when I start a new Claude session?

The Skill tracks session start and end times, loads your previous work context automatically, verifies required files are accessible, and maintains state transitions so you can continue complex tasks without losing progress.

Can I automate session initialization and cleanup workflows?

Yes. Session-manager provides hook handlers—start.sh, end.sh, compact.sh, and init-guard.sh—that execute automatically during session lifecycle events, supporting both automated and manual session management workflows.

How does session-manager prevent context loss during Claude's compact operations?

The Skill saves pre-compact snapshots before context pruning occurs and restores them afterward, maintaining your work state and file references through the compaction process without manual recovery steps.

What files does session-manager require to track session state?

Session-manager reads state.md and a playbook file to initialize context, records last_start and last_end timestamps, and enforces access to critical files before work begins, ensuring consistent session initialization.