AI Tools & Scripts
MacBook Low Power Mode Off for Heavy Builds and Tests
Keep your MacBook in Low Power Mode for everyday work, but run cargo/go builds, Docker, make, npm builds, pytest and backtests at full speed, then get your own setting back, even after a kill or a timeout.
What you get: 1 file · 12.17 KB · ZIP
See purchase optionsProduct description
Low Power Mode is great on battery until a build or test suite takes twice as long. This skill turns it off for exactly the heavy job and restores your own setting (battery and charger separately) when the job ends.
What is inside
- lpm-hold: a small bash tool that runs a command under a "hold". Holds are counted across parallel sessions, so the mode comes back only when the last heavy job ends. A detached watcher restores it even after exit, SIGKILL, a process-group kill or a tool timeout.
- lpm-sudo-setup.sh: one-time setup that adds an exact-match sudoers rule (only pmset -a lowpowermode 0 and pmset -b|-c lowpowermode 0|1, no wildcards) and turns off idle sleep on battery. You run it yourself after reading it.
- lpm-hook.py: optional Claude Code PreToolUse hook for the Bash tool. It spots heavy local commands (cargo, go, docker build/compose, make, npm/pnpm/yarn builds, tsc, pytest, backtest/sweep scripts) and wraps them in the same shell, so cd carries over, the exit code is kept and zsh syntax works. It ignores text in quotes and heredocs, skips ssh/remote commands and never blocks a command.
- test_lpm_hold.py: a self-test with a fake pmset (no root needed) covering a table of heavy and non-heavy commands, overlapping sessions, kills, busy locks and failed restores.
- SKILL.md: install steps the agent follows only with your yes, manual use without the hook, a how-to-prove-it recipe and honest limits.
Limits: macOS only; closing the lid still sleeps the Mac; a manual mode change during a heavy job is overwritten by the restore; heavy programs hidden behind an alias, a variable or bash -c are not detected by the hook (prefix them with lpm-hold).
Example request
My MacBook is on battery in Low Power Mode and cargo builds are slow. Set it up so heavy builds run at full speed and Low Power Mode comes back after.
Example result
Example on a fictional setup. Following the skill, the agent first explained the one-time setup: lpm-sudo-setup.sh adds a sudoers rule that allows only the five exact pmset lowpowermode commands, and turns off idle sleep on battery. After the user said yes, it installed lpm-hold to ~/.claude/bin, asked the user to run sudo ~/.claude/bin/lpm-sudo-setup.sh in their own terminal (it printed SETUP OK), and, at the user's request, added the PreToolUse hook entry to ~/.claude/settings.json next to the existing hooks.
It then ran the self-test: 0 failures. To prove the effect it timed the same CPU loop three times each way. A plain command reported lowpowermode 1. The same loop started with make was wrapped by the hook automatically, reported lowpowermode 0 inside the job and ran noticeably faster. A plain command afterwards reported lowpowermode 1 again, with no state left in ~/.claude/state/lpm-hold. The agent reported the before/during/after numbers, and listed the limits: lid close still sleeps, and commands hidden behind aliases are not detected.
Requirements
- macOS (MacBook with Low Power Mode)
- Python 3, bash and perl (built in on macOS)
- Admin password once, for a narrow sudoers rule that allows only pmset lowpowermode calls
- Claude Code (for the optional automatic hook)
How to install
Unzip into your Claude Code skills folder (~/.claude/skills/ or .claude/skills/ in a project) and start a new session; the skill loads by its description.
What you get
1 file · 12.17 KB
- low-power-mode-heavy-jobs.zipZIP · 12.17 KB
AI Tools & Scripts
MacBook Low Power Mode Off for Heavy Builds and Tests
Keep your MacBook in Low Power Mode for everyday work, but run cargo/go builds, Docker, make, npm builds, pytest and backtests at full speed, then get your own setting back, even after a kill or a timeout.
Getly opened the uploaded files and found nothing that would stop them opening. It is not a virus scan or a quality rating.
Tags
Frequently asked questions
Do I get access instantly?
Yes. This is a digital product - you can download it right after checkout, straight from your library.
Can I use it for commercial projects?
Yes. Commercial use is allowed: use it in your own business and in things you sell. You may not resell or redistribute the file itself.
What's your refund policy?
You can request a refund within 30 days. If something isn't right, request it from your order and the Getly team reviews it.
What file formats and sizes will I get?
You'll download 1 file - ZIP - 12.17 KB in total.
Do I get free updates?
Yes - when the seller ships a new version, you can re-download the latest files from your library at no extra cost. Check the changelog for recent updates.
Price
$7.00



