sleep-guard

Community

Keep Mac awake with the lid closed

Authorgotomts
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Prevents a macOS laptop from sleeping when the lid is closed so long-running processes such as Claude Code continue to run and do not get interrupted by system sleep.

Core Features & Use Cases

  • State Inspection: Check current pmset SleepDisabled status to decide whether action is needed.
  • Enable / Disable Sleep: Safely toggle pmset disablesleep on or off using sudo with basic validation to avoid redundant changes.
  • Safety Checks & Warnings: Detects if the machine is running on battery and warns about heat and battery drain when disabling sleep; reminds users to re-enable sleep when finished.

Quick Start

Enable sleep prevention by running the skill with the on argument to disable sleep while the lid is closed and run it with off to restore normal sleep behavior.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: sleep-guard
Download link: https://github.com/gotomts/dotfiles/archive/main.zip#sleep-guard

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.