anti-sleep
Fungsinya
Mencegah Mac Anda tidur otomatis saat menjalankan tugas panjang seperti unduhan atau pembaruan. Fitur ini membuat layar tetap menyala dan sistem tetap aktif.
Kapan dipakai
- โSelama unduhan atau pembaruan yang memakan waktu lama.
- โSaat menjalankan program yang membutuhkan waktu lama.
- โSaat Anda tidak ingin Mac tidur dalam jangka waktu tertentu.
Link skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/anti-sleep/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
โJaga Mac saya tetap aktif selama 3 jam.โ
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Tool ini memakai perintah bawaan Mac bernama `caffeinate`. Anda menentukan berapa lama Mac harus tetap aktif, atau sampai tugas tertentu selesai.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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.
Pertanyaan umum
Bagaimana saya tahu bahwa fitur ini berjalan?
Anda bisa memeriksa apakah perintah `caffeinate` sedang berjalan di Mac Anda. Perintah ini tidak menampilkan apa pun di layar, jadi mungkin terlihat seperti tidak melakukan apa-apa, padahal sebenarnya bekerja.
Bagaimana cara menghentikannya lebih awal?
Jika Anda menjalankan perintah ini, perintah akan memberikan sebuah nomor (PID). Anda bisa memakai nomor ini untuk menghentikan proses sebelum waktunya habis.
Apakah ini membuat lampu keyboard tetap menyala?
Tidak, `caffeinate` tidak mengatur lampu latar keyboard. Anda perlu mengatur pengaturan Mac secara manual untuk itu.
Detail
Deskripsi asli dari pembuat
Keep a Mac awake with caffeinate during long builds, downloads, or supervised automation runs.
Popularitas
- Bintang GitHub
- 48k
- Peringkat
- #3754
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- โฆ
Skill lain dari repositori ini
00-andruia-consultant
48kMembantu agent Anda memulai atau meningkatkan proyek AI. Agent menganalisis kode, menyarankan tools, dan membuat rencana aksi dalam bahasa Spanyol.
007
48kMemungkinkan agent Anda melakukan audit keamanan dan threat modeling. Berguna untuk melindungi proyek dari serangan dan celah keamanan.
10-andruia-skill-smith
48kMembantu agent Anda membuat atau meningkatkan tools AI. Agent mendefinisikan cara kerja tools, menulis dokumentasi, dan memvalidasi strukturnya.
20-andruia-niche-intelligence
48kMemungkinkan agent Anda membuat ringkasan industri tertentu. Berguna untuk memahami konteks, aturan, pola penggunaan, dan risiko proyek dengan sumber terpercaya.
Skill serupa
knowledge-automation
394kMembantu agent Anda mengatur tugas terjadwal yang memasukkan konten baru ke Knowledge vault Anda secara rutin, lalu memastikan tugas itu berjalan.
knowledge-source-ingest
394kMembantu agent Anda menjaga Knowledge vault tetap mutakhir dengan item baru dari chat, feed, atau kotak surat, tanpa menambahkan ulang yang sudah ada.
benchmark
280kMembantu agent Anda mengukur kecepatan dan performa kode. Berguna untuk memastikan semuanya cepat dan menemukan penyebab kelambatan.