An automated monitoring service that detects inactivity and shuts down the OpenClaw Gateway to optimize system resources.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install idle-shutdown
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install idle-shutdown using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
Gateway Idle Shutdown is a specialized utility within the Openclaw Skills ecosystem designed to monitor user session activity in real-time. It acts as an intelligent watchdog for your AI infrastructure, ensuring that the OpenClaw Gateway only consumes system resources when active communication is occurring between users and the bot. By tracking the modification times of session transcript files, it accurately determines when a gateway has become redundant.
This skill is essential for developers and system administrators who want to maintain high efficiency in their AI deployments. It bridges the gap between availability and resource conservation, providing a robust solution for managing the lifecycle of gateway processes without manual oversight. Implementing this through Openclaw Skills ensures your environment remains lean, cost-effective, and environmentally friendly.
# 1. Copy the script to your workspace
cp scripts/idle-shutdown.sh ~/.openclaw/workspace/scripts/
chmod +x ~/.openclaw/workspace/scripts/idle-shutdown.sh
# 2. Create the systemd service file
mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/openclaw-idle-watch.service << 'EOF'
[Unit]
Description=OpenClaw idle gateway shutdown watcher
After=openclaw-gateway.service
BindsTo=openclaw-gateway.service
PartOf=openclaw-gateway.service
[Service]
Type=simple
ExecStart=%h/.openclaw/workspace/scripts/idle-shutdown.sh
Restart=on-failure
RestartSec=10s
Environment=HOME=%h
Environment=PATH=%h/.local/bin:%h/bin:/usr/local/bin:/usr/bin:/bin
Environment=OPENCLAW_BIN=openclaw
[Install]
WantedBy=default.target
EOF
# 3. Enable and start the service
systemctl --user daemon-reload
systemctl --user enable openclaw-idle-watch.service
systemctl --user start openclaw-idle-watch.service
The skill manages its state and configuration through the following data structures:
| Variable | Default Value | Role |
|---|---|---|
| IDLE_SECONDS | 120 | The duration of inactivity required before triggering shutdown. |
| POLL_SECONDS | 10 | Frequency of session file checks. |
| SESSIONS_DIR | ~/.openclaw/agents/main/sessions | The source of truth for user activity timestamps. |
| LOG_FILE | ~/.openclaw/logs/idle-shutdown.log | Continuous audit trail of monitoring activity and shutdown events. |
| OPENCLAW_BIN | openclaw | The path to the executable responsible for gateway management. |
Loading
A battle-tested framework for organizing, auditing, and maintaining a clean and efficient workspace for your AI agents.

A robust framework for maintaining a structured, efficient, and clutter-free workspace for AI agents.

A comprehensive AI video suite for generating high-quality cinematic clips and performing instruction-based video editing.

A professional framework for managing characters, scenes, and shot consistency across AI video generation tools like Runway, Kling, and Sora.

Calc Tool is a robust command-line utility for performing arithmetic, trigonometric calculations, and seamless unit conversions.

A versatile utility for compressing, encrypting, and automating file backups and restorations.








































