CmdNotify for Openclaw

A lightweight Go-based command monitoring tool that periodically executes scripts, detects output changes, and triggers automated alerts.

mengyun8
v1.0.1
May 9, 2026
0
719
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install cmdnotify

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install cmdnotify using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is CmdNotify?

CmdNotify is a resource-optimized command monitoring system designed for developers who need to track system changes without the overhead of heavy monitoring suites. Built with Go, it leverages goroutine pools and efficient hashing to provide a minimal CPU and memory footprint, making it an ideal choice for Openclaw Skills users looking for local system observability.

At its core, the skill allows for batch monitoring of multiple commands or scripts simultaneously. It excels at detecting drift in stdout, stderr, or exit codes, ensuring that any deviation from expected behavior is captured and reported in real-time. Whether you are tracking disk usage or API health, this tool provides the granular control needed for robust system maintenance.

CmdNotify Use Cases

  • Monitoring disk usage, memory, and process counts for system health.
  • Tracking API health check status codes and response changes.
  • Detecting configuration drift in critical system files.
  • Watching log file patterns for specific error signatures.
  • Automating batch script execution with change-based notifications.

How CmdNotify Works

  1. The scheduler initializes based on a JSON configuration file, setting up a semaphore-based goroutine pool.
  2. Each command is assigned a specific interval and execution timeout using context-based control.
  3. The executor runs the command and captures the output (stdout/stderr) along with the exit code.
  4. A SHA-256 hash of the current result is compared against the stored history to detect changes.
  5. If a change or error is detected according to the notify_on rules, the skill triggers a default alert or a custom notification command.

CmdNotify Setup

To get started with this skill, ensure you have Go installed on your system. Follow these steps to build and run the monitor:

# Clone and enter the directory
cd CmdNotify

# Build the binary
go build -o cmdnotify .

# Run with a default config.json in the same directory
./cmdnotify

# Run specifying a custom configuration path
./cmdnotify -config /path/to/your/config.json

CmdNotify Data Schema & Taxonomy

The skill relies on a structured JSON configuration to define monitoring targets. Below is the schema for individual command objects:

Field Type Description
name string Unique identifier for the command task
command string The actual shell command or script path to execute
interval duration How often to run (e.g., 30s, 5m, 1h)
timeout duration Maximum time allowed for execution before termination
notify_on array List of triggers: ["change", "error", "all"]
notify_cmd string External command to run when an alert is triggered
max_history int Number of previous results stored for comparison

CmdNotify Advanced Features

  • Custom Notification Integration: Support for Webhooks (Slack/Discord) via the notify_cmd field using $CMD_NAME and $CMD_MESSAGE variables.
  • Concurrency Management: Semaphore-based limiting to prevent system resource exhaustion during batch execution.
  • Graceful Shutdown: Implements sync.WaitGroup and context cancellation for clean process exits.
  • Working Directory Control: Ability to specify the execution environment for each individual script.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*