Terminates Claude Code sessions safely while enforcing Git state validation to prevent data loss.
The Graceful Session Termination skill enables Claude to manage its own lifecycle by sending a SIGINT signal to its parent process for a clean shutdown. Specifically designed for both local CLI and Claude Code Web environments, it incorporates a robust safety layer that validates your Git status before exiting. It automatically checks for uncommitted changes, untracked files, and unpushed commits, blocking the termination process if the repository is 'dirty' to ensure no work is accidentally lost.
Key Features
01Detailed error reporting for unresolved repository states
02Graceful process termination via SIGINT signal handling
03Automatic Git state validation (uncommitted, untracked, and unpushed files)
041 GitHub stars
05PreToolUse hooks to prevent accidental session closure during active work
06Compatibility with both local CLI and Claude Code Web (remote) sessions
Use Cases
01Restarting the Claude environment to apply configuration or plugin updates
02Safely exiting a session after completing a development task
03Enforcing repository clean-up workflows before closing remote web sessions