⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

install-insomnia

@krishhgg⭐ 563 stars

Install or upgrade Insomnia, the macOS menu bar app that keeps a Mac awake for a timed session, from a GitHub release or from source. Use when the user asks to install, update or reinstall Insomnia.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐⭐ 563 on GitHubGitHub ↗

Popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

Use a stable, well-ventilated surface, not a closed bag. Insomnia is experimental. Recovery can fail, and a running timer is not a safety guarantee. Validation status · Apple's ventilation guidance

Install

Requires macOS 26 or later on an Apple Silicon Mac.

Paste this into your coding agent:

Install the latest stable Insomnia release by following https://github.com/krishhgg/Insomnia/blob/main/skills/install-insomnia/SKILL.md. If a step needs my password, give me the command to run in Terminal.

For the newest nightly, write "the newest Insomnia nightly prerelease" in place of "the latest stable Insomnia release". Nightlies are built from main on each day it has new commits. They have the newest code and may be broken.

To install a release yourself, follow docs/install.md. It covers both channels, how to check the download, and v0.1.0, which installs differently.

Build from source

Needs Xcode with Swift 6.2 or later. Replace v<version> with the latest stable tag, or a nightly tag for the newest code:

git clone --branch v<version> --depth 1 https://github.com/krishhgg/Insomnia.git
cd Insomnia
./scripts/install.sh
open "$HOME/Applications/Insomnia.app"

The installer needs your password, because the sudoers rule is a system file. It installs:

  • The app, at ~/Applications/Insomnia.app.
  • A recovery agent, a launchd job that runs every minute. If the app is gone when a session should have ended, the agent tries to undo the session's changes.
  • A sudoers rule at /etc/sudoers.d/insomnia. A sudoers rule decides who can run what with sudo. This one lets your user account, not just Insomnia, run these four commands without a password:
/usr/bin/pmset -a disablesleep 1
/usr/bin/pmset -a disablesleep 0
/usr/bin/pmset -b lowpowermode 1
/usr/bin/pmset -b lowpowermode 0

Any program running as you can use that rule too, so review it before you install. docs/install.md lists every file and explains how upgrades replace them.

Using it

  1. Start. Click the eye in the menu bar, enter days, hours and minutes, and press Enter.
  2. Add time. Click the eye or the countdown during a session.
  3. End early. Press and hold the end control next to the countdown.
  4. Settings and status. Right-click the eye. Quit asks Insomnia to undo the session first, and it refuses while a change is still waiting to be undone. Saved audio for an output that isn't connected doesn't hold it up. Insomnia restores that output if it reconnects while the app runs, or at the next launch.

You don't have to close the lid, and opening it doesn't end the session.

On battery power, Insomnia turns on Low Power Mode below 40% and ends the session below 10%. Those are the defaults. You can change both in Settings, and an end floor of 0 turns the battery end off. The heat rules turn on Low Power Mode when the Mac gets seriously hot and end the session at critical heat. They are on by default, and Settings can turn them off. All of these rules only work while the app runs.

Before your first session, check Settings. Then run a short session you can watch, and read ~/Library/Logs/Insomnia/insomnia.log afterward.

What happens when the lid closes

During a session, closing the lid does each of these, and opening it tries to undo them. The timer keeps counting down while the lid is closed.

  • Display and keyboard light go off. Insomnia saves their brightness first. With sleep turned off, macOS no longer does this by itself.
  • Apps on the freeze list are frozen. Freezing sends an app's processes SIGSTOP, which pauses them until SIGCONT on lid open. The list starts with Slack, WhatsApp and Discord. "Freeze every other app" is off by default. Even when on, it skips meeting, recording and dictation apps: Zoom, Teams, Webex, FaceTime, Wispr Flow, Granola, Otter, OBS and Loom.
  • Audio is muted. Lid open unmutes each output Insomnia muted, even if you switched to another one.
  • Low Power Mode turns on. It turns off when the lid opens, unless a battery or heat rule still needs it.
  • Docker Desktop is frozen when no container runs. This one is off by default.

On Mac laptops with Apple silicon or a T2 chip, closing the lid disconnects the built-in microphone in hardware. Recording a meeting with the lid closed needs AirPods or an external mic.

docs/lid-close.md has the details: how Docker is checked, how brightness is restored, the one-time settings change when you upgrade, and how to test lid actions without closing the lid.

How recovery works

Insomnia writes each change to a recovery journal, a file on disk, before it makes the change. Ending the session tries to undo what the journal lists. If the app crashes or quits, the recovery agent tries the same once the session's end time has passed.

Some things need you:

  • The recovery agent can't restore audio. Open Insomnia again for that.
  • The recovery agent doesn't watch the battery or the temperature.
  • Insomnia only unfreezes a process it can prove it froze. A frozen process it can't prove stays frozen until you check it.

If the menu shows a recovery warning, deal with it before you leave the Mac alone. docs/recovery.md explains each case.

Optional extras

// HOW IT'S BUILT

KEY FILES

skills/install-insomnia/SKILL.mdREADME.md

// REPO STATS

563 stars