AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Caffeinate Computer

skill-jtsternberg-claude-plugins-caffeinate-computer · by jtsternberg

Keep the Mac awake during long-running agents, builds, or commands via macOS caffeinate.

No reviews yet
0 installs
11 views
0.0% view→install

Install

$ agentstack add skill-jtsternberg-claude-plugins-caffeinate-computer

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-jtsternberg-claude-plugins-caffeinate-computer)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5d ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Caffeinate Computer? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

caffeinate — keep the Mac awake

macOS ships caffeinate. Use it. No daemons, no apps, no half-open laptops in airports.

Platform check

If uname is not Darwin, say so and stop:

> Not macOS — caffeinate is a macOS-only tool. On Linux, use systemd-inhibit, caffeine, or xset s off -dpms depending on environment.

The three patterns

Pick based on what the user is doing.

1. Tie wakefulness to a running process (preferred)

When there's already a PID — a running claude session, build, sync, agent loop:

caffeinate -i -w  &
  • -i prevents idle sleep
  • -w exits caffeinate when that PID exits
  • & backgrounds it so the shell stays usable

Find the PID with pgrep -f claude or echo $$ from inside the long-running shell.

2. Wrap a command

When launching the long task fresh:

caffeinate -i 

caffeinate exits the moment the wrapped command exits. Cleanest pattern — no orphan processes, no manual cleanup.

3. Time-bounded, full lockout (overnight runs, lid closed)

caffeinate -dimsu -t 28800   # 8 hours
  • -d display sleep
  • -i idle sleep
  • -m disk sleep
  • -s system sleep (only effective on AC power)
  • -u declares user activity (resets idle timer for 5s, useful as a one-shot nudge)
  • -t auto-expire so it can't run forever

Use -s only when plugged in. On battery, drop it: caffeinate -dim -t .

Lid-closed (clamshell) caveat

caffeinate alone does not keep a MacBook awake with the lid shut on battery. For true clamshell-while-unplugged you need external power + display + input, or a tool like InsomniaX/Amphetamine. Tell the user this if they ask about closing the lid.

Picking the flag set

| Goal | Flags | |---|---| | Just stop idle sleep during a task | -i | | Also keep the display on (watching output) | -di | | Long unattended run, plugged in | -dimsu -t | | Tied to a specific PID | add -w |

man caffeinate has the full list. Don't invent flags.

What to do for the user

  1. Confirm macOS (unameDarwin).
  2. Ask (or infer) whether there's a PID to attach to, a command to wrap, or just a time window.
  3. Build the exact one-liner from the patterns above. Show it. Run it if they want, otherwise hand it over.
  4. Mention how to stop it: kill %1 for backgrounded &, or it self-exits when the PID/command/timer ends.

Keep it tight. One command, one line of explanation.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.