Agent skill

Maintain Insomnia

by krishhgg in krishhgg/Insomnia

Check on, troubleshoot, or uninstall an installed Insomnia (the macOS menu bar app that keeps a Mac awake for a timed session).

MITAuto-check: notes

Install Maintain Insomnia

skills CLI
$ npx skills add krishhgg/Insomnia --skill maintain-insomnia -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install krishhgg/Insomnia maintain-insomnia --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/krishhgg/Insomnia.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/maintain-insomnia .claude/skills/maintain-insomnia && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
maintain-insomnia
GitHub stars
561
Token cost
~899 tokens
SKILL.md length
416 words
Files
1
Repo updated
First seen
Licence
MIT

At a glance

Check on, troubleshoot, or uninstall an installed Insomnia (the macOS menu bar app that keeps a Mac awake for a timed session).

  • Works in 4 steps: tail -n 100… → pmset -g | grep -i sleepdisabled shows 1… → cat ~/Library/Application\… → …
  • The user asks why Insomnia shows a warning
  • SKILL.md covers Rules, Check the state, Warnings in the menu and Uninstall
  • Calls brew

What it does

Maintain Insomnia is an agent skill from krishhgg/Insomnia. Check on, troubleshoot, or uninstall an installed Insomnia (the macOS menu bar app that keeps a Mac awake for a timed session). Use when the user asks why Insomnia shows a warning, whether a session cleaned up after itself, why the hotspot password stopped working, or how to remove it.

Its SKILL.md is about 900 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with macOS. The repository describes itself as: A macOS menu bar app that keeps a MacBook awake safely for timed agent sessions. The licence is MIT.

When your agent uses it

  • The user asks why Insomnia shows a warning
  • Whether a session cleaned up after itself
  • Why the hotspot password stopped working
  • How to remove it

Example prompts

  • “/maintain-insomnia”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. tail -n 100 ~/Library/Logs/Insomnia/insomnia.log shows what the app and
  2. pmset -g | grep -i sleepdisabled shows 1 while sleep is turned off.
  3. cat ~/Library/Application\ Support/Insomnia/state.json shows what is
  4. launchctl print gui/$(id -u)/com.insomnia.backstop shows whether the

What it can do on your machine

Read from SKILL.md and the folder at commit 2c116dd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • brew

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Maintain Insomnia loads about 899 tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 416 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~899

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:53
    `sudo kill <pid>` the menu shows.
  • NoteRuns commands with sudoSKILL.md:60
    `sudo pmset -a disablesleep 0`.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from krishhgg/Insomnia at commit 2c116dd, republished under its MIT licence (© krishhgg). 416 words, ~899 tokens.

Download SKILL.mdSave it as .claude/skills/maintain-insomnia/SKILL.md (or your agent's skills folder).
name
maintain-insomnia
description
Check on, troubleshoot, or uninstall an installed Insomnia (the macOS menu bar app that keeps a Mac awake for a timed session). Use when the user asks why Insomnia shows a warning, whether a session cleaned up after itself, why the hotspot password stopped working, or how to remove it.

Maintain Insomnia

Reference pages in https://github.com/krishhgg/Insomnia: docs/recovery.md, docs/install.md, docs/lid-close.md and docs/extras.md.

Rules

  • Never run sudo, pmset changes, kill or kill -CONT yourself. Show the user the command, say why, and let them run it.
  • Never edit or delete files in ~/Library/Application Support/Insomnia/. state.json there is the recovery journal: the list of changes Insomnia still has to undo.
  • Never signal a pid taken from an old log line. Pids get reused. Check it with ps -o pid,stat,lstart,command -p <pid> first.
  • Kong's Insomnia API client uses the same support folder name. brew uninstall --zap insomnia for that app moves this app's journal to the Trash. Check which app the user means before anything like that.

Check the state

  1. tail -n 100 ~/Library/Logs/Insomnia/insomnia.log shows what the app and the recovery agent did last.

  2. pmset -g | grep -i sleepdisabled shows 1 while sleep is turned off.

  3. cat ~/Library/Application\ Support/Insomnia/state.json shows what is still waiting to be undone. These entries are pending:

    • sleepDisabledByUs, lowPowerSetByUs or dockerFrozen set to true
    • a non-empty frozenProcesses, appNapOverrides or savedAudioOutputs
    • savedOutputVolume or savedMuted
    • savedDisplayBrightness or savedKeyboardBrightness, unless displayRestoreRefused or keyboardRestoreRefused is true

    Other keys, such as keptDisplayReadLit, keptDisplayUnderLowPower and displayRestoredUnderLowPower, are records the app keeps, not changes to undo. A brightness value kept after a refused restore blocks nothing. Saved audio for an output that isn't connected waits for it to reconnect and doesn't block ending a session.

  4. launchctl print gui/$(id -u)/com.insomnia.backstop shows whether the recovery agent is loaded.

Show full SKILL.md (173 more words)Show less

Warnings in the menu

Match the warning to docs/recovery.md, "Recovery limits and manual attention".

  • A stuck power command with a pid. The user checks the pid, then runs the sudo kill <pid> the menu shows.
  • Stopped processes Insomnia cannot prove it froze. The user checks each pid with ps and decides whether to run kill -CONT <pid>.
  • An output device still muted. Reconnect it and open Insomnia, or choose "Stop waiting for <device>" in the menu.
  • Sleep disabled by something else. Insomnia did not set it and leaves it alone. Whoever set it turns sleep back on with sudo pmset -a disablesleep 0.
  • Hotspot password unreadable by this build. A reinstall changes the app's signature. Enter the password again in Settings.

Uninstall

Follow "Uninstall" in docs/install.md and hand the user the command, since it asks for the password. It stops when something is still waiting to be undone. Fix that first, then run it again. A failed uninstall does not mean the power settings are back to normal, so check pmset -g afterward.

© krishhgg, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/maintain-insomnia of krishhgg/Insomnia.

Open the folder on GitHubat commit 2c116dd

Compare with similar skills

Maintain Insomnia next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Maintain Insomnia compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Maintain Insomnia this skillkrishhgg/Insomnia561—~899Automated safety check: NotesMIT
Site ArchitectureAvdLee/RocketSimApp80611 repos~3.3kAutomated safety check: PassCustom licence
Engine Whats Newflutter/flutter180k—~978Automated safety check: PassBSD-3-Clause
macOS Spm App PackagingDimillian/Skills4k5 repos~1.2kAutomated safety check: PassMIT
Openclaw Live Updateropenclaw/openclaw392k—~3.7kAutomated safety check: PassMIT
Orca iOS Simulator Controlstablyai/orca89k1 repos~584Automated safety check: PassApache-2.0

Similar skills

  • Site Architecture

    AvdLee/RocketSimApp

    When the user wants to plan, map, or restructure their website's page hierarchy, navigation, URL structure, or internal linking.

    806 GitHub starsUsed in 11 repos~3.3k tokens
    Marketing & SEOAuto-check passed
  • Engine Whats New

    flutter/flutter

    Generates the "what's new" release summary and diff file for changes in the Flutter engine (//engine/src/flutter) between two releases (e.g., 3.47 vs 3.44).

    180k GitHub stars~978 tokensUpdated today
    MobileAuto-check passed
  • macOS Spm App Packaging

    Dimillian/Skills

    Scaffold, build, and package SwiftPM-based macOS apps without an Xcode project.

    4k GitHub starsUsed in 5 repos~1.2k tokens
    MobileAuto-check passed
  • Openclaw Live Updater

    openclaw/openclaw

    Maintain the canonical live OpenClaw main checkout, macOS LaunchAgent-managed Gateway, local macOS app, exact-head main CI, and recurring full release validation.

    392k GitHub stars~3.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • iOS Simulator control from inside Orca, with the live device view in Orca's emulator pane. Use when driving a booted Apple Simulator on macOS: taps, gestures…

    89k GitHub starsUsed in 1 repo~584 tokens
    MobileAuto-check passed
  • A catalog of recurring bug shapes in the Mole Mac cleaner, used to review safety-sensitive diffs for deletion safety, unbounded commands, shell traps and weak tests.

    70k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed

More from krishhgg/Insomnia

  • Install Insomnia

    krishhgg/Insomnia

    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.

    561 GitHub stars~617 tokensUpdated today
    Auto-check passed

Works with

Questions about Maintain Insomnia

What does Maintain Insomnia do?

Check on, troubleshoot, or uninstall an installed Insomnia (the macOS menu bar app that keeps a Mac awake for a timed session). Maintain Insomnia is an agent skill from krishhgg/Insomnia. Check on, troubleshoot, or uninstall an installed Insomnia (the macOS menu bar app that keeps a Mac awake for a timed session).

When should I use Maintain Insomnia?

Maintain Insomnia fits situations like: the user asks why Insomnia shows a warning; whether a session cleaned up after itself; why the hotspot password stopped working; how to remove it.

How do I install Maintain Insomnia in Claude Code?

Run `npx skills add krishhgg/Insomnia --skill maintain-insomnia -a claude-code`. Or copy the skill folder (skills/maintain-insomnia in krishhgg/Insomnia) into .claude/skills/maintain-insomnia in your project. Claude Code loads it when a task matches its description.

How do I install Maintain Insomnia in Codex?

Run `npx skills add krishhgg/Insomnia --skill maintain-insomnia -a codex`. Or copy the skill folder (skills/maintain-insomnia in krishhgg/Insomnia) into .agents/skills/maintain-insomnia in your project. Codex loads it when a task matches its description.

Can I use Maintain Insomnia in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add krishhgg/Insomnia --skill maintain-insomnia -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/maintain-insomnia, .gemini/skills/maintain-insomnia, .github/skills/maintain-insomnia and .opencode/skills/maintain-insomnia in your project.

What does Maintain Insomnia need to run?

Going by SKILL.md and its folder, Maintain Insomnia needs the command-line tools its instructions call (brew).

Does Maintain Insomnia access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Maintain Insomnia safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Maintain Insomnia use?

Maintain Insomnia is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Maintain Insomnia use?

About 899 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Maintain Insomnia?

Skills that share tags, products or a category with Maintain Insomnia: Site Architecture (AvdLee/RocketSimApp, 806 stars), Engine Whats New (flutter/flutter, 180k stars), macOS Spm App Packaging (Dimillian/Skills, 4k stars) and Openclaw Live Updater (openclaw/openclaw, 392k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Maintain Insomnia?

krishhgg (a GitHub user) maintains it in krishhgg/Insomnia, which has 561 GitHub stars. The repository was last updated on October 11, 2026.

Source: krishhgg/Insomnia on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.