Zum Inhalt springen
Skillpedia
Automatisierungen48k · #3754

anti-sleep

Was er macht

Verhindert, dass dein Mac bei langen Aufgaben wie Downloads oder Updates automatisch in den Ruhemodus wechselt. Der Bildschirm bleibt an und das System bleibt wach.

Wann du ihn nutzt

  • ✓Bei längeren Downloads oder Updates.
  • ✓Wenn Programme laufen, die lange dauern.
  • ✓Wenn dein Mac für einen bestimmten Zeitraum nicht in den Ruhemodus gehen soll.

Link zum Skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/anti-sleep/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/anti-sleep/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Halte meinen Mac drei Stunden lang wach.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Es nutzt einen eingebauten Mac-Befehl namens `caffeinate`. Du legst fest, wie lange der Mac wach bleiben soll, oder bis eine bestimmte Aufgabe fertig ist.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Anti-Sleep (macOS caffeinate)

When to Use

  • Use when the user wants the Mac to stay awake during a long supervised task.
  • Use when a build, download, or automation run should not be interrupted by sleep.

Keep the Mac awake using the built-in caffeinate command. No install needed.

Quick start — the standard command

caffeinate -d -i -t 7200    # full power: screen stays on + no idle sleep, for 2 hours

Duration is -t <seconds>: 2h = 7200, 7h = 25200, overnight (9h) = 32400.

Aggressiveness levels

Flags Effect
-i prevents idle system sleep only (screen may still dim/lock)
-d prevents display sleep (screen stays on)
-d -i default choice — screen on + system awake
-d -i -s adds -s: prevents sleep even on AC power semantics; -s only works when plugged in
-u -t 1 simulates user activity — wakes the display right now

Default to -d -i -t <seconds> unless the user says otherwise.

Tie to a process instead of a timer

caffeinate -d -i -w <PID>          # stays awake until that process exits (great for builds)
caffeinate -i npm run build       # wraps a command; exits when the command finishes

Run it in a visible terminal (cmux pane)

Prefer running it in the user's own terminal pane so it's visible and easy to Ctrl+C. In cmux (read the cmux skill first if interacting with panes):

cmux send --surface surface:<N> "caffeinate -d -i -t 25200\n"

Otherwise run it as a background Bash task. Never block your own foreground shell with it.

Verify and monitor

pgrep -fl caffeinate                       # is it running? shows exact flags
ps -o etime= -p <PID>                      # how long it's been running
pmset -g assertions    # inspect PreventUserIdleSystemSleep / PreventUserIdleDisplaySleep        # confirm sleep assertions are active

Gotcha: caffeinate prints nothing and holds the prompt — it looks "stuck" or like Enter wasn't pressed. It isn't stuck. Verify with pgrep, not by looking at the terminal.

Expiry: with -t it exits silently when time runs out — no notification. If the user asks "is it still on?" after hours, check pgrep first; it may simply have expired.

Keyboard backlight

caffeinate cannot keep the keyboard backlight on — it has its own inactivity timer with no CLI/API on Apple Silicon (researched 2026-07). Fix is manual, one-time: System Settings > Keyboard > "Turn keyboard backlight off after inactivity" > Never.

Stop early

kill <recorded-caffeinate-PID>    # or Ctrl+C in the pane running this task

Record the PID of the process started for this task; verify its command before stopping it. Do not stop unrelated caffeinate sessions by a broad pattern.

After starting: confirm to the user the PID, the flags, and the wall-clock time it will expire.

Limitations

  • Adapted from davidondrej/skills; verify local paths, tools, credentials, and agent features before acting.
  • For commands, remote access, scheduling, browser automation, or file-changing workflows, get explicit user approval and confirm the target environment first.
Häufige Fragen

Woran erkenne ich, dass es funktioniert?

Du kannst prüfen, ob der Befehl `caffeinate` auf deinem Mac läuft. Auf dem Bildschirm wird nichts angezeigt, deshalb wirkt es vielleicht so, als würde nichts passieren, aber es arbeitet.

Wie stoppe ich es vorzeitig?

Wenn du den Befehl gestartet hast, gibt er eine Nummer (PID) aus. Mit dieser Nummer kannst du den Prozess beenden, bevor die Zeit abgelaufen ist.

Bleibt damit auch die Tastaturbeleuchtung an?

Nein, `caffeinate` steuert die Tastaturbeleuchtung nicht. Dafür musst du die Einstellungen deines Macs manuell anpassen.

Details

Originalbeschreibung des Autors

Keep a Mac awake with caffeinate during long builds, downloads, or supervised automation runs.

repo: sickn33/agentic-awesome-skills

Beliebtheit

GitHub-Sterne
48k
Platz im Ranking
#3754
Lizenz
MIT
Aktualisiert
15.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills