anti-sleep
Qué hace
Evita que tu Mac entre en suspensión automáticamente durante tareas largas, como descargas o actualizaciones. Mantiene la pantalla encendida y el sistema activo.
Cuándo usarla
- ✓Durante descargas o actualizaciones largas.
- ✓Cuando ejecutas programas que tardan mucho tiempo.
- ✓Cuando no quieres que tu Mac se duerma durante un periodo concreto.
Link de la skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/anti-sleep/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Mantén mi Mac despierto durante 3 horas.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Usa un comando integrado de Mac llamado `caffeinate`. Tú indicas durante cuánto tiempo debe mantenerse despierto el Mac o hasta que termine una tarea concreta.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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.
Preguntas frecuentes
¿Cómo sé si está funcionando?
Puedes comprobar si el comando `caffeinate` se está ejecutando en tu Mac. No muestra nada en pantalla, así que puede parecer que no hace nada, pero sí está activo.
¿Cómo lo detengo antes de tiempo?
Si iniciaste el comando, te muestra un número (PID). Puedes usar ese número para detener el proceso antes de que se acabe el tiempo.
¿Mantiene encendida la retroiluminación del teclado?
No, `caffeinate` no controla la retroiluminación del teclado. Para eso tienes que ajustar manualmente la configuración de tu Mac.
Detalles
Descripción original del autor
Keep a Mac awake with caffeinate during long builds, downloads, or supervised automation runs.
Popularidad
- Estrellas en GitHub
- 48 mil
- Posición en el ranking
- #3754
- Licencia
- MIT
- Actualizada
- 15/10/2026
Comentarios
- …
Más skills de este repositorio
00-andruia-consultant
48 milAyuda a tu agente a iniciar o mejorar proyectos de IA. Analiza código, sugiere herramientas y crea planes de acción en español.
007
48 milPermite que tu agente realice auditorías de seguridad y modelado de amenazas. Es útil para proteger proyectos contra ataques y vulnerabilidades.
10-andruia-skill-smith
48 milAyuda a tu agente a crear o mejorar herramientas de IA. Define cómo funcionan, escribe la documentación y valida la estructura.
20-andruia-niche-intelligence
48 milPermite que tu agente cree un resumen de un sector específico. Es útil para entender su contexto, normas, patrones de uso y riesgos, usando fuentes fiables.
Skills parecidas
knowledge-automation
394 milAyuda a tu agente a configurar una tarea recurrente que añade contenido nuevo a tu bóveda de Knowledge según un horario, y después comprueba que la tarea funciona.
knowledge-source-ingest
394 milAyuda a tu agente a mantener al día una bóveda de Knowledge con elementos nuevos de canales de chat, fuentes o buzones, sin volver a añadir lo que ya tiene.
benchmark
280 milAyuda a tu agente a medir la velocidad y el rendimiento del código. Es útil para asegurar que todo vaya rápido y encontrar problemas de lentitud.