AgentStack
SKILL verified MIT Self-run

Unattended Power

skill-ridwanahmed06-claude-skills-unattended-power · by ridwanahmed06

Use when the user starts a long unattended run (renders, batch generation, training, big downloads) and wants the PC to save energy without interrupting the work — keeps the PC awake, turns the screen off, restores original settings afterward, and optionally shuts the PC down when the work fully completes. Also use when the user says "restore my power settings".

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

Install

$ agentstack add skill-ridwanahmed06-claude-skills-unattended-power

✓ 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.

Are you the author of Unattended Power? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Unattended-Run Power Setup (Windows)

Configure the PC so a long unattended task keeps running while wasting as little energy as possible: sleep disabled (sleep would freeze the task), display off after 2 minutes (the display is the biggest zero-value consumer), power plan left alone (throttling the CPU makes work take longer — a net energy loss).

Arguments

  • (none) — apply the setup for the current run.
  • shutdown — additionally shut the PC down when this session's work fully completes.
  • restore — put the original settings back now (use if a previous session never restored).

Step 1 — Capture current settings (ALWAYS before changing anything)

$scheme = (powercfg /getactivescheme) -replace '.*GUID: ([a-f0-9-]+).*','$1'
powercfg /q $scheme SUB_VIDEO VIDEOIDLE | Select-String "Current (AC|DC) Power Setting"
powercfg /q $scheme SUB_SLEEP STANDBYIDLE | Select-String "Current (AC|DC) Power Setting"
powercfg /q $scheme SUB_SLEEP HIBERNATEIDLE | Select-String "Current (AC|DC) Power Setting"

The hex values are SECONDS (e.g. 0x708 = 1800s = 30 min; 0x0 = never). Convert to minutes and write a restore script to the FIXED path $env:TEMP\unattended-power-restore.ps1 (fixed so a later session can find it) with the six original values:

# unattended-power restore script — original values captured 
powercfg /change monitor-timeout-ac 
powercfg /change monitor-timeout-dc 
powercfg /change standby-timeout-ac 
powercfg /change standby-timeout-dc 
powercfg /change hibernate-timeout-ac 
powercfg /change hibernate-timeout-dc 

If the captured values ALREADY look like this skill's setup (sleep 0, monitor 2), a previous session probably never restored — tell the user and ask whether to use the known Windows defaults (monitor 30 AC / 3 DC, sleep 30 AC / 10 DC) for the restore script instead.

Step 2 — Apply the unattended setup

powercfg /change monitor-timeout-ac 2
powercfg /change monitor-timeout-dc 2
powercfg /change standby-timeout-ac 0
powercfg /change standby-timeout-dc 0
powercfg /change hibernate-timeout-ac 0
powercfg /change hibernate-timeout-dc 0

Hibernate matters (learned live 2026-07-10): disabling standby alone is NOT enough — a separate hibernate idle timer (30 min AC on this machine) suspended the PC mid-run and killed the network stack (ERR_NETWORK_IO_SUSPENDED). Both timers must be zeroed. Note: a closed laptop lid still sleeps the machine regardless of these settings — leave the lid open.

Verify sleep is really off (must print 0x00000000 for AC and DC):

$scheme = (powercfg /getactivescheme) -replace '.*GUID: ([a-f0-9-]+).*','$1'
powercfg /q $scheme SUB_SLEEP STANDBYIDLE | Select-String "Current (AC|DC) Power Setting"

Tell the user: sleep is off, screen sleeps in 2 min, power plan untouched, and where the restore script is.

Step 3 — When the session's work completes

  1. Restore settings: powershell -File $env:TEMP\unattended-power-restore.ps1
  2. Only if the user asked for shutdown AND every task succeeded:

shutdown /s /t 120 — tell the user shutdown /a cancels it within the 2-minute window.

  1. If anything failed or needs user input: do NOT shut down. Restore settings, leave

the PC on, and report where things stopped.

Rules

  • NEVER shut down on a partial or failed run — a dark PC hides the failure.
  • ALWAYS capture before applying; never overwrite an existing restore script that has

yet to be run (that would erase the true original values).

  • Do not close user apps, kill processes, or change the power plan — energy saving here

is display + no-sleep only.

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.