agentleFS
krishhggkrishhgg/Insomnia/skills/maintain-insomnia/SKILL.md

maintain-insomnia

Skill1.7k starsChanged 14 days agoMITView on GitHub

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.

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never run sudo, pmset changes, kill or kill -CONT yourself.

    line 16
  2. Very specific:

    Never edit or delete files in ~/Library/Application Support/Insomnia/.

    line 18
  3. Very specific:

    Never signal a pid taken from an old log line.

    line 21
  4. Very specific:

    Follow "Uninstall" in docs/install.md and hand the user the command, since it asks for the password.

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.

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.

Download now (ZIP)

Trending

More talk lately.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 3 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the krishhgg/Insomnia repository that our weekly crawl found: only 3 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.