caffeine
Prevent the computer screen and system from falling asleep on macOS or Windows. Use when the user wants to keep their display awake, disable sleep, or run a long task without interruption.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- caffeine
- description
- Prevent the computer screen and system from falling asleep on macOS or Windows. Use when the user wants to keep their display awake, disable sleep, or run a long task without interruption.
02 资源文件 1
- 参考文档_meta.json269 B
03 SKILL.md 正文
Caffeine
Keeps your computer awake by preventing display and system sleep.
Quick Start
macOS
caffeinate -d
Windows (PowerShell)
# Keep display awake until Ctrl+C
while ($true) {
$wsh = New-Object -ComObject WScript.Shell
$wsh.SendKeys('{SCROLLLOCK}{SCROLLLOCK}')
Start-Sleep -Seconds 60
}
macOS
Uses the built-in caffeinate command (no installation needed).
Options
| Command | Effect |
|---|---|
caffeinate |
Prevent sleep until terminated |
caffeinate -d |
Prevent display from sleeping |
caffeinate -i |
Prevent idle sleep |
caffeinate -s |
Prevent system sleep (AC power only) |
caffeinate -t 3600 |
Prevent sleep for 1 hour (seconds) |
caffeinate -d -t 1800 |
Keep display on for 30 minutes |
Examples
Keep display on for 2 hours:
caffeinate -d -t 7200
Keep awake while a command runs:
caffeinate -i -- long-running-command
Run in background:
caffeinate -d &
# To stop later:
pkill caffeinate
Check if running:
pgrep -l caffeinate
Windows
Option 1: PowerShell (no install)
Prevent sleep by simulating activity (Ctrl+C to stop):
while ($true) {
$wsh = New-Object -ComObject WScript.Shell
$wsh.SendKeys('{SCROLLLOCK}{SCROLLLOCK}')
Start-Sleep -Seconds 60
}
Option 2: powercfg (change power settings)
Disable sleep temporarily:
# Disable sleep on AC power
powercfg /change standby-timeout-ac 0
powercfg /change monitor-timeout-ac 0
# Re-enable later (e.g., 30 minutes)
powercfg /change standby-timeout-ac 30
powercfg /change monitor-timeout-ac 15
Option 3: Presentation mode
# Enable presentation mode (disables sleep + notifications)
presentationsettings /start
# Disable when done
presentationsettings /stop
Option 4: One-liner with .NET
# Prevent sleep for duration of script
Add-Type -AssemblyName System.Windows.Forms
while ($true) {
[System.Windows.Forms.Cursor]::Position = [System.Windows.Forms.Cursor]::Position
Start-Sleep -Seconds 60
}
Notes
- macOS:
caffeinateis built-in; process must stay running - Windows: PowerShell methods simulate activity;
powercfgchanges system settings - Press Ctrl+C to stop any running script
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.