본문으로 건너뛰기
Skillpedia
자동화48k · #3754

anti-sleep

하는 일

다운로드나 업데이트처럼 오래 걸리는 작업 중에 Mac이 자동으로 잠들지 않도록 막습니다. 화면을 켜 두고 시스템을 깨어 있게 유지합니다.

사용하는 경우

  • ✓오래 걸리는 다운로드나 업데이트 중에.
  • ✓오래 실행되는 프로그램을 돌릴 때.
  • ✓특정 기간 동안 Mac이 잠들지 않기를 원할 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/anti-sleep/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Mac을 3시간 동안 깨어 있게 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

Mac에 내장된 명령 `caffeinate`를 사용합니다. Mac을 얼마나 오래 깨어 있게 할지, 또는 특정 작업이 끝날 때까지 깨어 있게 할지 지정합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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.
자주 묻는 질문

작동하고 있는지 어떻게 알 수 있나요?

Mac에서 `caffeinate` 명령이 실행 중인지 확인할 수 있습니다. 화면에는 아무것도 표시되지 않아 아무 일도 하지 않는 것처럼 보일 수 있지만, 실제로는 작동하고 있습니다.

일찍 멈추려면 어떻게 하나요?

명령을 시작했다면 번호(PID)가 제공됩니다. 이 번호를 사용해 시간이 다 되기 전에 프로세스를 멈출 수 있습니다.

키보드 백라이트도 켜 둘 수 있나요?

아니요, `caffeinate`는 키보드 백라이트를 제어하지 않습니다. 그 설정은 Mac 설정에서 직접 조정해야 합니다.

상세 정보

작성자의 원본 설명

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

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#3754
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬