Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By duckysmackyv1.0.0In 1 marketplace
Keeps a Linux laptop awake with the lid closed while an AI coding agent works, using a systemd-logind inhibitor lock. Modes: off, task, session.
Claude loads one when your task matches it, or you run it by name.
1 critical · 2 cautions to review before installing
JavaScript or TypeScript that runs inside Claude Code as you, unsandboxed. Read from its source, it runs programs; writes files; reads files; reads environment variables (HOME).
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Keeps a Linux laptop awake with the lid closed while an AI coding agent works. Plugin with hooks for Claude Code and Codex, skill + script for any other agent.
Set with /lid-guard <mode> ($lid-guard <mode> on Codex), /lid-guard alone shows the status.
| Mode | Behaviour |
|---|---|
off | Does nothing. |
task | Lock held while a prompt is being worked on, released when the agent stops. |
session | Lock taken on the first prompt and held until the agent exits. Default. You can prompt again with the lid closed. Battery drains while the lid stays closed. |
The mode is a one-word file that survives restarts:
| Agent | File |
|---|---|
| Claude Code | ~/.claude/lid-guard-mode |
| Codex | ~/.codex/lid-guard-mode |
| other (default) | ~/.agents/lid-guard-mode |
--agent <name> | ~/.<name>/lid-guard-mode |
LID_GUARD_MODE=off|task|session overrides the file.
systemd-inhibit (without systemd the hooks are silent no-ops)jqPlugin: hooks plus the /lid-guard command.
claude plugin marketplace add duckysmacky/duckysmacky-plugin-marketplace
claude plugin install lid-guard@duckysmacky
The plugin also ships a dashboard mod (Claude Code only): one line above the prompt with the lock status (● held / ● idle / ● off) and clickable off task session toggles. Collapse it with the [-] at the right or ctrl+x ctrl+a. Codex ignores it.
Plugin: hooks plus the $lid-guard skill
codex plugin marketplace add duckysmacky/duckysmacky-plugin-marketplace
codex plugin add lid-guard@duckysmacky
Skill plus script, installed with skills:
npx skills add duckysmacky/lid-guard-plugin # project install
npx skills add duckysmacky/lid-guard-plugin -g # user-wide (~/.agents/skills/lid-guard for most agents)
npx skills add duckysmacky/lid-guard-plugin -a <agent> # pick the agent
The script is installed inside the skill folder. Without hooks the agent cannot be trusted to call it at the right time, so the reliable way is a wrapper that holds the lock for the whole agent process:
~/.agents/skills/lid-guard/scripts/lid-guard.sh run -- <agent command>
--agent <name> before run to keep the mode file in ~/.<name>/ instead of ~/.agents/./lid-guard <mode> skill. It will run acquire before long work and release after, on a best-effort basis.lid-guard.sh in the repo root is a standalone script for turning the guard on and off by hand, independent of any agent or hook. It needs only systemd-inhibit.
You can use it without the agent plugin as a standalone script to prevent your laptop from sleeping.
./lid-guard.sh on # keep the machine awake with the lid closed
./lid-guard.sh off # back to normal
./lid-guard.sh status
It holds its own inhibitor and creates ~/.lid-guard while on. It does not share state with the agent modes above.
| Hook | Action |
|---|---|
UserPromptSubmit | acquire a logind inhibitor (sleep + handle-lid-switch) |
PostToolUse | acquire again (no-op if the lock is fresh), so a mode switch mid-turn heals |
Stop, Interrupt | release the lock in task mode, keep it in session mode |
SessionEnd | release the lock in every mode (exit, /clear, resume) |
task locks are bounded leases (LID_GUARD_LEASE_SECONDS, default 1800), renewed on activity, so a missed Stop (Esc, crash) expires instead of leaking.session locks are tied to the agent process (tail --pid), so exiting or killing the agent releases them.off or task releases existing locks right away.Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
lid-guard@duckysmacky is listed by duckysmacky/duckysmacky-plugin-marketplace — review the source before installing
npx claudepluginhub duckysmacky/duckysmacky-plugin-marketplace --plugin lid-guardPlugins from other owners that cover similar ground